mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 18:34:27 +02:00
prevent unnecessary calls to _read_file() in _is_compiled()
converted method-call to internal function-call in smarty_core_load_plugins()
This commit is contained in:
@@ -1459,7 +1459,7 @@ class Smarty
|
|||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
// get file source and timestamp
|
// get file source and timestamp
|
||||||
$_params = array('resource_name' => $resource_name);
|
$_params = array('resource_name' => $resource_name, 'get_source'=>false);
|
||||||
if (!$this->_fetch_resource_info($_params, $this)) {
|
if (!$this->_fetch_resource_info($_params, $this)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -69,7 +69,7 @@ function smarty_core_load_plugins($params, &$smarty)
|
|||||||
include_once $_plugin_file;
|
include_once $_plugin_file;
|
||||||
|
|
||||||
$_plugin_func = 'smarty_' . $_type . '_' . $_name;
|
$_plugin_func = 'smarty_' . $_type . '_' . $_name;
|
||||||
if (!$smarty->_plugin_implementation_exists($_plugin_func)) {
|
if (!function_exists($_plugin_func)) {
|
||||||
$smarty->_trigger_fatal_error("[plugin] function $_plugin_func() not found in $_plugin_file", $_tpl_file, $_tpl_line, __FILE__, __LINE__);
|
$smarty->_trigger_fatal_error("[plugin] function $_plugin_func() not found in $_plugin_file", $_tpl_file, $_tpl_line, __FILE__, __LINE__);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user