From eab8a101e7a3fcbb41e01a574985e06c5a3775de Mon Sep 17 00:00:00 2001 From: emkael Date: Thu, 18 Oct 2018 02:40:38 +0200 Subject: Updating Smarty --- lib/smarty3/sysplugins/smarty_template_config.php | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'lib/smarty3/sysplugins/smarty_template_config.php') diff --git a/lib/smarty3/sysplugins/smarty_template_config.php b/lib/smarty3/sysplugins/smarty_template_config.php index 44cdba6..850ae32 100644 --- a/lib/smarty3/sysplugins/smarty_template_config.php +++ b/lib/smarty3/sysplugins/smarty_template_config.php @@ -14,7 +14,6 @@ * @package Smarty * @subpackage TemplateResources * @author Uwe Tews - * */ class Smarty_Template_Config extends Smarty_Template_Source { @@ -64,16 +63,18 @@ class Smarty_Template_Config extends Smarty_Template_Source * initialize Source Object for given resource * Either [$_template] or [$smarty, $template_resource] must be specified * - * @param Smarty_Internal_Template $_template template object - * @param Smarty $smarty smarty object - * @param string $template_resource resource identifier + * @param Smarty_Internal_Template $_template template object + * @param Smarty $smarty smarty object + * @param string $template_resource resource identifier * * @return Smarty_Template_Config Source Object * @throws SmartyException */ - public static function load(Smarty_Internal_Template $_template = null, Smarty $smarty = null, - $template_resource = null) - { + public static function load( + Smarty_Internal_Template $_template = null, + Smarty $smarty = null, + $template_resource = null + ) { static $_incompatible_resources = array('extends' => true, 'php' => true); if ($_template) { $smarty = $_template->smarty; @@ -82,11 +83,11 @@ class Smarty_Template_Config extends Smarty_Template_Source if (empty($template_resource)) { throw new SmartyException('Source: Missing name'); } - // parse resource_name, load resource handler + // parse resource_name, load resource handler list($name, $type) = Smarty_Resource::parseResourceName($template_resource, $smarty->default_config_type); // make sure configs are not loaded via anything smarty can't handle if (isset($_incompatible_resources[ $type ])) { - throw new SmartyException ("Unable to use resource '{$type}' for config"); + throw new SmartyException("Unable to use resource '{$type}' for config"); } $source = new Smarty_Template_Config($smarty, $template_resource, $type, $name); $source->handler->populate($source, $_template); -- cgit v1.2.3