diff options
author | Mario Vavti <mario@mariovavti.com> | 2016-04-23 21:24:22 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2016-04-23 21:24:22 +0200 |
commit | 7e30c1dd823686eb8e59e6e1c171a751e8af2d49 (patch) | |
tree | 9a0dee0a26572e21f5576bcddbc2c4d4b905aa23 /library/Smarty/libs/sysplugins/smarty_internal_compile_private_foreachsection.php | |
parent | 78bf4564f20df20ec8d9025c974e25546e95bf69 (diff) | |
download | volse-hubzilla-7e30c1dd823686eb8e59e6e1c171a751e8af2d49.tar.gz volse-hubzilla-7e30c1dd823686eb8e59e6e1c171a751e8af2d49.tar.bz2 volse-hubzilla-7e30c1dd823686eb8e59e6e1c171a751e8af2d49.zip |
update smarty to version 3.1.29
Diffstat (limited to 'library/Smarty/libs/sysplugins/smarty_internal_compile_private_foreachsection.php')
-rw-r--r-- | library/Smarty/libs/sysplugins/smarty_internal_compile_private_foreachsection.php | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_compile_private_foreachsection.php b/library/Smarty/libs/sysplugins/smarty_internal_compile_private_foreachsection.php index 50c25bdb6..16f233359 100644 --- a/library/Smarty/libs/sysplugins/smarty_internal_compile_private_foreachsection.php +++ b/library/Smarty/libs/sysplugins/smarty_internal_compile_private_foreachsection.php @@ -50,7 +50,7 @@ class Smarty_Internal_Compile_Private_ForeachSection extends Smarty_Internal_Com * * @var array */ - public static $nameProperties = array(); + public $nameProperties = array(); /** * {section} tag has no item properties @@ -112,8 +112,7 @@ class Smarty_Internal_Compile_Private_ForeachSection extends Smarty_Internal_Com if ($named) { $this->resultOffsets['named'] = $this->startOffset + 3; $this->propertyPreg .= "([\$]smarty[.]{$this->tagName}[.]{$attributes['name']}[.]("; - $className = get_class($this); - $properties = $className::$nameProperties; + $properties = $this->nameProperties; } else { $this->resultOffsets['item'] = $this->startOffset + 3; $this->propertyPreg .= "([\$]{$attributes['item']}[@]("; @@ -204,17 +203,15 @@ class Smarty_Internal_Compile_Private_ForeachSection extends Smarty_Internal_Com * @return string compiled code * @throws \SmartyCompilerException */ - public static function compileSpecialVariable($args, Smarty_Internal_TemplateCompilerBase $compiler, $parameter) + public function compileSpecialVariable($args, Smarty_Internal_TemplateCompilerBase $compiler, $parameter) { $tag = strtolower(trim($parameter[ 0 ], '"\'')); $name = isset($parameter[ 1 ]) ? $compiler->getId($parameter[ 1 ]) : false; if (!$name) { $compiler->trigger_template_error("missing or illegal \$smarty.{$tag} name attribute", null, true); } - /* @var Smarty_Internal_Compile_Foreach|Smarty_Internal_Compile_Section $className */ - $className = 'Smarty_Internal_Compile_' . ucfirst($tag); $property = isset($parameter[ 2 ]) ? strtolower($compiler->getId($parameter[ 2 ])) : false; - if (!$property || !in_array($property, $className::$nameProperties)) { + if (!$property || !in_array($property, $this->nameProperties)) { $compiler->trigger_template_error("missing or illegal \$smarty.{$tag} property attribute", null, true); } $tagVar = "'__smarty_{$tag}_{$name}'"; |