From 43f043364f9806cc30c9c89daf691f3836b10364 Mon Sep 17 00:00:00 2001 From: Uwe Tews Date: Tue, 6 Jan 2015 01:18:58 +0100 Subject: [PATCH] fix case in class name --- libs/Smarty.class.php | 2 +- libs/sysplugins/smarty_data.php | 2 +- libs/sysplugins/smarty_internal_compile_assign.php | 6 +++--- .../smarty_internal_compile_function.php | 6 +++--- libs/sysplugins/smarty_internal_compile_if.php | 8 ++++---- .../sysplugins/smarty_internal_compile_include.php | 6 +++--- libs/sysplugins/smarty_internal_compile_while.php | 4 ++-- libs/sysplugins/smarty_internal_data.php | 14 +++++++------- libs/sysplugins/smarty_internal_template.php | 4 ++-- 9 files changed, 26 insertions(+), 26 deletions(-) diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index cd1e6f93..487da163 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -1290,7 +1290,7 @@ class Smarty extends Smarty_Internal_TemplateBase if (!empty($data) && is_array($data)) { // set up variable values foreach ($data as $_key => $_val) { - $tpl->tpl_vars[$_key] = new Smarty_variable($_val); + $tpl->tpl_vars[$_key] = new Smarty_Variable($_val); } } if ($this->debugging) { diff --git a/libs/sysplugins/smarty_data.php b/libs/sysplugins/smarty_data.php index 7ea810c2..8074513d 100644 --- a/libs/sysplugins/smarty_data.php +++ b/libs/sysplugins/smarty_data.php @@ -57,7 +57,7 @@ class Smarty_Data extends Smarty_Internal_Data } elseif (is_array($_parent)) { // set up variable values foreach ($_parent as $_key => $_val) { - $this->tpl_vars[$_key] = new Smarty_variable($_val); + $this->tpl_vars[$_key] = new Smarty_Variable($_val); } } elseif ($_parent != null) { throw new SmartyException("Wrong type for template variables"); diff --git a/libs/sysplugins/smarty_internal_compile_assign.php b/libs/sysplugins/smarty_internal_compile_assign.php index caa34861..bdce0c3f 100644 --- a/libs/sysplugins/smarty_internal_compile_assign.php +++ b/libs/sysplugins/smarty_internal_compile_assign.php @@ -42,7 +42,7 @@ class Smarty_Internal_Compile_Assign extends Smarty_Internal_CompileBase if (isset($compiler->template->tpl_vars[trim($_attr['var'], "'")])) { $compiler->template->tpl_vars[trim($_attr['var'], "'")]->nocache = true; } else { - $compiler->template->tpl_vars[trim($_attr['var'], "'")] = new Smarty_variable(null, true); + $compiler->template->tpl_vars[trim($_attr['var'], "'")] = new Smarty_Variable(null, true); } } // scope setup @@ -66,9 +66,9 @@ class Smarty_Internal_Compile_Assign extends Smarty_Internal_CompileBase if ($compiler->template->smarty instanceof SmartyBC) { $output = "tpl_vars[$_attr[var]])) {\$_smarty_tpl->tpl_vars[$_attr[var]] = clone \$_smarty_tpl->tpl_vars[$_attr[var]];"; $output .= "\n\$_smarty_tpl->tpl_vars[$_attr[var]]->value = $_attr[value]; \$_smarty_tpl->tpl_vars[$_attr[var]]->nocache = $_nocache; \$_smarty_tpl->tpl_vars[$_attr[var]]->scope = $_scope;"; - $output .= "\n} else \$_smarty_tpl->tpl_vars[$_attr[var]] = new Smarty_variable($_attr[value], $_nocache, $_scope);"; + $output .= "\n} else \$_smarty_tpl->tpl_vars[$_attr[var]] = new Smarty_Variable($_attr[value], $_nocache, $_scope);"; } else { - $output = "tpl_vars[$_attr[var]] = new Smarty_variable($_attr[value], $_nocache, $_scope);"; + $output = "tpl_vars[$_attr[var]] = new Smarty_Variable($_attr[value], $_nocache, $_scope);"; } } if ($_scope == Smarty::SCOPE_PARENT) { diff --git a/libs/sysplugins/smarty_internal_compile_function.php b/libs/sysplugins/smarty_internal_compile_function.php index 6367233a..3366910b 100644 --- a/libs/sysplugins/smarty_internal_compile_function.php +++ b/libs/sysplugins/smarty_internal_compile_function.php @@ -156,10 +156,10 @@ class Smarty_Internal_Compile_Functionclose extends Smarty_Internal_CompileBase } $output .= "ob_start();\n"; $output .= $_paramsCode; - $output .= "foreach (\$params as \$key => \$value) {\n\$_smarty_tpl->tpl_vars[\$key] = new Smarty_variable(\$value);\n}"; + $output .= "foreach (\$params as \$key => \$value) {\n\$_smarty_tpl->tpl_vars[\$key] = new Smarty_Variable(\$value);\n}"; $output .= "\$params = var_export(\$params, true);\n"; $output .= "echo \"/*%%SmartyNocache:{$compiler->template->properties['nocache_hash']}%%*/tpl_vars;\nforeach (\$params as \\\$key => \\\$value) {\n\\\$_smarty_tpl->tpl_vars[\\\$key] = new Smarty_variable(\\\$value);\n}\n?>"; + $output .= "\\\$saved_tpl_vars = \\\$_smarty_tpl->tpl_vars;\nforeach (\$params as \\\$key => \\\$value) {\n\\\$_smarty_tpl->tpl_vars[\\\$key] = new Smarty_Variable(\\\$value);\n}\n?>"; $output .= "/*/%%SmartyNocache:{$compiler->template->properties['nocache_hash']}%%*/\n\";?>"; $compiler->parser->current_buffer->append_subtree(new Smarty_Internal_ParseTree_Tag($compiler->parser, $output)); $compiler->parser->current_buffer->append_subtree($_functionCode); @@ -191,7 +191,7 @@ class Smarty_Internal_Compile_Functionclose extends Smarty_Internal_CompileBase } $output .= "\$saved_tpl_vars = \$_smarty_tpl->tpl_vars;\n"; $output .= $_paramsCode; - $output .= "foreach (\$params as \$key => \$value) {\n\$_smarty_tpl->tpl_vars[\$key] = new Smarty_variable(\$value);\n}?>"; + $output .= "foreach (\$params as \$key => \$value) {\n\$_smarty_tpl->tpl_vars[\$key] = new Smarty_Variable(\$value);\n}?>"; $compiler->parser->current_buffer->append_subtree(new Smarty_Internal_ParseTree_Tag($compiler->parser, $output)); $compiler->parser->current_buffer->append_subtree($_functionCode); $output = "tpl_vars = \$saved_tpl_vars;\n"; diff --git a/libs/sysplugins/smarty_internal_compile_if.php b/libs/sysplugins/smarty_internal_compile_if.php index d709fcfd..26c0acc7 100644 --- a/libs/sysplugins/smarty_internal_compile_if.php +++ b/libs/sysplugins/smarty_internal_compile_if.php @@ -42,9 +42,9 @@ class Smarty_Internal_Compile_If extends Smarty_Internal_CompileBase $_nocache = ',true'; // create nocache var to make it know for further compiling if (is_array($parameter['if condition']['var'])) { - $compiler->template->tpl_vars[trim($parameter['if condition']['var']['var'], "'")] = new Smarty_variable(null, true); + $compiler->template->tpl_vars[trim($parameter['if condition']['var']['var'], "'")] = new Smarty_Variable(null, true); } else { - $compiler->template->tpl_vars[trim($parameter['if condition']['var'], "'")] = new Smarty_variable(null, true); + $compiler->template->tpl_vars[trim($parameter['if condition']['var'], "'")] = new Smarty_Variable(null, true); } } else { $_nocache = ''; @@ -124,9 +124,9 @@ class Smarty_Internal_Compile_Elseif extends Smarty_Internal_CompileBase $_nocache = ',true'; // create nocache var to make it know for further compiling if (is_array($parameter['if condition']['var'])) { - $compiler->template->tpl_vars[trim($parameter['if condition']['var']['var'], "'")] = new Smarty_variable(null, true); + $compiler->template->tpl_vars[trim($parameter['if condition']['var']['var'], "'")] = new Smarty_Variable(null, true); } else { - $compiler->template->tpl_vars[trim($parameter['if condition']['var'], "'")] = new Smarty_variable(null, true); + $compiler->template->tpl_vars[trim($parameter['if condition']['var'], "'")] = new Smarty_Variable(null, true); } } else { $_nocache = ''; diff --git a/libs/sysplugins/smarty_internal_compile_include.php b/libs/sysplugins/smarty_internal_compile_include.php index 5ffa8eda..4f9f1d01 100644 --- a/libs/sysplugins/smarty_internal_compile_include.php +++ b/libs/sysplugins/smarty_internal_compile_include.php @@ -227,7 +227,7 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase // create variables foreach ($_attr as $key => $value) { $_pairs[] = "'$key'=>$value"; - $_vars_nc .= "\$_smarty_tpl->tpl_vars['$key'] = new Smarty_variable($value);\n"; + $_vars_nc .= "\$_smarty_tpl->tpl_vars['$key'] = new Smarty_Variable($value);\n"; } $_vars = 'array(' . join(',', $_pairs) . ')'; } else { @@ -252,7 +252,7 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase //$compiler->suppressNocacheProcessing = true; } if (isset($_assign)) { - $_output .= " \$_smarty_tpl->tpl_vars[$_assign] = new Smarty_variable(\$_smarty_tpl->getInlineSubTemplate({$include_file}, {$_cache_id}, {$_compile_id}, {$_caching}, {$_cache_lifetime}, {$_vars}, {$_parent_scope}, '{$_hash}', '{$compiler->parent_compiler->mergedSubTemplatesData[$tpl_name][$uid]['func']}'));\n"; + $_output .= " \$_smarty_tpl->tpl_vars[$_assign] = new Smarty_Variable(\$_smarty_tpl->getInlineSubTemplate({$include_file}, {$_cache_id}, {$_compile_id}, {$_caching}, {$_cache_lifetime}, {$_vars}, {$_parent_scope}, '{$_hash}', '{$compiler->parent_compiler->mergedSubTemplatesData[$tpl_name][$uid]['func']}'));\n"; } else { $_output .= "echo \$_smarty_tpl->getInlineSubTemplate({$include_file}, {$_cache_id}, {$_compile_id}, {$_caching}, {$_cache_lifetime}, {$_vars}, {$_parent_scope}, '{$_hash}', '{$compiler->parent_compiler->mergedSubTemplatesData[$tpl_name][$uid]['func']}');\n"; } @@ -273,7 +273,7 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase } // was there an assign attribute if (isset($_assign)) { - $_output .= "\$_smarty_tpl->tpl_vars[$_assign] = new Smarty_variable(\$_smarty_tpl->getSubTemplate ($include_file, $_cache_id, $_compile_id, $_caching, $_cache_lifetime, $_vars, $_parent_scope));\n"; + $_output .= "\$_smarty_tpl->tpl_vars[$_assign] = new Smarty_Variable(\$_smarty_tpl->getSubTemplate ($include_file, $_cache_id, $_compile_id, $_caching, $_cache_lifetime, $_vars, $_parent_scope));\n"; } else { $_output .= "echo \$_smarty_tpl->getSubTemplate ($include_file, $_cache_id, $_compile_id, $_caching, $_cache_lifetime, $_vars, $_parent_scope);\n"; } diff --git a/libs/sysplugins/smarty_internal_compile_while.php b/libs/sysplugins/smarty_internal_compile_while.php index 36dc049d..b73602f3 100644 --- a/libs/sysplugins/smarty_internal_compile_while.php +++ b/libs/sysplugins/smarty_internal_compile_while.php @@ -42,9 +42,9 @@ class Smarty_Internal_Compile_While extends Smarty_Internal_CompileBase $_nocache = ',true'; // create nocache var to make it know for further compiling if (is_array($parameter['if condition']['var'])) { - $compiler->template->tpl_vars[trim($parameter['if condition']['var']['var'], "'")] = new Smarty_variable(null, true); + $compiler->template->tpl_vars[trim($parameter['if condition']['var']['var'], "'")] = new Smarty_Variable(null, true); } else { - $compiler->template->tpl_vars[trim($parameter['if condition']['var'], "'")] = new Smarty_variable(null, true); + $compiler->template->tpl_vars[trim($parameter['if condition']['var'], "'")] = new Smarty_Variable(null, true); } } else { $_nocache = ''; diff --git a/libs/sysplugins/smarty_internal_data.php b/libs/sysplugins/smarty_internal_data.php index d954157e..28cf2ab1 100644 --- a/libs/sysplugins/smarty_internal_data.php +++ b/libs/sysplugins/smarty_internal_data.php @@ -55,12 +55,12 @@ class Smarty_Internal_Data if (is_array($tpl_var)) { foreach ($tpl_var as $_key => $_val) { if ($_key != '') { - $this->tpl_vars[$_key] = new Smarty_variable($_val, $nocache); + $this->tpl_vars[$_key] = new Smarty_Variable($_val, $nocache); } } } else { if ($tpl_var != '') { - $this->tpl_vars[$tpl_var] = new Smarty_variable($value, $nocache); + $this->tpl_vars[$tpl_var] = new Smarty_Variable($value, $nocache); } } @@ -79,7 +79,7 @@ class Smarty_Internal_Data public function assignGlobal($varname, $value = null, $nocache = false) { if ($varname != '') { - Smarty::$global_tpl_vars[$varname] = new Smarty_variable($value, $nocache); + Smarty::$global_tpl_vars[$varname] = new Smarty_Variable($value, $nocache); $ptr = $this; while ($ptr instanceof Smarty_Internal_Template) { $ptr->tpl_vars[$varname] = clone Smarty::$global_tpl_vars[$varname]; @@ -102,7 +102,7 @@ class Smarty_Internal_Data public function assignByRef($tpl_var, &$value, $nocache = false) { if ($tpl_var != '') { - $this->tpl_vars[$tpl_var] = new Smarty_variable(null, $nocache); + $this->tpl_vars[$tpl_var] = new Smarty_Variable(null, $nocache); $this->tpl_vars[$tpl_var]->value = &$value; } @@ -128,7 +128,7 @@ class Smarty_Internal_Data if (!isset($this->tpl_vars[$_key])) { $tpl_var_inst = $this->getVariable($_key, null, true, false); if ($tpl_var_inst instanceof Smarty_Undefined_Variable) { - $this->tpl_vars[$_key] = new Smarty_variable(null, $nocache); + $this->tpl_vars[$_key] = new Smarty_Variable(null, $nocache); } else { $this->tpl_vars[$_key] = clone $tpl_var_inst; } @@ -150,7 +150,7 @@ class Smarty_Internal_Data if (!isset($this->tpl_vars[$tpl_var])) { $tpl_var_inst = $this->getVariable($tpl_var, null, true, false); if ($tpl_var_inst instanceof Smarty_Undefined_Variable) { - $this->tpl_vars[$tpl_var] = new Smarty_variable(null, $nocache); + $this->tpl_vars[$tpl_var] = new Smarty_Variable(null, $nocache); } else { $this->tpl_vars[$tpl_var] = clone $tpl_var_inst; } @@ -184,7 +184,7 @@ class Smarty_Internal_Data { if ($tpl_var != '' && isset($value)) { if (!isset($this->tpl_vars[$tpl_var])) { - $this->tpl_vars[$tpl_var] = new Smarty_variable(); + $this->tpl_vars[$tpl_var] = new Smarty_Variable(); } if (!is_array($this->tpl_vars[$tpl_var]->value)) { settype($this->tpl_vars[$tpl_var]->value, 'array'); diff --git a/libs/sysplugins/smarty_internal_template.php b/libs/sysplugins/smarty_internal_template.php index 66771703..5565eb19 100644 --- a/libs/sysplugins/smarty_internal_template.php +++ b/libs/sysplugins/smarty_internal_template.php @@ -459,7 +459,7 @@ class Smarty_Internal_Template extends Smarty_Internal_TemplateBase if (!empty($data)) { // set up variable values foreach ($data as $_key => $_val) { - $tpl->tpl_vars[$_key] = new Smarty_variable($_val); + $tpl->tpl_vars[$_key] = new Smarty_Variable($_val); } } return $tpl; @@ -623,7 +623,7 @@ class Smarty_Internal_Template extends Smarty_Internal_TemplateBase public function createLocalArrayVariable($tpl_var, $nocache = false, $scope = Smarty::SCOPE_LOCAL) { if (!isset($this->tpl_vars[$tpl_var])) { - $this->tpl_vars[$tpl_var] = new Smarty_variable(array(), $nocache, $scope); + $this->tpl_vars[$tpl_var] = new Smarty_Variable(array(), $nocache, $scope); } else { $this->tpl_vars[$tpl_var] = clone $this->tpl_vars[$tpl_var]; if ($scope != Smarty::SCOPE_LOCAL) {