diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index 41071ab9..70f4999f 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -1203,8 +1203,9 @@ class Smarty extends Smarty_Internal_TemplateBase { public function loadPlugin($plugin_name, $check = true) { // if function or class exists, exit silently (already loaded) - if ($check && (is_callable($plugin_name) || class_exists($plugin_name, false))) + if ($check && (is_callable($plugin_name) || class_exists($plugin_name, false))) { return true; + } // Plugin name is expected to be: Smarty_[Type]_[Name] $_name_parts = explode('_', $plugin_name, 3); // class name must have three parts to be valid plugin @@ -1225,6 +1226,7 @@ class Smarty extends Smarty_Internal_TemplateBase { } // plugin filename is expected to be: [type].[name].php $_plugin_filename = "{$_name_parts[1]}.{$_name_parts[2]}.php"; + // loop through plugin dirs and find the plugin foreach($this->getPluginsDir() as $_plugin_dir) { $names = array( diff --git a/libs/sysplugins/smarty_cacheresource_custom.php b/libs/sysplugins/smarty_cacheresource_custom.php index d7513822..16fe72e1 100644 --- a/libs/sysplugins/smarty_cacheresource_custom.php +++ b/libs/sysplugins/smarty_cacheresource_custom.php @@ -199,7 +199,7 @@ abstract class Smarty_CacheResource_Custom extends Smarty_CacheResource { $mtime = $this->fetchTimestamp($id, $name, null, null); if ($mtime === null) { - $this->fetch($id, $name, null, null, &$content, &$mtime); + $this->fetch($id, $name, null, null, $content, $mtime); } return $mtime && time() - $mtime < $smarty->locking_timeout;