mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-07 20:04:27 +02:00
- bugfix - the output of plugins was not cached
- added global variable SCRIPT_NAME
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
08/24/2009
|
08/24/2009
|
||||||
- fixed typo in lexer definition for '!==' operator
|
- fixed typo in lexer definition for '!==' operator
|
||||||
|
- bugfix - the ouput of plugins was not cached
|
||||||
|
- added global variable SCRIPT_NAME
|
||||||
|
|
||||||
08/21/2009
|
08/21/2009
|
||||||
- fixed problems whitespace in conjuction with custom delimiters
|
- fixed problems whitespace in conjuction with custom delimiters
|
||||||
|
@@ -124,7 +124,7 @@ class Smarty extends Smarty_Internal_TemplateBase {
|
|||||||
// config var settings
|
// config var settings
|
||||||
public $config_overwrite = true; //Controls whether variables with the same name overwrite each other.
|
public $config_overwrite = true; //Controls whether variables with the same name overwrite each other.
|
||||||
public $config_booleanize = true; //Controls whether config values of on/true/yes and off/false/no get converted to boolean
|
public $config_booleanize = true; //Controls whether config values of on/true/yes and off/false/no get converted to boolean
|
||||||
public $config_read_hidden = true; //Controls whether hidden config sections/vars are read from the file.
|
public $config_read_hidden = true; //Controls whether hidden config sections/vars are read from the file.
|
||||||
// config vars
|
// config vars
|
||||||
public $config_vars = array();
|
public $config_vars = array();
|
||||||
// assigned tpl vars
|
// assigned tpl vars
|
||||||
@@ -242,6 +242,7 @@ class Smarty extends Smarty_Internal_TemplateBase {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$this->assign_global('SCRIPT_NAME', $_SERVER['SCRIPT_NAME']);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -262,7 +263,7 @@ class Smarty extends Smarty_Internal_TemplateBase {
|
|||||||
*/
|
*/
|
||||||
public static function &instance($name = 'default')
|
public static function &instance($name = 'default')
|
||||||
{
|
{
|
||||||
if (isset(Smarty::$instance[$name])) {
|
if (isset(Smarty::$instance[$name])) {
|
||||||
return Smarty::$instance[$name];
|
return Smarty::$instance[$name];
|
||||||
} else {
|
} else {
|
||||||
throw new Exception("Smarty instance $name is not existing");
|
throw new Exception("Smarty instance $name is not existing");
|
||||||
@@ -516,7 +517,7 @@ class SmartyException {
|
|||||||
echo "Code: " . $e->getCode() . "<br />Error: " . htmlentities($e->getMessage()) . "<br />"
|
echo "Code: " . $e->getCode() . "<br />Error: " . htmlentities($e->getMessage()) . "<br />"
|
||||||
. "File: " . $e->getFile() . "<br />"
|
. "File: " . $e->getFile() . "<br />"
|
||||||
. "Line: " . $e->getLine() . "<br />"
|
. "Line: " . $e->getLine() . "<br />"
|
||||||
// . "Trace" . $e->getTraceAsString() . "<br />"
|
// . "Trace" . $e->getTraceAsString() . "<br />"
|
||||||
. "\n";
|
. "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -52,7 +52,7 @@ class Smarty_Internal_Plugin_Handler {
|
|||||||
$plugin = array(new $plugin, 'execute');
|
$plugin = array(new $plugin, 'execute');
|
||||||
}
|
}
|
||||||
if (is_callable($plugin)) {
|
if (is_callable($plugin)) {
|
||||||
$this->smarty->registered_plugins[$name] = array($plugin_type, $plugin, false);
|
$this->smarty->registered_plugins[$name] = array($plugin_type, $plugin, true);
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
throw new Exception("Plugin \"{$name}\" not callable");
|
throw new Exception("Plugin \"{$name}\" not callable");
|
||||||
|
Reference in New Issue
Block a user