mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-07 03:44:26 +02:00
- bugfix for obtaining plugins which must be included (related to change of 12/30/2009)
This commit is contained in:
@@ -1,3 +1,6 @@
|
|||||||
|
01/01/2009
|
||||||
|
- bugfix for obtaining plugins which must be included (related to change of 12/30/2009)
|
||||||
|
|
||||||
12/31/2009
|
12/31/2009
|
||||||
- optimization of generated code for doublequoted strings containing variables
|
- optimization of generated code for doublequoted strings containing variables
|
||||||
- rewrite of {function} tag handling
|
- rewrite of {function} tag handling
|
||||||
|
@@ -180,8 +180,7 @@ class Smarty_Internal_TemplateCompilerBase {
|
|||||||
throw new Exception("Plugin \"{$tag}\" not callable");
|
throw new Exception("Plugin \"{$tag}\" not callable");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$function = 'smarty_' . $plugin_type . '_' . $tag;
|
if ($function = $this->getPlugin($tag, $plugin_type)) {
|
||||||
if (is_callable($function) || $function = $this->getPlugin($tag, $plugin_type)) {
|
|
||||||
return $this->callTagCompiler('private_' . $plugin_type . '_plugin', $args, $tag, $function);
|
return $this->callTagCompiler('private_' . $plugin_type . '_plugin', $args, $tag, $function);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -204,8 +203,7 @@ class Smarty_Internal_TemplateCompilerBase {
|
|||||||
return $this->callTagCompiler('private_registered_block', $args, $tag);
|
return $this->callTagCompiler('private_registered_block', $args, $tag);
|
||||||
}
|
}
|
||||||
// block plugin?
|
// block plugin?
|
||||||
$function = 'smarty_block_' . $base_tag;
|
if ($function = $this->getPlugin($base_tag, 'block')) {
|
||||||
if (is_callable($function) || $function = $this->getPlugin($base_tag, 'block')) {
|
|
||||||
return $this->callTagCompiler('private_block_plugin', $args, $tag, $function);
|
return $this->callTagCompiler('private_block_plugin', $args, $tag, $function);
|
||||||
}
|
}
|
||||||
if ($this->smarty->loadPlugin('smarty_compiler_' . $tag)) {
|
if ($this->smarty->loadPlugin('smarty_compiler_' . $tag)) {
|
||||||
@@ -307,10 +305,10 @@ class Smarty_Internal_TemplateCompilerBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return $plugin;
|
return $plugin;
|
||||||
/* } else {
|
|
||||||
throw new Exception("Plugin {$type} \"{$plugin_name}\" not callable");
|
|
||||||
}
|
}
|
||||||
*/
|
if (is_callable($plugin)) {
|
||||||
|
// plugin function is defined in the script
|
||||||
|
return $plugin;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user