mirror of
https://github.com/smarty-php/smarty.git
synced 2026-04-21 08:58:58 +02:00
- performance store flag for already required shared plugin functions in static variable or
Smarty's $_cache to improve performance when plugins are often called
https://github.com/smarty-php/smarty/commit/51e0d5cd405d764a4ea257d1bac1fb1205f74528#commitcomment-22280086
This commit is contained in:
@@ -38,8 +38,9 @@
|
||||
*/
|
||||
function smarty_function_html_image($params, $template)
|
||||
{
|
||||
if (!is_callable('smarty_function_escape_special_chars')) {
|
||||
if (!isset($template->smarty->_cache[ '_required_sesc' ])) {
|
||||
require_once(SMARTY_PLUGINS_DIR . 'shared.escape_special_chars.php');
|
||||
$template->smarty->_cache[ '_required_sesc' ] = true;
|
||||
}
|
||||
|
||||
$alt = '';
|
||||
|
||||
Reference in New Issue
Block a user