From f044178bada095c4dfd12db27cd0deb44330157b Mon Sep 17 00:00:00 2001 From: "uwe.tews@googlemail.com" Date: Thu, 11 Nov 2010 21:34:36 +0000 Subject: [PATCH] - major update including some API changes --- README | 58 +- SMARTY2_BC_NOTES | 22 +- change_log.txt | 3 + libs/Smarty.class.php | 449 ++- libs/plugins/block.textformat.php | 2 +- libs/plugins/function.cycle.php | 2 +- libs/sysplugins/smarty_internal_cache.php | 102 - .../smarty_internal_compile_append.php | 89 +- .../smarty_internal_compile_assign.php | 38 +- .../smarty_internal_compile_block.php | 163 +- .../smarty_internal_compile_break.php | 15 +- .../smarty_internal_compile_call.php | 22 +- .../smarty_internal_compile_capture.php | 16 +- .../smarty_internal_compile_config_load.php | 28 +- .../smarty_internal_compile_continue.php | 14 +- .../smarty_internal_compile_debug.php | 5 +- .../smarty_internal_compile_eval.php | 4 + .../smarty_internal_compile_extends.php | 54 +- .../smarty_internal_compile_for.php | 31 +- .../smarty_internal_compile_foreach.php | 37 +- .../smarty_internal_compile_function.php | 20 +- .../sysplugins/smarty_internal_compile_if.php | 71 +- .../smarty_internal_compile_include.php | 64 +- .../smarty_internal_compile_include_php.php | 49 +- .../smarty_internal_compile_insert.php | 15 +- .../smarty_internal_compile_ldelim.php | 3 + .../smarty_internal_compile_nocache.php | 3 + ..._internal_compile_private_block_plugin.php | 21 +- ...ternal_compile_private_function_plugin.php | 16 +- ...arty_internal_compile_private_modifier.php | 20 +- ..._compile_private_object_block_function.php | 33 +- ...ternal_compile_private_object_function.php | 17 +- ...ernal_compile_private_print_expression.php | 37 +- ...ernal_compile_private_registered_block.php | 24 +- ...al_compile_private_registered_function.php | 21 +- ...ernal_compile_private_special_variable.php | 16 +- .../smarty_internal_compile_rdelim.php | 3 + .../smarty_internal_compile_section.php | 7 +- .../smarty_internal_compile_while.php | 12 +- .../smarty_internal_compilebase.php | 150 +- libs/sysplugins/smarty_internal_config.php | 4 +- .../smarty_internal_config_file_compiler.php | 4 +- libs/sysplugins/smarty_internal_data.php | 53 +- libs/sysplugins/smarty_internal_debug.php | 2 +- libs/sysplugins/smarty_internal_filter.php | 89 + .../smarty_internal_filter_handler.php | 2 +- .../smarty_internal_plugin_loader.php | 64 + libs/sysplugins/smarty_internal_register.php | 245 +- .../smarty_internal_resource_eval.php | 1 - .../smarty_internal_resource_extends.php | 54 +- .../smarty_internal_resource_file.php | 8 +- .../smarty_internal_resource_php.php | 8 +- .../smarty_internal_resource_registered.php | 17 +- .../smarty_internal_security_handler.php | 148 - libs/sysplugins/smarty_internal_template.php | 228 +- .../smarty_internal_templatecompilerbase.php | 86 +- .../smarty_internal_templatelexer.php | 111 +- .../smarty_internal_templateparser.php | 3159 +++++++++-------- .../sysplugins/smarty_internal_unregister.php | 162 - libs/sysplugins/smarty_internal_utility.php | 23 +- libs/sysplugins/smarty_internal_wrapper.php | 73 +- libs/sysplugins/smarty_security.php | 156 +- 62 files changed, 3249 insertions(+), 3204 deletions(-) delete mode 100644 libs/sysplugins/smarty_internal_cache.php create mode 100644 libs/sysplugins/smarty_internal_filter.php create mode 100644 libs/sysplugins/smarty_internal_plugin_loader.php delete mode 100644 libs/sysplugins/smarty_internal_security_handler.php delete mode 100644 libs/sysplugins/smarty_internal_unregister.php diff --git a/README b/README index a99fa663..acc59530 100644 --- a/README +++ b/README @@ -3,11 +3,13 @@ Smarty 3.0 Beta Author: Monte Ohrt Author: Uwe Tews -AN INTRODUCTION TO SMARTY 3 BETA +AN INTRODUCTION TO SMARTY 3 -NOTICE for BETA 8: +NOTICE for RC5: -The Smarty 3 API (as of beta 8) has been refactored to a syntax geared +With RC5 the API was changed once again. + +The Smarty 3 API has been refactored to a syntax geared for consistency and modularity. The Smarty 2 API syntax is still supported, but will throw a deprecation notice. You can disable the notices, but it is highly recommended to adjust your syntax to Smarty 3, as the Smarty 2 syntax must run @@ -41,10 +43,10 @@ $smarty->getGlobal($varname = null) $smarty->getRegisteredObject($name) $smarty->getDebugTemplate() $smarty->setDebugTemplate($tpl_name) -$smarty->assign($tpl_var, $value = null, $nocache = false, $scope = SMARTY_LOCAL_SCOPE) +$smarty->assign($tpl_var, $value = null, $nocache = false) $smarty->assignGlobal($varname, $value = null, $nocache = false) -$smarty->assignByRef($tpl_var, &$value, $nocache = false, $scope = SMARTY_LOCAL_SCOPE) -$smarty->append($tpl_var, $value = null, $merge = false, $nocache = false, $scope = SMARTY_LOCAL_SCOPE) +$smarty->assignByRef($tpl_var, &$value, $nocache = false) +$smarty->append($tpl_var, $value = null, $merge = false, $nocache = false) $smarty->appendByRef($tpl_var, &$value, $merge = false) $smarty->clearAssign($tpl_var) $smarty->clearAllAssign() @@ -55,40 +57,26 @@ $smarty->getStreamVariable($variable) $smarty->getConfigVars($varname = null) $smarty->clearConfig($varname = null) $smarty->getTemplateVars($varname = null, $_ptr = null, $search_parents = true) +$smarty->clearAllCache($exp_time = null, $type = null) +$smarty->clearCache($template_name, $cache_id = null, $compile_id = null, $exp_time = null, $type = null) -// some API calls are moved into their own objects: +$smarty->registerPlugin($type, $tag, $callback, $cacheable = true, $cache_attr = array()) -$smarty->cache->loadResource($type = null) -$smarty->cache->clearAll($exp_time = null, $type = null) -$smarty->cache->clear($template_name, $cache_id = null, $compile_id = null, $exp_time = null, $type = null) +$smarty->registerObject($object_name, $object_impl, $allowed = array(), $smarty_args = true, $block_methods = array()) -$smarty->register->block($block_tag, $block_impl, $cacheable = true, $cache_attr = array()) -$smarty->register->compilerFunction($compiler_tag, $compiler_impl, $cacheable = true) -$smarty->register->templateFunction($function_tag, $function_impl, $cacheable = true, $cache_attr = array()) -$smarty->register->modifier($modifier_name, $modifier_impl) -$smarty->register->templateObject($object_name, $object_impl, $allowed = array(), $smarty_args = true, $block_methods = array()) -$smarty->register->outputFilter($function_name) -$smarty->register->postFilter($function_name) -$smarty->register->preFilter($function_name) -$smarty->register->resource($resource_type, $function_names) -$smarty->register->variableFilter($function_name) -$smarty->register->defaultPluginHandler($function_name) -$smarty->register->defaultTemplateHandler($function_name) +$smarty->registerFilter($type, $function_name) +$smarty->registerResource($resource_type, $function_names) +$smarty->registerDefaultPluginHandler($function_name) +$smarty->registerDefaultTemplateHandler($function_name) -$smarty->unregister->block($block_tag) -$smarty->unregister->compilerFunction($compiler_tag) -$smarty->unregister->templateFunction($function_tag) -$smarty->unregister->modifier($modifier) -$smarty->unregister->templateObject($object_name) -$smarty->unregister->outputFilter($function_name) -$smarty->unregister->postFilter($function_name) -$smarty->unregister->preFilter($function_name) -$smarty->unregister->resource($resource_type) -$smarty->unregister->variableFilter($function_name) +$smarty->unregisterPlugin($type, $tag) +$smarty->unregisterObject($object_name) +$smarty->unregisterFilter($type, $function_name) +$smarty->unregisterResource($resource_type) -$smarty->utility->compileAllTemplates($extention = '.tpl', $force_compile = false, $time_limit = 0, $max_errors = null) -$smarty->utility->clearCompiledTemplate($resource_name = null, $compile_id = null, $exp_time = null) -$smarty->utility->testInstall() +$smarty->compileAllTemplates($extention = '.tpl', $force_compile = false, $time_limit = 0, $max_errors = null) +$smarty->clearCompiledTemplate($resource_name = null, $compile_id = null, $exp_time = null) +$smarty->testInstall() // then all the getters/setters, available for all properties. Here are a few: diff --git a/SMARTY2_BC_NOTES b/SMARTY2_BC_NOTES index bfed323a..79a2cb1b 100644 --- a/SMARTY2_BC_NOTES +++ b/SMARTY2_BC_NOTES @@ -2,8 +2,9 @@ == Syntax == -Smarty 3 API has a new syntax. Much of the Smarty 2 syntax is supported but -deprecated. See the README that comes with Smarty 3 for more information. +Smarty 3 API has a new syntax. Much of the Smarty 2 syntax is supported +by a wrapper but deprecated. See the README that comes with Smarty 3 for more +information. The {$array|@mod} syntax has always been a bit confusing, where an "@" is required to apply a modifier to an array instead of the individual elements. Normally you @@ -89,3 +90,20 @@ get any output. == newline at {if} tags == A \n was added to the compiled code of the {if},{else},{elseif},{/if} tags to get output of newlines as expected by the template source. If one of the {if} tags is at the line end you will now get a newline in the HTML output. + +== trigger_error() == +The API function trigger_error() has been removed because it did just map to PHP trigger_error. +However it's still included in the Smarty2 API wrapper. + +== Smarty constants == +The constants +SMARTY_PHP_PASSTHRU +SMARTY_PHP_QUOTE +SMARTY_PHP_REMOVE +SMARTY_PHP_ALLOW +have been replaced with class constants +Smarty::PHP_PASSTHRU +Smarty::PHP_QUOTE +Smarty::PHP_REMOVE +Smarty::PHP_ALLOW + diff --git a/change_log.txt b/change_log.txt index 37ecfc37..84e7df33 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,3 +1,6 @@ +11/11/2010 +- major update including some API changes + 10/11/2010 - observe compile_id also for config files diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index 6186dc1e..5809a884 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -63,30 +63,6 @@ if (!defined('SMARTY_RESOURCE_DATE_FORMAT')) { define('SMARTY_RESOURCE_DATE_FORMAT', '%b %e, %Y'); } -/** - * define variable scopes - */ -define('SMARTY_LOCAL_SCOPE', 0); -define('SMARTY_PARENT_SCOPE', 1); -define('SMARTY_ROOT_SCOPE', 2); -define('SMARTY_GLOBAL_SCOPE', 3); - -/** - * define caching modes - */ -define('SMARTY_CACHING_OFF', 0); -define('SMARTY_CACHING_LIFETIME_CURRENT', 1); -define('SMARTY_CACHING_LIFETIME_SAVED', 2); - -/** - * This determines how Smarty handles "" tags in templates. - * possible values: - */ -define('SMARTY_PHP_PASSTHRU', 0); //-> print tags as plain text -define('SMARTY_PHP_QUOTE', 1); //-> escape tags as entities -define('SMARTY_PHP_REMOVE', 2); //-> escape tags as entities -define('SMARTY_PHP_ALLOW', 3); //-> escape tags as entities - /** * register the class autoloader */ @@ -107,8 +83,45 @@ if (SMARTY_SPL_AUTOLOAD && set_include_path(get_include_path() . PATH_SEPARATOR * This is the main Smarty class */ class Smarty extends Smarty_Internal_Data { + /** + * constant definitions + */ // smarty version const SMARTY_VERSION = 'Smarty3-SVN$Rev: 3286 $'; + //define variable scopes + const SCOPE_LOCAL = 0; + const SCOPE_PARENT = 1; + const SCOPE_ROOT = 2; + const SCOPE_GLOBAL = 3; + // define caching modes + const CACHING_OFF = 0; + const CACHING_LIFETIME_CURRENT = 1; + const CACHING_LIFETIME_SAVED = 2; + /** modes for handling of "" tags in templates. **/ + const PHP_PASSTHRU = 0; //-> print tags as plain text + const PHP_QUOTE = 1; //-> escape tags as entities + const PHP_REMOVE = 2; //-> escape tags as entities + const PHP_ALLOW = 3; //-> escape tags as entities + // filter types + const FILTER_POST = 'post'; + const FILTER_PRE = 'pre'; + const FILTER_OUTPUT = 'output'; + const FILTER_VARIABLE = 'variable'; + // plugin types + const PLUGIN_FUNCTION = 'function'; + const PLUGIN_BLOCK = 'block'; + const PLUGIN_COMPILER = 'compiler'; + const PLUGIN_MODIFIER = 'modifier'; + + /** + * static variables + */ + // assigned global tpl vars + static $global_tpl_vars = array(); + + /** + * variables + */ // auto literal on delimiters with whitspace public $auto_literal = true; // display error on not assigned variables @@ -137,7 +150,7 @@ class Smarty extends Smarty_Internal_Data { public $compile_error = false; // caching enabled public $caching = false; - // merge compiled includea + // merge compiled includes public $merge_compiled_includes = false; // cache lifetime public $cache_lifetime = 3600; @@ -152,12 +165,10 @@ class Smarty extends Smarty_Internal_Data { public $right_delimiter = "}"; // security public $security_class = 'Smarty_Security'; - public $php_handling = SMARTY_PHP_PASSTHRU; + public $security_policy = null; + public $php_handling = self::PHP_PASSTHRU; public $allow_php_tag = false; public $allow_php_templates = false; - public $security = false; - public $security_policy = null; - public $security_handler = null; public $direct_access_security = true; public $trusted_dir = array(); // debug mode @@ -175,8 +186,6 @@ class Smarty extends Smarty_Internal_Data { public $config_vars = array(); // assigned tpl vars public $tpl_vars = array(); - // assigned global tpl vars - public $global_tpl_vars = array(); // dummy parent object public $parent = null; // global template functions @@ -207,6 +216,8 @@ class Smarty extends Smarty_Internal_Data { public $registered_classes = array(); // registered filters public $registered_filters = array(); + // registered resources + public $registered_resources = array(); // autoload filter public $autoload_filters = array(); // status of filter on variable output @@ -221,25 +232,22 @@ class Smarty extends Smarty_Internal_Data { public $_file_perms = 0644; // default dir permissions public $_dir_perms = 0771; - // smarty object reference - public $smarty = null; // block tag hierarchy public $_tag_stack = array(); // flag if {block} tag is compiled for template inheritance public $inheritance = false; - // plugins - public $_plugins = array(); // generate deprecated function call notices? public $deprecation_notices = true; + // Smarty 2 BC + public $_version = self::SMARTY_VERSION; /** * Class constructor, initializes basic smarty properties */ public function __construct() { - // self reference needed by other classes methods - $this->smarty = $this; - + // selfpointer need by some other class methods + $this->smarty = $this; if (is_callable('mb_internal_encoding')) { mb_internal_encoding(SMARTY_RESOURCE_CHAR_SET); } @@ -310,9 +318,6 @@ class Smarty extends Smarty_Internal_Data { // create template object if necessary ($template instanceof $this->template_class)? $_template = $template : $_template = $this->createTemplate ($template, $cache_id, $compile_id, $parent); - if (isset($this->error_reporting)) { - $_smarty_old_error_level = error_reporting($this->error_reporting); - } // obtain data for cache modified check if ($this->cache_modified_check && $this->caching && $display) { $_isCached = $_template->isCached() && !$_template->has_nocache_code; @@ -329,9 +334,6 @@ class Smarty extends Smarty_Internal_Data { $_output = $_template->getRenderedTemplate(); } $_template->rendered_content = null; - if (isset($this->error_reporting)) { - error_reporting($_smarty_old_error_level); - } // display or fetch if ($display) { if ($this->caching && $this->cache_modified_check) { @@ -425,13 +427,13 @@ class Smarty extends Smarty_Internal_Data { if (!is_object($template)) { // we got a template resource // already in template cache? - $_templateId = crc32($template . $cache_id . $compile_id); + $_templateId = sha1($template . $cache_id . $compile_id); if (isset($this->template_objects[$_templateId]) && $this->caching) { // return cached template object $tpl = $this->template_objects[$_templateId]; } else { // create new template object - $tpl = new $this->template_class($template, $this, $parent, $cache_id, $compile_id); + $tpl = new $this->template_class($template, clone $this, $parent, $cache_id, $compile_id); } } else { // just return a copy of template class @@ -446,18 +448,95 @@ class Smarty extends Smarty_Internal_Data { } return $tpl; } + + + + /** + * Check if a template resource exists + * + * @param string $resource_name template name + * @return boolean status + */ + function templateExists($resource_name) + { + // create template object + $save = $this->template_objects; + $tpl = new $this->template_class($resource_name, $this); + // check if it does exists + $result = $tpl->isExisting(); + $this->template_objects = $save; + return $result; + } + + /** + * Returns a single or all global variables + * + * @param object $smarty + * @param string $varname variable name or null + * @return string variable value or or array of variables + */ + function getGlobal($varname = null) + { + if (isset($varname)) { + if (isset(self::$global_tpl_vars[$varname])) { + return self::$global_tpl_vars[$varname]->value; + } else { + return ''; + } + } else { + $_result = array(); + foreach (self::$global_tpl_vars AS $key => $var) { + $_result[$key] = $var->value; + } + return $_result; + } + } + + /** + * Empty cache folder + * + * @param integer $exp_time expiration time + * @param string $type resource type + * @return integer number of cache files deleted + */ + function clearAllCache($exp_time = null, $type = null) + { + // load cache resource and call clearAll + return $this->loadCacheResource($type)->clearAll($exp_time); + } + + /** + * Empty cache for a specific template + * + * @param string $template_name template name + * @param string $cache_id cache id + * @param string $compile_id compile id + * @param integer $exp_time expiration time + * @param string $type resource type + * @return integer number of cache files deleted + */ + function clearCache($template_name, $cache_id = null, $compile_id = null, $exp_time = null, $type = null) + { + // load cache resource and call clear + return $this->loadCacheResource($type)->clear($template_name, $cache_id, $compile_id, $exp_time); + } /** * Loads security class and enables security */ - public function enableSecurity() + public function enableSecurity($security_class = null) { - if (isset($this->security_class)) { - $this->security_policy = new $this->security_class; - $this->security_handler = new Smarty_Internal_Security_Handler($this); - $this->security = true; + if ($security_class instanceof Smarty_Security) { + $this->security_policy = $security_class; + return; + } + if ($security_class == null) { + $security_class = $this->security_class; + } + if (class_exists($security_class)) { + $this->security_policy = new $security_class($this); } else { - throw new SmartyException('Property security_class is not defined'); + throw new SmartyException("Security class '$security_class' is not defined"); } } @@ -466,9 +545,40 @@ class Smarty extends Smarty_Internal_Data { */ public function disableSecurity() { - $this->security = false; + $this->security_policy = null; } + /** + * Loads cache resource. + * + * @param string $type cache resource type + * @return object of cache resource + */ + public function loadCacheResource($type = null) { + if (!isset($type)) { + $type = $this->caching_type; + } + // already loaded? + if (isset($this->cache_resource_objects[$type])) { + return $this->cache_resource_objects[$type]; + } + if (in_array($type, $this->cache_resource_types)) { + $cache_resource_class = 'Smarty_Internal_CacheResource_' . ucfirst($type); + return $this->cache_resource_objects[$type] = new $cache_resource_class($this); + } + else { + // try plugins dir + $cache_resource_class = 'Smarty_CacheResource_' . ucfirst($type); + if (Smarty_Internal_Plugin_Loader::loadPlugin($cache_resource_class, $this->plugins_dir)) { + return $this->cache_resource_objects[$type] = new $cache_resource_class($this); + } + else { + throw new SmartyException("Unable to load cache resource '{$type}'"); + } + } + } + + /** * Set template directory * @@ -487,139 +597,10 @@ class Smarty extends Smarty_Internal_Data { */ public function addTemplateDir($template_dir) { - $this->template_dir = array_merge((array)$this->template_dir, (array)$template_dir); - $this->template_dir = array_unique($this->template_dir); + $this->template_dir = array_unique(array_merge((array)$this->template_dir, (array)$template_dir)); return; } - - /** - * Check if a template resource exists - * - * @param string $resource_name template name - * @return boolean status - */ - function templateExists($resource_name) - { - // create template object - $save = $this->template_objects; - $tpl = new $this->template_class($resource_name, $this); - // check if it does exists - $result = $tpl->isExisting(); - $this->template_objects = $save; - unset ($tpl); - return $result; - } - - /** - * Takes unknown classes and loads plugin files for them - * class name format: Smarty_PluginType_PluginName - * plugin filename format: plugintype.pluginname.php - * - * @param string $plugin_name class plugin name to load - * @return string |boolean filepath of loaded file or false - */ - 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))) - return true; - // Plugin name is expected to be: Smarty_[Type]_[Name] - $_plugin_name = strtolower($plugin_name); - $_name_parts = explode('_', $_plugin_name, 3); - // class name must have three parts to be valid plugin - if (count($_name_parts) < 3 || $_name_parts[0] !== 'smarty') { - throw new SmartyException("plugin {$plugin_name} is not a valid name format"); - return false; - } - // if type is "internal", get plugin from sysplugins - if ($_name_parts[1] == 'internal') { - $file = SMARTY_SYSPLUGINS_DIR . $_plugin_name . '.php'; - if (file_exists($file)) { - require_once($file); - return $file; - } else { - return false; - } - } - // 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((array)$this->plugins_dir as $_plugin_dir) { - if (strpos('/\\', substr($_plugin_dir, -1)) === false) { - $_plugin_dir .= DS; - } - $file = $_plugin_dir . $_plugin_filename; - if (file_exists($file)) { - require_once($file); - return $file; - } - } - // no plugin loaded - return false; - } - - /** - * load a filter of specified type and name - * - * @param string $type filter type - * @param string $name filter name - * @return bool - */ - function loadFilter($type, $name) - { - $_plugin = "smarty_{$type}filter_{$name}"; - $_filter_name = $_plugin; - if ($this->loadPlugin($_plugin)) { - if (class_exists($_plugin, false)) { - $_plugin = array($_plugin, 'execute'); - } - if (is_callable($_plugin)) { - return $this->registered_filters[$type][$_filter_name] = $_plugin; - } - } - throw new SmartyException("{$type}filter \"{$name}\" not callable"); - return false; - } - - /** - * Sets the exception handler for Smarty. - * - * @param mixed $handler function name or array with object/method names - * @return string previous exception handler - */ - public function setExceptionHandler($handler) - { - $this->exception_handler = $handler; - return set_exception_handler($handler); - } - - /** - * trigger Smarty error - * - * @param string $error_msg - * @param integer $error_type - */ - public function trigger_error($error_msg, $error_type = E_USER_WARNING) - { - throw new SmartyException("Smarty error: $error_msg"); - } - - /** - * Return internal filter name - * - * @param callback $function_name - */ - public function _get_filter_name($function_name) - { - if (is_array($function_name)) { - $_class_name = (is_object($function_name[0]) ? - get_class($function_name[0]) : $function_name[0]); - return $_class_name . '_' . $function_name[1]; - } else { - return $function_name; - } - } - + /** * Adds directory of plugin files * @@ -629,34 +610,10 @@ class Smarty extends Smarty_Internal_Data { */ function addPluginsDir($plugins_dir) { - $this->plugins_dir = array_merge((array)$this->plugins_dir, (array)$plugins_dir); - $this->plugins_dir = array_unique($this->plugins_dir); + $this->plugins_dir = array_unique(array_merge((array)$this->plugins_dir, (array)$plugins_dir)); return; } - /** - * Returns a single or all global variables - * - * @param object $smarty - * @param string $varname variable name or null - * @return string variable value or or array of variables - */ - function getGlobal($varname = null) - { - if (isset($varname)) { - if (isset($this->global_tpl_vars[$varname])) { - return $this->global_tpl_vars[$varname]->value; - } else { - return ''; - } - } else { - $_result = array(); - foreach ($this->global_tpl_vars AS $key => $var) { - $_result[$key] = $var->value; - } - return $_result; - } - } /** * return a reference to a registered object @@ -675,6 +632,7 @@ class Smarty extends Smarty_Internal_Data { return $this->registered_objects[$name][0]; } + /** * return name of debugging template * @@ -697,29 +655,23 @@ class Smarty extends Smarty_Internal_Data { } /** - * lazy loads (valid) property objects - * - * @param string $name property name + * clean up properties on cloned object */ - public function __get($name) + public function __clone() { - if (in_array($name, array('register', 'unregister', 'utility', 'cache'))) { - $class = "Smarty_Internal_" . ucfirst($name); - $this->$name = new $class($this); - return $this->$name; - } else if ($name == '_version') { - // Smarty 2 BC - $this->_version = self::SMARTY_VERSION; - return $this->_version; - } - return null; - } + // clear config vars + $this->config_vars = array(); + // clear assigned tpl vars + $this->tpl_vars = array(); + // clear objects for external methods + unset($this->register); + unset($this->filter); + } + /** - * Takes unknown class methods and lazy loads sysplugin files for them - * class name format: Smarty_Method_MethodName - * plugin filename format: method.methodname.php - * + * Handle unknown class methods + * * @param string $name unknown methode name * @param array $args aurgument array */ @@ -728,11 +680,6 @@ class Smarty extends Smarty_Internal_Data { static $camel_func; if (!isset($camel_func)) $camel_func = create_function('$c', 'return "_" . strtolower($c[1]);'); - // PHP4 call to constructor? - if (strtolower($name) == 'smarty') { - throw new SmartyException('Please use parent::__construct() to call parent constuctor'); - return false; - } // see if this is a set/get for a property $first3 = strtolower(substr($name, 0, 3)); if (in_array($first3, array('set', 'get')) && substr($name, 3, 1) !== '_') { @@ -749,13 +696,37 @@ class Smarty extends Smarty_Internal_Data { return $this->$property_name; else return $this->$property_name = $args[0]; + } + // Smarty Backward Compatible wrapper + if (strpos($name,'_') !== false) { + if (!isset($this->wrapper)) { + $this->wrapper = new Smarty_Internal_Wrapper($this); + } + return $this->wrapper->convert($name, $args); + } + // external Smarty methods ? + foreach(array('filter','register') as $external) { + if (method_exists("Smarty_Internal_{$external}",$name)) { + if (!isset($this->$external)) { + $class = "Smarty_Internal_{$external}"; + $this->$external = new $class($this); + } + return call_user_func_array(array($this->$external,$name), $args); + } + } + if (in_array($name,array('clearCompiledTemplate','compileAllTemplates','compileAllConfig','testInstall','getTags'))) { + if (!isset($this->utility)) { + $this->utility = new Smarty_Internal_Utility($this); + } + return call_user_func_array(array($this->utility,$name), $args); + } + // PHP4 call to constructor? + if (strtolower($name) == 'smarty') { + throw new SmartyException('Please use parent::__construct() to call parent constuctor'); + return false; } - // Smarty Backward Compatible wrapper - if (!isset($this->wrapper)) { - $this->wrapper = new Smarty_Internal_Wrapper($this); - } - return $this->wrapper->convert($name, $args); - } + throw new SmartyException("Call of unknown function '$name'."); + } } /** diff --git a/libs/plugins/block.textformat.php b/libs/plugins/block.textformat.php index 733f6e23..5d69c151 100644 --- a/libs/plugins/block.textformat.php +++ b/libs/plugins/block.textformat.php @@ -67,7 +67,7 @@ function smarty_block_textformat($params, $content, $smarty, &$repeat, $template break; default: - $smarty->trigger_error("textformat: unknown attribute '$_key'"); + trigger_error("textformat: unknown attribute '$_key'"); } } diff --git a/libs/plugins/function.cycle.php b/libs/plugins/function.cycle.php index 76ff0c6b..5dd16678 100644 --- a/libs/plugins/function.cycle.php +++ b/libs/plugins/function.cycle.php @@ -55,7 +55,7 @@ function smarty_function_cycle($params, $smarty, $template) if (!in_array('values', array_keys($params))) { if(!isset($cycle_vars[$name]['values'])) { - $smarty->trigger_error("cycle: missing 'values' parameter"); + trigger_error("cycle: missing 'values' parameter"); return; } } else { diff --git a/libs/sysplugins/smarty_internal_cache.php b/libs/sysplugins/smarty_internal_cache.php deleted file mode 100644 index 6e40c31b..00000000 --- a/libs/sysplugins/smarty_internal_cache.php +++ /dev/null @@ -1,102 +0,0 @@ - -* @author Uwe Tews -* @package Smarty -* @subpackage PluginsInternal -* @version 3-SVN$Rev: 3286 $ -*/ - -class Smarty_Internal_Cache { - - protected $smarty; - - function __construct($smarty) { - $this->smarty = $smarty; - } - - /** - * Loads cache resource. - * - * @return object of cache resource - */ - public function loadResource($type = null) { - if (!isset($type)) { - $type = $this->smarty->caching_type; - } - // already loaded? - if (isset($this->smarty->cache_resource_objects[$type])) { - return $this->smarty->cache_resource_objects[$type]; - } - if (in_array($type, $this->smarty->cache_resource_types)) { - $cache_resource_class = 'Smarty_Internal_CacheResource_' . ucfirst($type); - return $this->smarty->cache_resource_objects[$type] = new $cache_resource_class($this->smarty); - } - else { - // try plugins dir - $cache_resource_class = 'Smarty_CacheResource_' . ucfirst($type); - if ($this->smarty->loadPlugin($cache_resource_class)) { - return $this->smarty->cache_resource_objects[$type] = new $cache_resource_class($this->smarty); - } - else { - throw new SmartyException("Unable to load cache resource '{$type}'"); - } - } - } - - /** - * Empty cache folder - * - * @param integer $exp_time expiration time - * @param string $type resource type - * @return integer number of cache files deleted - */ - function clearAll($exp_time = null, $type = null) - { - return $this->loadResource($type)->clearAll($exp_time); - } - - /** - * Empty cache for a specific template - * - * @param string $template_name template name - * @param string $cache_id cache id - * @param string $compile_id compile id - * @param integer $exp_time expiration time - * @param string $type resource type - * @return integer number of cache files deleted - */ - function clear($template_name, $cache_id = null, $compile_id = null, $exp_time = null, $type = null) - { - // load cache resource - $cacheResource = $this->loadResource($type); - - return $cacheResource->clear($template_name, $cache_id, $compile_id, $exp_time); - } - -} diff --git a/libs/sysplugins/smarty_internal_compile_append.php b/libs/sysplugins/smarty_internal_compile_append.php index c9a05c33..8b6c4ee8 100644 --- a/libs/sysplugins/smarty_internal_compile_append.php +++ b/libs/sysplugins/smarty_internal_compile_append.php @@ -1,68 +1,49 @@ compiler = $compiler; - $this->required_attributes = array('var', 'value'); - $this->optional_attributes = array('scope', 'nocache', 'index'); - - $_nocache = 'null'; - $_scope = 'null'; - // check for nocache attribute before _get_attributes because - // it shall not controll caching of the compiled code, but is a parameter - if (isset($args['nocache'])) { - if ($args['nocache'] == 'true') { - $this->compiler->tag_nocache = true; - } - unset($args['nocache']); - } - // check and get attributes - $_attr = $this->_get_attributes($args); - - if ($this->compiler->tag_nocache) { - $_nocache = 'true'; - // create nocache var to make it know for further compiling - $compiler->template->tpl_vars[trim($_attr['var'],"'")] = new Smarty_variable(null, true); - } - - if (isset($_attr['scope'])) { - $_attr['scope'] = trim($_attr['scope'], "'\""); - if ($_attr['scope'] == 'parent') { - $_scope = SMARTY_PARENT_SCOPE; - } elseif ($_attr['scope'] == 'root') { - $_scope = SMARTY_ROOT_SCOPE; - } elseif ($_attr['scope'] == 'global') { - $_scope = SMARTY_GLOBAL_SCOPE; - } - } - // compiled output + $_attr = $this->_get_attributes($args); + // map to compile assign attributes if (isset($_attr['index'])) { - return "append($_attr[var],array($_attr[index] => $_attr[value]),true,$_nocache,$_scope);?>"; + $_params['smarty_internal_index'] = '[' . $_attr['index'] . ']'; + unset($_attr['index']); } else { - return "append($_attr[var],$_attr[value],false,$_nocache,$_scope);?>"; + $_params['smarty_internal_index'] = '[]'; + } + $_new_attr = array(); + foreach ($_attr as $key => $value) { + $_new_attr[] = array($key => $value); } + // call compile assign + return parent::compile($_new_attr, $compiler, $_params); } } diff --git a/libs/sysplugins/smarty_internal_compile_assign.php b/libs/sysplugins/smarty_internal_compile_assign.php index bdbefae3..b7dab7c4 100644 --- a/libs/sysplugins/smarty_internal_compile_assign.php +++ b/libs/sysplugins/smarty_internal_compile_assign.php @@ -19,47 +19,41 @@ class Smarty_Internal_Compile_Assign extends Smarty_Internal_CompileBase { * * @param array $args array with attributes from parser * @param object $compiler compiler object + * @param array $parameter array with compilation parameter * @return string compiled code */ - public function compile($args, $compiler) + public function compile($args, $compiler, $parameter) { $this->compiler = $compiler; $this->required_attributes = array('var', 'value'); - $this->optional_attributes = array('scope', 'nocache', 'smarty_internal_index'); - + $this->shorttag_order = array('var', 'value'); + $this->optional_attributes = array('scope'); $_nocache = 'null'; $_scope = 'null'; - // check for nocache attribute before _get_attributes because - // it shall not controll caching of the compiled code, but is a parameter - if (isset($args['nocache'])) { - if ($args['nocache'] == 'true') { - $this->compiler->tag_nocache = true; - } - unset($args['nocache']); - } - // check and get attributes - $_attr = $this->_get_attributes($args); - - if ($this->compiler->tag_nocache) { + $_attr = $this->_get_attributes($args); + // nocache ? + if ($this->compiler->tag_nocache || $this->compiler->nocache) { $_nocache = 'true'; // create nocache var to make it know for further compiling - $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 if (isset($_attr['scope'])) { $_attr['scope'] = trim($_attr['scope'], "'\""); if ($_attr['scope'] == 'parent') { - $_scope = SMARTY_PARENT_SCOPE; + $_scope = Smarty::SCOPE_PARENT; } elseif ($_attr['scope'] == 'root') { - $_scope = SMARTY_ROOT_SCOPE; + $_scope = Smarty::SCOPE_ROOT; } elseif ($_attr['scope'] == 'global') { - $_scope = SMARTY_GLOBAL_SCOPE; + $_scope = Smarty::SCOPE_GLOBAL; + } else { + $this->compiler->trigger_template_error('illegal value for "scope" attribute', $this->compiler->lex->taglineno); } } // compiled output - if (isset($_attr['smarty_internal_index'])) { - return "tpl_vars[$_attr[var]]) || !is_array(\$_smarty_tpl->tpl_vars[$_attr[var]]->value)) \$_smarty_tpl->createLocalArrayVariable($_attr[var], $_nocache, $_scope);\n\$_smarty_tpl->tpl_vars[$_attr[var]]->value$_attr[smarty_internal_index] = $_attr[value];?>"; + if (isset($parameter['smarty_internal_index'])) { + return "tpl_vars[$_attr[var]]) || !is_array(\$_smarty_tpl->tpl_vars[$_attr[var]]->value)) \$_smarty_tpl->createLocalArrayVariable($_attr[var], $_nocache, $_scope);\n\$_smarty_tpl->tpl_vars[$_attr[var]]->value$parameter[smarty_internal_index] = $_attr[value];?>"; } else { return "tpl_vars[$_attr[var]] = new Smarty_variable($_attr[value], $_nocache, $_scope);?>"; } diff --git a/libs/sysplugins/smarty_internal_compile_block.php b/libs/sysplugins/smarty_internal_compile_block.php index 0a0b48d3..2cc03ee7 100644 --- a/libs/sysplugins/smarty_internal_compile_block.php +++ b/libs/sysplugins/smarty_internal_compile_block.php @@ -13,6 +13,9 @@ * Smarty Internal Plugin Compile Block Class */ class Smarty_Internal_Compile_Block extends Smarty_Internal_CompileBase { + // attribute definitions + public $required_attributes = array('name'); + public $shorttag_order = array('name'); /** * Compiles code for the {block} tag * @@ -23,16 +26,12 @@ class Smarty_Internal_Compile_Block extends Smarty_Internal_CompileBase { public function compile($args, $compiler) { $this->compiler = $compiler; - $this->required_attributes = array('name'); - $this->optional_attributes = array('assign', 'nocache'); // check and get attributes $_attr = $this->_get_attributes($args); - $save = array($_attr, $compiler->parser->current_buffer, $this->compiler->nocache, $this->compiler->smarty->merge_compiled_includes); + $save = array($_attr, $compiler->parser->current_buffer, $this->compiler->nocache, $this->compiler->smarty->merge_compiled_includes, $compiler->smarty->inheritance); $this->_open_tag('block', $save); - if (isset($_attr['nocache'])) { - if ($_attr['nocache'] == 'true') { - $compiler->nocache = true; - } + if ($_attr['nocache'] == true) { + $compiler->nocache = true; } // set flag for {block} tag $compiler->smarty->inheritance = true; @@ -43,7 +42,105 @@ class Smarty_Internal_Compile_Block extends Smarty_Internal_CompileBase { $compiler->has_code = false; return true; } -} + + + static function saveBlockData($block_content, $block_tag, $template, $filepath) + { + $_rdl = preg_quote($template->smarty->right_delimiter); + $_ldl = preg_quote($template->smarty->left_delimiter); + + if (0 == preg_match("!({$_ldl}block\s+)(name=)?(\w+|'\w+'|\"\w+\")(\s*?)?((append|prepend|nocache)(=true)?)?(\s*{$_rdl})!", $block_tag, $_match)) { + $template->compiler_object->trigger_template_error('Illegal {block} tag syntax'); + } else { + $_name = trim($_match[3], '\'"'); + // replace {$smarty.block.child} + if (strpos($block_content, $template->smarty->left_delimiter . '$smarty.block.child' . $template->smarty->right_delimiter) !== false) { + if (isset($template->block_data[$_name])) { + $block_content = str_replace($template->smarty->left_delimiter . '$smarty.block.child' . $template->smarty->right_delimiter, + $template->block_data[$_name]['source'], $block_content); + unset($template->block_data[$_name]); + } else { + $block_content = str_replace($template->smarty->left_delimiter . '$smarty.block.child' . $template->smarty->right_delimiter, + '', $block_content); + } + } + if (isset($template->block_data[$_name])) { + if (strpos($template->block_data[$_name]['source'], '%%%%SMARTY_PARENT%%%%') !== false) { + $template->block_data[$_name]['source'] = + str_replace('%%%%SMARTY_PARENT%%%%', $block_content, $template->block_data[$_name]['source']); + } elseif ($template->block_data[$_name]['mode'] == 'prepend') { + $template->block_data[$_name]['source'] .= $block_content; + } elseif ($template->block_data[$_name]['mode'] == 'append') { + $template->block_data[$_name]['source'] = $block_content . $template->block_data[$_name]['source']; + } + } else { + $template->block_data[$_name]['source'] = $block_content; + } + if ($_match[6] == 'append') { + $template->block_data[$_name]['mode'] = 'append'; + } elseif ($_match[6] == 'prepend') { + $template->block_data[$_name]['mode'] = 'prepend'; + } else { + $template->block_data[$_name]['mode'] = 'replace'; + } + $template->block_data[$_name]['file'] = $filepath; + } + } + + static function compileChildBlock ($compiler, $_name = null) + { + $_output = ''; + // if called by {$smarty.block.child} we must search the name of enclosing {block} + if ($_name == null) { + $stack_count = count($compiler->_tag_stack); + while (--$stack_count >= 0) { + if ($compiler->_tag_stack[$stack_count][0] == 'block') { + $_name = trim($compiler->_tag_stack[$stack_count][1][0]['name'] ,"'"); + break; + } + } + } + if ($_name == null) { + $compiler->trigger_template_error('{$smarty.block.child} used out of context'); + } + $_tpl = new Smarty_Internal_template ('eval:' . $compiler->template->block_data[$_name]['source'], $compiler->smarty, $compiler->template, $compiler->template->cache_id, + $compiler->template->compile_id = null, $compiler->template->caching, $compiler->template->cache_lifetime); + $_tpl->properties['nocache_hash'] = $compiler->template->properties['nocache_hash']; + $_tpl->template_filepath = $compiler->template->block_data[$_name]['file']; + if ($compiler->nocache) { + $_tpl->forceNocache = 2; + } else { + $_tpl->forceNocache = 1; + } + $_tpl->suppressHeader = true; + $_tpl->suppressFileDependency = true; + if (strpos($compiler->template->block_data[$_name]['source'], '%%%%SMARTY_PARENT%%%%') !== false) { + $_output = str_replace('%%%%SMARTY_PARENT%%%%', $compiler->parser->current_buffer->to_smarty_php(), $_tpl->getCompiledTemplate()); + } elseif ($compiler->template->block_data[$_name]['mode'] == 'prepend') { + $_output = $_tpl->getCompiledTemplate() . $compiler->parser->current_buffer->to_smarty_php(); + } elseif ($compiler->template->block_data[$_name]['mode'] == 'append') { + $_output = $compiler->parser->current_buffer->to_smarty_php() . $_tpl->getCompiledTemplate(); + } elseif (!empty($compiler->template->block_data[$_name])) { + $_output = $_tpl->getCompiledTemplate(); + } + $compiler->template->properties['file_dependency'] = array_merge($compiler->template->properties['file_dependency'], $_tpl->properties['file_dependency']); + $compiler->template->properties['function'] = array_merge($compiler->template->properties['function'], $_tpl->properties['function']); + if ($_tpl->has_nocache_code) { + $compiler->template->has_nocache_code = true; + } + foreach($_tpl->required_plugins as $code => $tmp1) { + foreach($tmp1 as $name => $tmp) { + foreach($tmp as $type => $data) { + $compiler->template->required_plugins[$code][$name][$type] = $data; + } + } + } + unset($_tpl); + $compiler->template->block_data[$_name]['compiled'] = true; + return $_output; + } + +} /** * Smarty Internal Plugin Compile BlockClose Class @@ -62,61 +159,23 @@ class Smarty_Internal_Compile_Blockclose extends Smarty_Internal_CompileBase { $this->smarty = $compiler->smarty; $this->compiler->has_code = true; // check and get attributes - $this->optional_attributes = array('name'); $_attr = $this->_get_attributes($args); - $saved_data = $this->_close_tag(array('block')); - // if name does match to opening tag - if (isset($_attr['name']) && $saved_data[0]['name'] != $_attr['name']) { - $this->compiler->trigger_template_error('mismatching name attributes "' . $saved_data[0]['name'] . '" and "' . $_attr['name'] . '"'); - } + $saved_data = $this->_close_tag(array('block')); $_name = trim($saved_data[0]['name'], "\"'"); - if (isset($compiler->template->block_data[$_name])) { -// $_tpl = $this->smarty->createTemplate('eval:' . $compiler->template->block_data[$_name]['source'], null, null, $compiler->template); - $_tpl = new Smarty_Internal_template ('eval:' . $compiler->template->block_data[$_name]['source'], $this->smarty, $compiler->template, $compiler->template->cache_id, - $compiler->template->compile_id = null, $compiler->template->caching, $compiler->template->cache_lifetime); - $_tpl->properties['nocache_hash'] = $compiler->template->properties['nocache_hash']; - $_tpl->template_filepath = $compiler->template->block_data[$_name]['file']; - if ($compiler->nocache) { - $_tpl->forceNocache = 2; - } else { - $_tpl->forceNocache = 1; - } - $_tpl->suppressHeader = true; - $_tpl->suppressFileDependency = true; - if (strpos($compiler->template->block_data[$_name]['source'], '%%%%SMARTY_PARENT%%%%') !== false) { - $_output = str_replace('%%%%SMARTY_PARENT%%%%', $compiler->parser->current_buffer->to_smarty_php(), $_tpl->getCompiledTemplate()); - } elseif ($compiler->template->block_data[$_name]['mode'] == 'prepend') { - $_output = $_tpl->getCompiledTemplate() . $compiler->parser->current_buffer->to_smarty_php(); - } elseif ($compiler->template->block_data[$_name]['mode'] == 'append') { - $_output = $compiler->parser->current_buffer->to_smarty_php() . $_tpl->getCompiledTemplate(); - } elseif (!empty($compiler->template->block_data[$_name])) { - $_output = $_tpl->getCompiledTemplate(); - } - $compiler->template->properties['file_dependency'] = array_merge($compiler->template->properties['file_dependency'], $_tpl->properties['file_dependency']); - $compiler->template->properties['function'] = array_merge($compiler->template->properties['function'], $_tpl->properties['function']); - if ($_tpl->has_nocache_code) { - $compiler->template->has_nocache_code = true; - } - foreach($_tpl->required_plugins as $code => $tmp1) { - foreach($tmp1 as $name => $tmp) { - foreach($tmp as $type => $data) { - $compiler->template->required_plugins[$code][$name][$type] = $data; - } - } - } - unset($_tpl); + if (isset($compiler->template->block_data[$_name]) && !isset($compiler->template->block_data[$_name]['compiled'])) { + $_output = Smarty_Internal_Compile_Block::compileChildBlock($compiler, $_name); } else { $_output = $compiler->parser->current_buffer->to_smarty_php(); + unset ($compiler->template->block_data[$_name]['compiled']); } + // reset flags $compiler->parser->current_buffer = $saved_data[1]; $compiler->nocache = $saved_data[2]; $compiler->smarty->merge_compiled_includes = $saved_data[3]; + $compiler->smarty->inheritance = $saved_data[4]; // $_output content has already nocache code processed $compiler->suppressNocacheProcessing = true; - // reset flag - $compiler->smarty->inheritance = false; return $_output; } } - ?> \ No newline at end of file diff --git a/libs/sysplugins/smarty_internal_compile_break.php b/libs/sysplugins/smarty_internal_compile_break.php index 60e856df..2e57da40 100644 --- a/libs/sysplugins/smarty_internal_compile_break.php +++ b/libs/sysplugins/smarty_internal_compile_break.php @@ -13,21 +13,30 @@ * Smarty Internal Plugin Compile Break Class */ class Smarty_Internal_Compile_Break extends Smarty_Internal_CompileBase { + // attribute definitions + public $optional_attributes = array('levels'); + public $shorttag_order = array('levels'); + + /** * Compiles code for the {break} tag * * @param array $args array with attributes from parser * @param object $compiler compiler object + * @param array $parameter array with compilation parameter * @return string compiled code */ - public function compile($args, $compiler) - { + public function compile($args, $compiler, $parameter) + { $this->compiler = $compiler; $this->smarty = $compiler->smarty; - $this->optional_attributes = array('levels'); // check and get attributes $_attr = $this->_get_attributes($args); + if ($_attr['nocache'] === true) { + $this->compiler->trigger_template_error('nocache option not allowed', $this->compiler->lex->taglineno); + } + if (isset($_attr['levels'])) { if (!is_numeric($_attr['levels'])) { $this->compiler->trigger_template_error('level attribute must be a numeric constant', $this->compiler->lex->taglineno); diff --git a/libs/sysplugins/smarty_internal_compile_call.php b/libs/sysplugins/smarty_internal_compile_call.php index e63bd1c8..8d63b7c7 100644 --- a/libs/sysplugins/smarty_internal_compile_call.php +++ b/libs/sysplugins/smarty_internal_compile_call.php @@ -14,28 +14,32 @@ * Smarty Internal Plugin Compile Function_Call Class */ class Smarty_Internal_Compile_Call extends Smarty_Internal_CompileBase { + // attribute definitions + public $required_attributes = array('name'); + public $shorttag_order = array('name'); + public $optional_attributes = array('_any'); + /** * Compiles the calls of user defined tags defined by {function} * * @param array $args array with attributes from parser * @param object $compiler compiler object + * @param array $parameter array with compilation parameter * @return string compiled code */ public function compile($args, $compiler) { $this->compiler = $compiler; $this->smarty = $compiler->smarty; - $this->required_attributes = array('name'); - $this->optional_attributes = array('_any'); // check and get attributes $_attr = $this->_get_attributes($args); - // save posible attributes + // save possible attributes if (isset($_attr['assign'])) { // output will be stored in a smarty variable instead of beind displayed $_assign = $_attr['assign']; } $_name = trim($_attr['name'], "'\""); - unset($_attr['name'], $_attr['assign']); + unset($_attr['name'], $_attr['assign'], $_attr['nocache']); // set flag (compiled code of {function} must be included in cache file if ($compiler->nocache || $compiler->tag_nocache) { $_nocache = 'true'; @@ -49,7 +53,8 @@ class Smarty_Internal_Compile_Call extends Smarty_Internal_CompileBase { } else { $_paramsArray[] = "'$_key'=>$_value"; } - } + } + if (false) { if (isset($compiler->template->properties['function'][$_name]['parameter'])) { foreach ($compiler->template->properties['function'][$_name]['parameter'] as $_key => $_value) { if (!isset($_attr[$_key])) { @@ -70,15 +75,16 @@ class Smarty_Internal_Compile_Call extends Smarty_Internal_CompileBase { } } } - } + } + } $_params = 'array(' . implode(",", $_paramsArray) . ')'; $_hash = str_replace('-','_',$compiler->template->properties['nocache_hash']); // was there an assign attribute if (isset($_assign)) { if ($compiler->template->caching) { - $_output = "\$_smarty_tpl->assign({$_assign},Smarty_Internal_Function_Call_Handler::call ('{$_name}',\$_smarty_tpl,{$_params},'{$_hash}',{$_nocache}));?>\n"; + $_output = "assign({$_assign}, ob_get_clean());?>\n"; } else { - $_output = "\$_smarty_tpl->assign({$_assign},smarty_template_function_{$_name}(\$_smarty_tpl,{$_params}));?>\n"; + $_output = "assign({$_assign}, ob_get_clean());?>\n"; } } else { if ($compiler->template->caching) { diff --git a/libs/sysplugins/smarty_internal_compile_capture.php b/libs/sysplugins/smarty_internal_compile_capture.php index 96589cdd..2583aadc 100644 --- a/libs/sysplugins/smarty_internal_compile_capture.php +++ b/libs/sysplugins/smarty_internal_compile_capture.php @@ -13,6 +13,10 @@ * Smarty Internal Plugin Compile Capture Class */ class Smarty_Internal_Compile_Capture extends Smarty_Internal_CompileBase { + // attribute definitions + public $shorttag_order = array('name'); + public $optional_attributes = array('name', 'assign', 'append'); + /** * Compiles code for the {capture} tag * @@ -23,7 +27,6 @@ class Smarty_Internal_Compile_Capture extends Smarty_Internal_CompileBase { public function compile($args, $compiler) { $this->compiler = $compiler; - $this->optional_attributes = array('name', 'assign', 'append'); // check and get attributes $_attr = $this->_get_attributes($args); @@ -31,8 +34,9 @@ class Smarty_Internal_Compile_Capture extends Smarty_Internal_CompileBase { $assign = isset($_attr['assign']) ? $_attr['assign'] : null; $append = isset($_attr['append']) ? $_attr['append'] : null; - $this->compiler->_capture_stack[] = array($buffer, $assign, $append); - + $this->compiler->_capture_stack[] = array($buffer, $assign, $append, $this->compiler->nocache); + // maybe nocache because of nocache variables + $this->compiler->nocache = $this->compiler->nocache | $this->compiler->tag_nocache; $_output = ""; return $_output; @@ -55,8 +59,12 @@ class Smarty_Internal_Compile_CaptureClose extends Smarty_Internal_CompileBase { $this->compiler = $compiler; // check and get attributes $_attr = $this->_get_attributes($args); + // must endblock be nocache? + if ($this->compiler->nocache) { + $this->compiler->tag_nocache = true; + } - list($buffer, $assign, $append) = array_pop($this->compiler->_capture_stack); + list($buffer, $assign, $append, $this->compiler->nocache) = array_pop($this->compiler->_capture_stack); $_output = "compiler = $compiler; - $this->required_attributes = array('file'); - $this->optional_attributes = array('section', 'scope'); // check and get attributes - $_attr = $this->_get_attributes($args); + $_attr = $this->_get_attributes($args); + + if ($_attr['nocache'] === true) { + $this->compiler->trigger_template_error('nocache option not allowed', $this->compiler->lex->taglineno); + } + + // save posible attributes $conf_file = $_attr['file']; if (isset($_attr['section'])) { @@ -35,13 +44,18 @@ class Smarty_Internal_Compile_Config_Load extends Smarty_Internal_CompileBase { } else { $section = 'null'; } - $scope = '$_smarty_tpl->smarty'; + $scope = '$_smarty_tpl'; + // scope setup if (isset($_attr['scope'])) { $_attr['scope'] = trim($_attr['scope'], "'\""); - if ($_attr['scope'] == 'local') { - $scope = '$_smarty_tpl'; - } elseif ($_attr['scope'] == 'parent') { + if ($_attr['scope'] == 'parent') { $scope = '$_smarty_tpl->parent'; + } elseif ($_attr['scope'] == 'local') { + $scope = '$_smarty_tpl'; + } elseif ($_attr['scope'] == 'global') { + $scope = '$_smarty_tpl->smarty'; + } else { + $this->compiler->trigger_template_error('illegal value for "scope" attribute', $this->compiler->lex->taglineno); } } // create config object diff --git a/libs/sysplugins/smarty_internal_compile_continue.php b/libs/sysplugins/smarty_internal_compile_continue.php index 3c15e8f1..6fce81af 100644 --- a/libs/sysplugins/smarty_internal_compile_continue.php +++ b/libs/sysplugins/smarty_internal_compile_continue.php @@ -13,21 +13,29 @@ * Smarty Internal Plugin Compile Continue Class */ class Smarty_Internal_Compile_Continue extends Smarty_Internal_CompileBase { + // attribute definitions + public $optional_attributes = array('levels'); + public $shorttag_order = array('levels'); + /** * Compiles code for the {continue} tag * * @param array $args array with attributes from parser * @param object $compiler compiler object + * @param array $parameter array with compilation parameter * @return string compiled code */ - public function compile($args, $compiler) - { + public function compile($args, $compiler, $parameter) + { { $this->compiler = $compiler; $this->smarty = $compiler->smarty; - $this->optional_attributes = array('levels'); // check and get attributes $_attr = $this->_get_attributes($args); + if ($_attr['nocache'] === true) { + $this->compiler->trigger_template_error('nocache option not allowed', $this->compiler->lex->taglineno); + } + if (isset($_attr['levels'])) { if (!is_numeric($_attr['levels'])) { $this->compiler->trigger_template_error('level attribute must be a numeric constant', $this->compiler->lex->taglineno); diff --git a/libs/sysplugins/smarty_internal_compile_debug.php b/libs/sysplugins/smarty_internal_compile_debug.php index d6d8905f..69867fcd 100644 --- a/libs/sysplugins/smarty_internal_compile_debug.php +++ b/libs/sysplugins/smarty_internal_compile_debug.php @@ -26,8 +26,11 @@ class Smarty_Internal_Compile_Debug extends Smarty_Internal_CompileBase { // check and get attributes $_attr = $this->_get_attributes($args); + // compile always as nocache + $this->compiler->tag_nocache = true; + // display debug template - $_output = "smarty->loadPlugin('Smarty_Internal_Debug'); Smarty_Internal_Debug::display_debug(\$_smarty_tpl->smarty); ?>"; + $_output = "smarty->plugins_dir); Smarty_Internal_Debug::display_debug(\$_smarty_tpl->smarty); ?>"; return $_output; } } diff --git a/libs/sysplugins/smarty_internal_compile_eval.php b/libs/sysplugins/smarty_internal_compile_eval.php index 17be1f80..aa3c2580 100644 --- a/libs/sysplugins/smarty_internal_compile_eval.php +++ b/libs/sysplugins/smarty_internal_compile_eval.php @@ -13,6 +13,10 @@ * Smarty Internal Plugin Compile Eval Class */ class Smarty_Internal_Compile_Eval extends Smarty_Internal_CompileBase { + public $required_attributes = array('var'); + public $optional_attributes = array('assign'); + public $shorttag_order = array('var','assign'); + /** * Compiles code for the {eval} tag * diff --git a/libs/sysplugins/smarty_internal_compile_extends.php b/libs/sysplugins/smarty_internal_compile_extends.php index bdb9debf..3d3ac797 100644 --- a/libs/sysplugins/smarty_internal_compile_extends.php +++ b/libs/sysplugins/smarty_internal_compile_extends.php @@ -14,6 +14,10 @@ * Smarty Internal Plugin Compile extend Class */ class Smarty_Internal_Compile_Extends extends Smarty_Internal_CompileBase { + // attribute definitions + public $required_attributes = array('file'); + public $shorttag_order = array('file'); + /** * Compiles code for the {extends} tag * @@ -27,9 +31,13 @@ class Smarty_Internal_Compile_Extends extends Smarty_Internal_CompileBase { $this->smarty = $compiler->smarty; $this->_rdl = preg_quote($this->smarty->right_delimiter); $this->_ldl = preg_quote($this->smarty->left_delimiter); - $this->required_attributes = array('file'); + $filepath = $compiler->template->getTemplateFilepath(); // check and get attributes $_attr = $this->_get_attributes($args); + if ($_attr['nocache'] === true) { + $this->compiler->trigger_template_error('nocache option not allowed', $this->compiler->lex->taglineno); + } + $_smarty_tpl = $compiler->template; $include_file = null; eval('$include_file = ' . $_attr['file'] . ';'); @@ -44,7 +52,7 @@ class Smarty_Internal_Compile_Extends extends Smarty_Internal_CompileBase { if (isset($compiler->template->properties['file_dependency'][$template_sha1])) { $this->compiler->trigger_template_error("illegal recursive call of \"{$include_file}\"",$compiler->lex->line-1); } - $compiler->template->properties['file_dependency'][$template_sha1] = array($_template->getTemplateFilepath(), $_template->getTemplateTimestamp()); + $compiler->template->properties['file_dependency'][$template_sha1] = array($_template->getTemplateFilepath(), $_template->getTemplateTimestamp(),$_template->resource_type); $_content = substr($compiler->template->template_source,$compiler->lex->counter-1); if (preg_match_all("!({$this->_ldl}block\s(.+?){$this->_rdl})!", $_content, $s) != preg_match_all("!({$this->_ldl}/block{$this->_rdl})!", $_content, $c)) { @@ -66,7 +74,7 @@ class Smarty_Internal_Compile_Extends extends Smarty_Internal_CompileBase { } $_block_content = str_replace($this->smarty->left_delimiter . '$smarty.block.parent' . $this->smarty->right_delimiter, '%%%%SMARTY_PARENT%%%%', substr($_content, $_result[0][$_start][1] + strlen($_result[0][$_start][0]), $_result[0][$_start + $_end][1] - $_result[0][$_start][1] - + strlen($_result[0][$_start][0]))); - $this->saveBlockData($_block_content, $_result[0][$_start][0], $compiler->template); + Smarty_Internal_Compile_Block::saveBlockData($_block_content, $_result[0][$_start][0], $compiler->template, $filepath); $_start = $_start + $_end + 1; } $compiler->template->template_source = $_template->getTemplateSource(); @@ -75,45 +83,5 @@ class Smarty_Internal_Compile_Extends extends Smarty_Internal_CompileBase { return ''; } - protected function saveBlockData($block_content, $block_tag, $template) - { - if (0 == preg_match("!(.?)(name=)(.*?)(?=(\s|{$this->_rdl}))!", $block_tag, $_match)) { - $this->compiler->trigger_template_error("\"" . $block_tag . "\" missing name attribute"); - } else { - $_name = trim($_match[3], '\'"'); - // replace {$smarty.block.child} - if (strpos($block_content, $this->smarty->left_delimiter . '$smarty.block.child' . $this->smarty->right_delimiter) !== false) { - if (isset($template->block_data[$_name])) { - $block_content = str_replace($this->smarty->left_delimiter . '$smarty.block.child' . $this->smarty->right_delimiter, - $template->block_data[$_name]['source'], $block_content); - unset($template->block_data[$_name]); - } else { - $block_content = str_replace($this->smarty->left_delimiter . '$smarty.block.child' . $this->smarty->right_delimiter, - '', $block_content); - } - } - if (isset($template->block_data[$_name])) { - if (strpos($template->block_data[$_name]['source'], '%%%%SMARTY_PARENT%%%%') !== false) { - $template->block_data[$_name]['source'] = - str_replace('%%%%SMARTY_PARENT%%%%', $block_content, $template->block_data[$_name]['source']); - } elseif ($template->block_data[$_name]['mode'] == 'prepend') { - $template->block_data[$_name]['source'] .= $block_content; - } elseif ($template->block_data[$_name]['mode'] == 'append') { - $template->block_data[$_name]['source'] = $block_content . $template->block_data[$_name]['source']; - } - } else { - $template->block_data[$_name]['source'] = $block_content; - } - if (preg_match('/(.?)(append)(.*)/', $block_tag, $_match) != 0) { - $template->block_data[$_name]['mode'] = 'append'; - } elseif (preg_match('/(.?)(prepend)(.*)/', $block_tag, $_match) != 0) { - $template->block_data[$_name]['mode'] = 'prepend'; - } else { - $template->block_data[$_name]['mode'] = 'replace'; - } - $template->block_data[$_name]['file'] = $template->getTemplateFilepath(); - } - } } - ?> \ No newline at end of file diff --git a/libs/sysplugins/smarty_internal_compile_for.php b/libs/sysplugins/smarty_internal_compile_for.php index 164b298a..2e5d0a11 100644 --- a/libs/sysplugins/smarty_internal_compile_for.php +++ b/libs/sysplugins/smarty_internal_compile_for.php @@ -29,32 +29,33 @@ class Smarty_Internal_Compile_For extends Smarty_Internal_CompileBase { * * @param array $args array with attributes from parser * @param object $compiler compiler object + * @param array $parameter array with compilation parameter * @return string compiled code */ - public function compile($args, $compiler) + public function compile($args, $compiler, $parameter) { $this->compiler = $compiler; - // {for $x=0; $x<$y; $x++} syntax - if (isset($args['ifexp'])) { - $this->required_attributes = array('ifexp', 'start', 'loop', 'varloop'); + if ($parameter == 0) { + $this->required_attributes = array('start','to'); + $this->optional_attributes = array('max','step'); } else { - $this->required_attributes = array('start', 'to'); - $this->optional_attributes = array('step', 'max'); - } + $this->required_attributes = array('start','ifexp','var','step'); + $this->optional_attributes = array(); + } // check and get attributes $_attr = $this->_get_attributes($args); $local_vars = array(); $output = "tpl_vars[$_statement[var]] = new Smarty_Variable;"; $output .= " \$_smarty_tpl->tpl_vars[$_statement[var]]->value = $_statement[value];\n"; $compiler->local_var[$_statement['var']] = true; $local_vars[] = $_statement['var']; } - $output .= " if ($_attr[ifexp]){ for (\$_foo=true;$_attr[ifexp]; \$_smarty_tpl->tpl_vars[$_attr[varloop]]->value$_attr[loop]){\n"; + $output .= " if ($_attr[ifexp]){ for (\$_foo=true;$_attr[ifexp]; \$_smarty_tpl->tpl_vars[$_attr[var]]->value$_attr[step]){\n"; } else { $_statement = $_attr['start']; $output .= "\$_smarty_tpl->tpl_vars[$_statement[var]] = new Smarty_Variable;"; @@ -63,7 +64,7 @@ class Smarty_Internal_Compile_For extends Smarty_Internal_CompileBase { if (isset($_attr['step'])) { $output .= "\$_smarty_tpl->tpl_vars[$_statement[var]]->step = $_attr[step];"; } else { - $output .= "\$_smarty_tpl->tpl_vars[$_statement[var]]->step = ($_attr[to] - ($_statement[value]) < 0) ? -1 : 1;"; + $output .= "\$_smarty_tpl->tpl_vars[$_statement[var]]->step = 1;"; } if (isset($_attr['max'])) { $output .= "\$_smarty_tpl->tpl_vars[$_statement[var]]->total = (int)min(ceil((\$_smarty_tpl->tpl_vars[$_statement[var]]->step > 0 ? $_attr[to]+1 - ($_statement[value]) : $_statement[value]-($_attr[to])+1)/abs(\$_smarty_tpl->tpl_vars[$_statement[var]]->step)),$_attr[max]);\n"; @@ -94,13 +95,14 @@ class Smarty_Internal_Compile_Forelse extends Smarty_Internal_CompileBase { * * @param array $args array with attributes from parser * @param object $compiler compiler object + * @param array $parameter array with compilation parameter * @return string compiled code */ - public function compile($args, $compiler) + public function compile($args, $compiler, $parameter) { $this->compiler = $compiler; // check and get attributes - $_attr = $this->_get_attributes($args); + $_attr = $this->_get_attributes($args); list($_open_tag, $nocache, $local_vars) = $this->_close_tag(array('for')); $this->_open_tag('forelse', array('forelse', $nocache, $local_vars)); @@ -117,13 +119,14 @@ class Smarty_Internal_Compile_Forclose extends Smarty_Internal_CompileBase { * * @param array $args array with attributes from parser * @param object $compiler compiler object + * @param array $parameter array with compilation parameter * @return string compiled code */ - public function compile($args, $compiler) + public function compile($args, $compiler, $parameter) { $this->compiler = $compiler; // check and get attributes - $_attr = $this->_get_attributes($args); + $_attr = $this->_get_attributes($args); // must endblock be nocache? if ($this->compiler->nocache) { $this->compiler->tag_nocache = true; diff --git a/libs/sysplugins/smarty_internal_compile_foreach.php b/libs/sysplugins/smarty_internal_compile_foreach.php index 52b78c33..9564c6a2 100644 --- a/libs/sysplugins/smarty_internal_compile_foreach.php +++ b/libs/sysplugins/smarty_internal_compile_foreach.php @@ -13,18 +13,22 @@ * Smarty Internal Plugin Compile Foreach Class */ class Smarty_Internal_Compile_Foreach extends Smarty_Internal_CompileBase { + // attribute definitions + public $required_attributes = array('from', 'item'); + public $optional_attributes = array('name', 'key'); + public $shorttag_order = array('from','item','key','name'); + /** * Compiles code for the {foreach} tag * * @param array $args array with attributes from parser * @param object $compiler compiler object + * @param array $parameter array with compilation parameter * @return string compiled code */ - public function compile($args, $compiler) + public function compile($args, $compiler, $parameter) { $this->compiler = $compiler; - $this->required_attributes = array('from', 'item'); - $this->optional_attributes = array('name', 'key'); $tpl = $compiler->template; // check and get attributes $_attr = $this->_get_attributes($args); @@ -62,11 +66,12 @@ class Smarty_Internal_Compile_Foreach extends Smarty_Internal_CompileBase { $usesSmartyIndex = strpos($tpl->template_source, $SmartyVarName . 'index') !== false; $usesSmartyIteration = strpos($tpl->template_source, $SmartyVarName . 'iteration') !== false; $usesSmartyShow = strpos($tpl->template_source, $SmartyVarName . 'show') !== false; - $usesSmartyTotal = $usesSmartyLast || strpos($tpl->template_source, $SmartyVarName . 'total') !== false; + $usesSmartyTotal = strpos($tpl->template_source, $SmartyVarName . 'total') !== false; } else { $usesSmartyFirst = false; $usesSmartyLast = false; $usesSmartyTotal = false; + $usesSmartyShow = false; } $usesPropFirst = $usesSmartyFirst || strpos($tpl->template_source, $ItemVarName . 'first') !== false; @@ -74,7 +79,7 @@ class Smarty_Internal_Compile_Foreach extends Smarty_Internal_CompileBase { $usesPropIndex = $usesPropFirst || strpos($tpl->template_source, $ItemVarName . 'index') !== false; $usesPropIteration = $usesPropLast || strpos($tpl->template_source, $ItemVarName . 'iteration') !== false; $usesPropShow = strpos($tpl->template_source, $ItemVarName . 'show') !== false; - $usesPropTotal = $usesSmartyTotal || $usesPropLast || strpos($tpl->template_source, $ItemVarName . 'total') !== false; + $usesPropTotal = $usesSmartyTotal || $usesSmartyShow || $usesPropShow || $usesPropLast || strpos($tpl->template_source, $ItemVarName . 'total') !== false; // generate output code $output = "tpl_vars[$item] = new Smarty_Variable;\n"; @@ -85,7 +90,7 @@ class Smarty_Internal_Compile_Foreach extends Smarty_Internal_CompileBase { } $output .= " \$_from = $from; if (!is_array(\$_from) && !is_object(\$_from)) { settype(\$_from, 'array');}\n"; if ($usesPropTotal) { - $output .= " \$_smarty_tpl->tpl_vars[$item]->total=(\$_from instanceof Traversable)?iterator_count(\$_from):count(\$_from);\n"; + $output .= " \$_smarty_tpl->tpl_vars[$item]->total= \$_smarty_tpl->_count(\$_from);\n"; } if ($usesPropIteration) { $output .= " \$_smarty_tpl->tpl_vars[$item]->iteration=0;\n"; @@ -93,6 +98,9 @@ class Smarty_Internal_Compile_Foreach extends Smarty_Internal_CompileBase { if ($usesPropIndex) { $output .= " \$_smarty_tpl->tpl_vars[$item]->index=-1;\n"; } + if ($usesPropShow) { + $output .= " \$_smarty_tpl->tpl_vars[$item]->show = (\$_smarty_tpl->tpl_vars[$item]->total > 0);\n"; + } if ($has_name) { if ($usesSmartyTotal) { $output .= " \$_smarty_tpl->tpl_vars['smarty']->value['foreach'][$name]['total'] = \$_smarty_tpl->tpl_vars[$item]->total;\n"; @@ -103,9 +111,16 @@ class Smarty_Internal_Compile_Foreach extends Smarty_Internal_CompileBase { if ($usesSmartyIndex) { $output .= " \$_smarty_tpl->tpl_vars['smarty']->value['foreach'][$name]['index']=-1;\n"; } + if ($usesSmartyShow) { + $output .= " \$_smarty_tpl->tpl_vars['smarty']->value['foreach'][$name]['show']=(\$_smarty_tpl->tpl_vars[$item]->total > 0);\n"; + } } - $output .= "if (count(\$_from) > 0){\n"; - $output .= " foreach (\$_from as \$_smarty_tpl->tpl_vars[$item]->key => \$_smarty_tpl->tpl_vars[$item]->value){\n"; + if ($usesPropTotal) { + $output .= "if (\$_smarty_tpl->tpl_vars[$item]->total > 0){\n"; + } else { + $output .= "if (\$_smarty_tpl->_count(\$_from) > 0){\n"; + } + $output .= " foreach (\$_from as \$_smarty_tpl->tpl_vars[$item]->key => \$_smarty_tpl->tpl_vars[$item]->value){\n"; if ($key != null) { $output .= " \$_smarty_tpl->tpl_vars[$key]->value = \$_smarty_tpl->tpl_vars[$item]->key;\n"; } @@ -150,9 +165,10 @@ class Smarty_Internal_Compile_Foreachelse extends Smarty_Internal_CompileBase { * * @param array $args array with attributes from parser * @param object $compiler compiler object + * @param array $parameter array with compilation parameter * @return string compiled code */ - public function compile($args, $compiler) + public function compile($args, $compiler, $parameter) { $this->compiler = $compiler; // check and get attributes @@ -174,9 +190,10 @@ class Smarty_Internal_Compile_Foreachclose extends Smarty_Internal_CompileBase { * * @param array $args array with attributes from parser * @param object $compiler compiler object + * @param array $parameter array with compilation parameter * @return string compiled code */ - public function compile($args, $compiler) + public function compile($args, $compiler, $parameter) { $this->compiler = $compiler; // check and get attributes diff --git a/libs/sysplugins/smarty_internal_compile_function.php b/libs/sysplugins/smarty_internal_compile_function.php index 82bd9778..545b7f3a 100644 --- a/libs/sysplugins/smarty_internal_compile_function.php +++ b/libs/sysplugins/smarty_internal_compile_function.php @@ -13,20 +13,29 @@ * Smarty Internal Plugin Compile Function Class */ class Smarty_Internal_Compile_Function extends Smarty_Internal_CompileBase { + // attribute definitions + public $required_attributes = array('name'); + public $shorttag_order = array('name'); + public $optional_attributes = array('_any'); + /** * Compiles code for the {function} tag * * @param array $args array with attributes from parser * @param object $compiler compiler object - * @return boolean true + * @param array $parameter array with compilation parameter + * @return boolean true */ - public function compile($args, $compiler) + public function compile($args, $compiler, $parameter) { $this->compiler = $compiler; - $this->required_attributes = array('name'); - $this->optional_attributes = array('_any'); // check and get attributes $_attr = $this->_get_attributes($args); + + if ($_attr['nocache'] === true) { + $this->compiler->trigger_template_error('nocache option not allowed', $this->compiler->lex->taglineno); + } + $save = array($_attr, $compiler->parser->current_buffer, $compiler->template->has_nocache_code, $compiler->template->required_plugins); $this->_open_tag('function', $save); @@ -66,9 +75,10 @@ class Smarty_Internal_Compile_Functionclose extends Smarty_Internal_CompileBase * * @param array $args array with attributes from parser * @param object $compiler compiler object + * @param array $parameter array with compilation parameter * @return boolean true */ - public function compile($args, $compiler) + public function compile($args, $compiler, $parameter) { $this->compiler = $compiler; $_attr = $this->_get_attributes($args); diff --git a/libs/sysplugins/smarty_internal_compile_if.php b/libs/sysplugins/smarty_internal_compile_if.php index 4eac8d4b..49645136 100644 --- a/libs/sysplugins/smarty_internal_compile_if.php +++ b/libs/sysplugins/smarty_internal_compile_if.php @@ -18,21 +18,30 @@ class Smarty_Internal_Compile_If extends Smarty_Internal_CompileBase { * * @param array $args array with attributes from parser * @param object $compiler compiler object + * @param array $parameter array with compilation parameter * @return string compiled code */ - public function compile($args, $compiler) + public function compile($args, $compiler, $parameter) { $this->compiler = $compiler; - $this->required_attributes = array('if condition'); // check and get attributes $_attr = $this->_get_attributes($args); - $this->_open_tag('if',array(1,$compiler->tag_nocache)); - if (is_array($args['if condition'])) { - $_output = "tpl_vars[".$args['if condition']['var']."])) \$_smarty_tpl->tpl_vars[".$args['if condition']['var']."] = new Smarty_Variable;"; - $_output .= "if (\$_smarty_tpl->tpl_vars[".$args['if condition']['var']."]->value = ".$args['if condition']['value']."){?>"; + $this->_open_tag('if',array(1,$this->compiler->nocache)); + // must whole block be nocache ? + $this->compiler->nocache = $this->compiler->nocache | $this->compiler->tag_nocache; + if (is_array($parameter['if condition'])) { + if ($this->compiler->nocache) { + $_nocache = '(null,true)'; + // create nocache var to make it know for further compiling + $this->compiler->template->tpl_vars[trim($parameter['if condition']['var'], "'")] = new Smarty_variable(null, true); + } else { + $_nocache = ''; + } + $_output = "tpl_vars[".$parameter['if condition']['var']."] = new Smarty_Variable{$_nocache};"; + $_output .= "if (\$_smarty_tpl->tpl_vars[".$parameter['if condition']['var']."]->value = ".$parameter['if condition']['value']."){?>"; return $_output; } else { - return ""; + return ""; } } } @@ -46,9 +55,10 @@ class Smarty_Internal_Compile_Else extends Smarty_Internal_CompileBase { * * @param array $args array with attributes from parser * @param object $compiler compiler object + * @param array $parameter array with compilation parameter * @return string compiled code */ - public function compile($args, $compiler) + public function compile($args, $compiler, $parameter) { $this->compiler = $compiler; list($nesting, $compiler->tag_nocache) = $this->_close_tag(array('if', 'elseif')); @@ -67,26 +77,52 @@ class Smarty_Internal_Compile_Elseif extends Smarty_Internal_CompileBase { * * @param array $args array with attributes from parser * @param object $compiler compiler object + * @param array $parameter array with compilation parameter * @return string compiled code */ - public function compile($args, $compiler) + public function compile($args, $compiler, $parameter) { $this->compiler = $compiler; - $this->required_attributes = array('if condition'); // check and get attributes $_attr = $this->_get_attributes($args); list($nesting, $compiler->tag_nocache) = $this->_close_tag(array('if', 'elseif')); + if (is_array($parameter['if condition'])) { + $condition_by_assign = true; + if ($this->compiler->nocache) { + $_nocache = '(null,true)'; + // create nocache var to make it know for further compiling + $this->compiler->template->tpl_vars[trim($parameter['if condition']['var'], "'")] = new Smarty_variable(null, true); + } else { + $_nocache = ''; + } + } else { + $condition_by_assign = false; + } + if (empty($this->compiler->prefix_code)) { - $this->_open_tag('elseif', array($nesting, $compiler->tag_nocache)); - return ""; + if ($condition_by_assign) { + $this->_open_tag('elseif', array($nesting + 1, $compiler->tag_nocache)); + $_output = "tpl_vars[".$parameter['if condition']['var']."] = new Smarty_Variable{$_nocache};"; + $_output .= "if (\$_smarty_tpl->tpl_vars[".$parameter['if condition']['var']."]->value = ".$parameter['if condition']['value']."){?>"; + return $_output; + } else { + $this->_open_tag('elseif', array($nesting, $compiler->tag_nocache)); + return ""; + } } else { $tmp = ''; foreach ($this->compiler->prefix_code as $code) $tmp .= $code; $this->compiler->prefix_code = array(); $this->_open_tag('elseif', array($nesting + 1, $compiler->tag_nocache)); - return "{$tmp}"; + if ($condition_by_assign) { + $_output = "{$tmp}tpl_vars[".$parameter['if condition']['var']."] = new Smarty_Variable{$_nocache};"; + $_output .= "if (\$_smarty_tpl->tpl_vars[".$parameter['if condition']['var']."]->value = ".$parameter['if condition']['value']."){?>"; + return $_output; + } else { + return "{$tmp}"; + } } } } @@ -100,12 +136,17 @@ class Smarty_Internal_Compile_Ifclose extends Smarty_Internal_CompileBase { * * @param array $args array with attributes from parser * @param object $compiler compiler object + * @param array $parameter array with compilation parameter * @return string compiled code */ - public function compile($args, $compiler) + public function compile($args, $compiler, $parameter) { $this->compiler = $compiler; - list($nesting, $compiler->tag_nocache) = $this->_close_tag(array('if', 'else', 'elseif')); + // must endblock be nocache? + if ($this->compiler->nocache) { + $this->compiler->tag_nocache = true; + } + list($nesting, $this->compiler->nocache) = $this->_close_tag(array('if', 'else', 'elseif')); $tmp = ''; for ($i = 0; $i < $nesting ; $i++) $tmp .= '}'; return ""; diff --git a/libs/sysplugins/smarty_internal_compile_include.php b/libs/sysplugins/smarty_internal_compile_include.php index fa1d6427..ea323101 100644 --- a/libs/sysplugins/smarty_internal_compile_include.php +++ b/libs/sysplugins/smarty_internal_compile_include.php @@ -14,6 +14,14 @@ * Smarty Internal Plugin Compile Include Class */ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase { + // caching mode to create nocache code but no cache file + const CACHING_NOCACHE_CODE = 9999; + // attribute definitions + public $required_attributes = array('file'); + public $shorttag_order = array('file'); + public $option_flags = array('nocache','inline','caching'); + public $optional_attributes = array('_any'); + /** * Compiles code for the {include} tag * @@ -24,28 +32,28 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase { public function compile($args, $compiler) { $this->compiler = $compiler; - $this->required_attributes = array('file'); - $this->optional_attributes = array('_any'); // check and get attributes $_attr = $this->_get_attributes($args); // save posible attributes $include_file = $_attr['file']; $has_compiled_template = false; - if ($compiler->smarty->merge_compiled_includes || isset($_attr['inline'])) { + if ($compiler->smarty->merge_compiled_includes || $_attr['inline'] === true) { // check if compiled code can be merged (contains no variable part) if (!$compiler->has_variable_string && (substr_count($include_file, '"') == 2 or substr_count($include_file, "'") == 2) and substr_count($include_file, '(') == 0) { $tmp = null; eval("\$tmp = $include_file;"); if ($this->compiler->template->template_resource != $tmp) { $tpl = new $compiler->smarty->template_class ($tmp, $compiler->smarty, $compiler->template, $compiler->template->cache_id, $compiler->template->compile_id); + // suppress writing of compiled file + $tpl->write_compiled_code = false; if ($this->compiler->template->caching) { // needs code for cached page but no cache file - $tpl->caching = 9999; + $tpl->caching = self::CACHING_NOCACHE_CODE; } - if ($this->compiler->template->mustCompile) { +// if ($this->compiler->template->mustCompile) { // make sure whole chain gest compiled $tpl->mustCompile = true; - } +// } if ($tpl->resource_object->usesCompiler && $tpl->isExisting()) { // get compiled code $compiled_tpl = $tpl->getCompiledTemplate(); @@ -77,24 +85,24 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase { $_assign = $_attr['assign']; } - $_parent_scope = SMARTY_LOCAL_SCOPE; + $_parent_scope = Smarty::SCOPE_LOCAL; if (isset($_attr['scope'])) { $_attr['scope'] = trim($_attr['scope'], "'\""); if ($_attr['scope'] == 'parent') { - $_parent_scope = SMARTY_PARENT_SCOPE; + $_parent_scope = Smarty::SCOPE_PARENT; } elseif ($_attr['scope'] == 'root') { - $_parent_scope = SMARTY_ROOT_SCOPE; + $_parent_scope = Smarty::SCOPE_ROOT; } elseif ($_attr['scope'] == 'global') { - $_parent_scope = SMARTY_GLOBAL_SCOPE; + $_parent_scope = Smarty::SCOPE_GLOBAL; } } $_caching = 'null'; if ($this->compiler->nocache || $this->compiler->tag_nocache) { - $_caching = SMARTY_CACHING_OFF; + $_caching = Smarty::CACHING_OFF; } // default for included templates if ($this->compiler->template->caching && !$this->compiler->nocache && !$this->compiler->tag_nocache) { - $_caching = 9999; + $_caching = self::CACHING_NOCACHE_CODE; } /* * if the {include} tag provides individual parameter for caching @@ -104,38 +112,36 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase { if (isset($_attr['cache_lifetime'])) { $_cache_lifetime = $_attr['cache_lifetime']; $this->compiler->tag_nocache = true; - $_caching = SMARTY_CACHING_LIFETIME_CURRENT; + $_caching = Smarty::CACHING_LIFETIME_CURRENT; } else { $_cache_lifetime = 'null'; } if (isset($_attr['cache_id'])) { $_cache_id = $_attr['cache_id']; $this->compiler->tag_nocache = true; - $_caching = SMARTY_CACHING_LIFETIME_CURRENT; + $_caching = Smarty::CACHING_LIFETIME_CURRENT; } else { $_cache_id = '$_smarty_tpl->cache_id'; } - if (isset($_attr['nocache'])) { - if (trim($_attr['nocache'], "'\"") == 'true') { - $this->compiler->tag_nocache = true; - $_caching = SMARTY_CACHING_OFF; - } + if (isset($_attr['compile_id'])) { + $_compile_id = $_attr['compile_id']; + } else { + $_compile_id = '$_smarty_tpl->compile_id'; } - if (isset($_attr['caching'])) { - if (trim($_attr['caching'], "'\"") == 'true') { - $_caching = SMARTY_CACHING_LIFETIME_CURRENT; - } else { - $this->compiler->tag_nocache = true; - $_caching = SMARTY_CACHING_OFF; - } + if ($_attr['caching'] === true) { + $_caching = Smarty::CACHING_LIFETIME_CURRENT; + } + if ($_attr['nocache'] === true) { + $this->compiler->tag_nocache = true; + $_caching = Smarty::CACHING_OFF; } // create template object - $_output = "smarty->template_class}($include_file, \$_smarty_tpl->smarty, \$_smarty_tpl, $_cache_id, \$_smarty_tpl->compile_id, $_caching, $_cache_lifetime);\n"; + $_output = "smarty->template_class}($include_file, \$_smarty_tpl->smarty, \$_smarty_tpl, $_cache_id, $_compile_id, $_caching, $_cache_lifetime);\n"; // delete {include} standard attributes - unset($_attr['file'], $_attr['assign'], $_attr['cache_id'], $_attr['cache_lifetime'], $_attr['nocache'], $_attr['caching'], $_attr['scope'], $_attr['inline']); + unset($_attr['file'], $_attr['assign'], $_attr['cache_id'], $_attr['compile_id'], $_attr['cache_lifetime'], $_attr['nocache'], $_attr['caching'], $_attr['scope'], $_attr['inline']); // remaining attributes must be assigned as smarty variable if (!empty($_attr)) { - if ($_parent_scope == SMARTY_LOCAL_SCOPE) { + if ($_parent_scope == Smarty::SCOPE_LOCAL) { // create variables foreach ($_attr as $_key => $_value) { $_output .= "\$_template->assign('$_key',$_value);"; diff --git a/libs/sysplugins/smarty_internal_compile_include_php.php b/libs/sysplugins/smarty_internal_compile_include_php.php index 5aa558dd..19ee186b 100644 --- a/libs/sysplugins/smarty_internal_compile_include_php.php +++ b/libs/sysplugins/smarty_internal_compile_include_php.php @@ -14,6 +14,11 @@ * Smarty Internal Plugin Compile Insert Class */ class Smarty_Internal_Compile_Include_Php extends Smarty_Internal_CompileBase { + // attribute definitions + public $required_attributes = array('file'); + public $shorttag_order = array('file'); + public $optional_attributes = array('once', 'assign'); + /** * Compiles code for the {include_php} tag * @@ -23,30 +28,46 @@ class Smarty_Internal_Compile_Include_Php extends Smarty_Internal_CompileBase { */ public function compile($args, $compiler) { + if (!$compiler->smarty->allow_php_tag) { + throw new SmartyException("{include_php} is deprecated, set allow_php_tag = true to enable"); + } $this->compiler = $compiler; - $this->required_attributes = array('file'); - $this->optional_attributes = array('once', 'assign'); // check and get attributes $_attr = $this->_get_attributes($args); $_output = 'template; + $_filepath = false; eval('$_file = ' . $_attr['file'] . ';'); - - $_file = realpath($_file); - - if ($this->compiler->smarty->security) { - $this->compiler->smarty->security_handler->isTrustedPHPDir($_file); + if (!isset($this->compiler->smarty->security_policy) && file_exists($_file)) { + $_filepath = $_file; + } else { + if (isset($this->compiler->smarty->security_policy)) { + $_dir = $this->compiler->smarty->security_policy->trusted_dir; + } else { + $_dir = $this->compiler->smarty->trusted_dir; + } + if (!empty($_dir)) { + foreach((array)$_dir as $_script_dir) { + if (strpos('/\\', substr($_script_dir, -1)) === false) { + $_script_dir .= DS; + } + if (file_exists($_script_dir . $_file)) { + $_filepath = $_script_dir . $_file; + break; + } + } + } + } + if ($_filepath == false) { + $this->compiler->trigger_template_error("{include_php} file '{$_file}' is not readable", $this->compiler->lex->taglineno); } - if ($_file === false) { - $this->compiler->trigger_template_error('include_php: file "' . $_attr['file'] . '" is not readable'); + if (isset($this->compiler->smarty->security_policy)) { + $this->compiler->smarty->security_policy->isTrustedPHPDir($_filepath); } - if ($this->compiler->smarty->security) { - $this->compiler->smarty->security_handler->isTrustedPHPDir($_file); - } if (isset($_attr['assign'])) { // output will be stored in a smarty variable instead of being displayed $_assign = $_attr['assign']; @@ -59,9 +80,9 @@ class Smarty_Internal_Compile_Include_Php extends Smarty_Internal_CompileBase { } if (isset($_assign)) { - return "assign({$_assign},ob_get_contents()); ob_end_clean();?>"; + return "assign({$_assign},ob_get_contents()); ob_end_clean();?>"; } else { - return "\n"; + return "\n"; } } } diff --git a/libs/sysplugins/smarty_internal_compile_insert.php b/libs/sysplugins/smarty_internal_compile_insert.php index f1b5e8eb..bac54015 100644 --- a/libs/sysplugins/smarty_internal_compile_insert.php +++ b/libs/sysplugins/smarty_internal_compile_insert.php @@ -14,6 +14,11 @@ * Smarty Internal Plugin Compile Insert Class */ class Smarty_Internal_Compile_Insert extends Smarty_Internal_CompileBase { + // attribute definitions + public $required_attributes = array('name'); + public $shorttag_order = array('name'); + public $optional_attributes = array('_any'); + /** * Compiles code for the {insert} tag * @@ -24,8 +29,6 @@ class Smarty_Internal_Compile_Insert extends Smarty_Internal_CompileBase { public function compile($args, $compiler) { $this->compiler = $compiler; - $this->required_attributes = array('name'); - $this->optional_attributes = array('_any'); // check and get attributes $_attr = $this->_get_attributes($args); // never compile as nocache code @@ -39,7 +42,7 @@ class Smarty_Internal_Compile_Insert extends Smarty_Internal_CompileBase { // save posible attributes eval('$_name = ' . $_attr['name'] . ';'); if (isset($_attr['assign'])) { - // output will be stored in a smarty variable instead of beind displayed + // output will be stored in a smarty variable instead of being displayed $_assign = $_attr['assign']; // create variable to make shure that the compiler knows about its nocache status $this->compiler->template->tpl_vars[trim($_attr['assign'], "'")] = new Smarty_Variable(null, true); @@ -50,10 +53,10 @@ class Smarty_Internal_Compile_Insert extends Smarty_Internal_CompileBase { $_smarty_tpl = $compiler->template; $_filepath = false; eval('$_script = ' . $_attr['script'] . ';'); - if (!$this->compiler->smarty->security && file_exists($_script)) { + if (!isset($this->compiler->smarty->security_policy) && file_exists($_script)) { $_filepath = $_script; } else { - if ($this->compiler->smarty->security) { + if (isset($this->compiler->smarty->security_policy)) { $_dir = $this->compiler->smarty->security_policy->trusted_dir; } else { $_dir = $this->compiler->smarty->trusted_dir; @@ -91,7 +94,7 @@ class Smarty_Internal_Compile_Insert extends Smarty_Internal_CompileBase { } } // delete {insert} standard attributes - unset($_attr['name'], $_attr['assign'], $_attr['script']); + unset($_attr['name'], $_attr['assign'], $_attr['script'], $_attr['nocache']); // convert attributes into parameter array string $_paramsArray = array(); foreach ($_attr as $_key => $_value) { diff --git a/libs/sysplugins/smarty_internal_compile_ldelim.php b/libs/sysplugins/smarty_internal_compile_ldelim.php index 9f6294ca..bdf86de4 100644 --- a/libs/sysplugins/smarty_internal_compile_ldelim.php +++ b/libs/sysplugins/smarty_internal_compile_ldelim.php @@ -25,6 +25,9 @@ class Smarty_Internal_Compile_Ldelim extends Smarty_Internal_CompileBase { { $this->compiler = $compiler; $_attr = $this->_get_attributes($args); + if ($_attr['nocache'] === true) { + $this->compiler->trigger_template_error('nocache option not allowed', $this->compiler->lex->taglineno); + } // this tag does not return compiled code $this->compiler->has_code = true; return $this->compiler->smarty->left_delimiter; diff --git a/libs/sysplugins/smarty_internal_compile_nocache.php b/libs/sysplugins/smarty_internal_compile_nocache.php index 3a4e1135..0c88b14b 100644 --- a/libs/sysplugins/smarty_internal_compile_nocache.php +++ b/libs/sysplugins/smarty_internal_compile_nocache.php @@ -25,6 +25,9 @@ class Smarty_Internal_Compile_Nocache extends Smarty_Internal_CompileBase { { $this->compiler = $compiler; $_attr = $this->_get_attributes($args); + if ($_attr['nocache'] === true) { + $this->compiler->trigger_template_error('nocache option not allowed', $this->compiler->lex->taglineno); + } // enter nocache mode $this->compiler->nocache = true; // this tag does not return compiled code diff --git a/libs/sysplugins/smarty_internal_compile_private_block_plugin.php b/libs/sysplugins/smarty_internal_compile_private_block_plugin.php index 79772a12..1ea264f7 100644 --- a/libs/sysplugins/smarty_internal_compile_private_block_plugin.php +++ b/libs/sysplugins/smarty_internal_compile_private_block_plugin.php @@ -1,4 +1,4 @@ -compiler = $compiler; if (strlen($tag) < 6 || substr($tag, -5) != 'close') { // opening tag of block plugin - $this->required_attributes = array(); - $this->optional_attributes = array('_any'); - // check and get attributes - $_attr = $this->_get_attributes($args); + // check and get attributes + $_attr = $this->_get_attributes($args); + if ($_attr['nocache'] === true) { + $this->compiler->tag_nocache = true; + } + unset($_attr['nocache']); // convert attributes into parameter array string $_paramsArray = array(); foreach ($_attr as $_key => $_value) { diff --git a/libs/sysplugins/smarty_internal_compile_private_function_plugin.php b/libs/sysplugins/smarty_internal_compile_private_function_plugin.php index 77f83c0d..796d5722 100644 --- a/libs/sysplugins/smarty_internal_compile_private_function_plugin.php +++ b/libs/sysplugins/smarty_internal_compile_private_function_plugin.php @@ -13,24 +13,32 @@ * Smarty Internal Plugin Compile Function Plugin Class */ class Smarty_Internal_Compile_Private_Function_Plugin extends Smarty_Internal_CompileBase { + // attribute definitions + public $required_attributes = array(); + public $optional_attributes = array('_any'); + /** * Compiles code for the execution of function plugin * * @param array $args array with attributes from parser - * @param string $tag name of function * @param object $compiler compiler object + * @param array $parameter array with compilation parameter + * @param string $tag name of function plugin + * @param string $function PHP function name * @return string compiled code */ - public function compile($args, $compiler, $tag, $function) + public function compile($args, $compiler, $parameter, $tag, $function) { $this->compiler = $compiler; // This tag does create output $this->compiler->has_output = true; - $this->required_attributes = array(); - $this->optional_attributes = array('_any'); // check and get attributes $_attr = $this->_get_attributes($args); + if ($_attr['nocache'] === true) { + $this->compiler->tag_nocache = true; + } + unset($_attr['nocache']); // convert attributes into parameter array string $_paramsArray = array(); foreach ($_attr as $_key => $_value) { diff --git a/libs/sysplugins/smarty_internal_compile_private_modifier.php b/libs/sysplugins/smarty_internal_compile_private_modifier.php index cfa4a11b..e4a4e588 100644 --- a/libs/sysplugins/smarty_internal_compile_private_modifier.php +++ b/libs/sysplugins/smarty_internal_compile_private_modifier.php @@ -18,44 +18,44 @@ class Smarty_Internal_Compile_Private_Modifier extends Smarty_Internal_CompileBa * * @param array $args array with attributes from parser * @param object $compiler compiler object + * @param array $parameter array with compilation parameter * @return string compiled code */ - public function compile($args, $compiler) + public function compile($args, $compiler, $parameter) { $this->compiler = $compiler; $this->smarty = $this->compiler->smarty; - $this->required_attributes = array('value', 'modifierlist'); // check and get attributes $_attr = $this->_get_attributes($args); - $output = $_attr['value']; + $output = $parameter['value']; // loop over list of modifiers - foreach ($_attr['modifierlist'] as $single_modifier) { + foreach ($parameter['modifierlist'] as $single_modifier) { $modifier = $single_modifier[0]; $single_modifier[0] = $output; $params = implode(',', $single_modifier); // check for registered modifier - if (isset($compiler->smarty->registered_plugins['modifier'][$modifier])) { - $function = $compiler->smarty->registered_plugins['modifier'][$modifier][0]; + if (isset($compiler->smarty->registered_plugins[Smarty::PLUGIN_MODIFIER][$modifier])) { + $function = $compiler->smarty->registered_plugins[Smarty::PLUGIN_MODIFIER][$modifier][0]; if (!is_array($function)) { $output = "{$function}({$params})"; } else { if (is_object($function[0])) { - $output = '$_smarty_tpl->smarty->registered_plugins[\'modifier\'][\'' . $modifier . '\'][0][0]->' . $function[1] . '(' . $params . ')'; + $output = '$_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_MODIFIER][\'' . $modifier . '\'][0][0]->' . $function[1] . '(' . $params . ')'; } else { $output = $function[0] . '::' . $function[1] . '(' . $params . ')'; } } // check for plugin modifiercompiler - } else if ($compiler->smarty->loadPlugin('smarty_modifiercompiler_' . $modifier)) { + } else if (Smarty_Internal_Plugin_Loader::loadPlugin('smarty_modifiercompiler_' . $modifier, $compiler->smarty->plugins_dir)) { $plugin = 'smarty_modifiercompiler_' . $modifier; $output = $plugin($single_modifier, $compiler); // check for plugin modifier - } else if ($function = $this->compiler->getPlugin($modifier, 'modifier')) { + } else if ($function = $this->compiler->getPlugin($modifier, Smarty::PLUGIN_MODIFIER)) { $output = "{$function}({$params})"; // check if trusted PHP function } else if (is_callable($modifier)) { // check if modifier allowed - if (!$this->compiler->template->security || $this->smarty->security_handler->isTrustedModifier($modifier, $this->compiler)) { + if (!is_object($this->smarty->security_policy) || $this->smarty->security_policy->isTrustedModifier($modifier, $this->compiler)) { $output = "{$modifier}({$params})"; } } else { diff --git a/libs/sysplugins/smarty_internal_compile_private_object_block_function.php b/libs/sysplugins/smarty_internal_compile_private_object_block_function.php index 83558bfc..a3550754 100644 --- a/libs/sysplugins/smarty_internal_compile_private_object_block_function.php +++ b/libs/sysplugins/smarty_internal_compile_private_object_block_function.php @@ -13,24 +13,31 @@ * Smarty Internal Plugin Compile Object Block Function Class */ class Smarty_Internal_Compile_Private_Object_Block_Function extends Smarty_Internal_CompileBase { + // attribute definitions + public $required_attributes = array(); + public $optional_attributes = array('_any'); + /** * Compiles code for the execution of block plugin * * @param array $args array with attributes from parser - * @param string $tag name of block function - * @param string $methode name of methode to call * @param object $compiler compiler object + * @param array $parameter array with compilation parameter + * @param string $tag name of block object + * @param string $methode name of methode to call * @return string compiled code */ - public function compile($args, $compiler, $tag, $methode) + public function compile($args, $compiler, $parameter, $tag, $methode) { $this->compiler = $compiler; if (strlen($tag) < 5 || substr($tag, -5) != 'close') { // opening tag of block plugin - $this->required_attributes = array(); - $this->optional_attributes = array('_any'); - // check and get attributes - $_attr = $this->_get_attributes($args); + // check and get attributes + $_attr = $this->_get_attributes($args); + if ($_attr['nocache'] === true) { + $this->compiler->tag_nocache = true; + } + unset($_attr['nocache']); // convert attributes into parameter array string $_paramsArray = array(); foreach ($_attr as $_key => $_value) { @@ -42,13 +49,19 @@ class Smarty_Internal_Compile_Private_Object_Block_Function extends Smarty_Inter } $_params = 'array(' . implode(",", $_paramsArray) . ')'; - $this->_open_tag($tag . '->' . $methode, $_params); + $this->_open_tag($tag . '->' . $methode, array($_params, $this->compiler->nocache)); + // maybe nocache because of nocache variables or nocache plugin + $this->compiler->nocache = $this->compiler->nocache | $this->compiler->tag_nocache; // compile code $output = "smarty->_tag_stack[] = array('{$tag}->{$methode}', {$_params}); \$_block_repeat=true; \$_smarty_tpl->smarty->registered_objects['{$tag}'][0]->{$methode}({$_params}, null, \$_smarty_tpl->smarty, \$_block_repeat, \$_smarty_tpl);while (\$_block_repeat) { ob_start();?>"; } else { $base_tag = substr($tag, 0, -5); - // closing tag of block plugin - $_params = $this->_close_tag($base_tag . '->' . $methode); + // must endblock be nocache? + if ($this->compiler->nocache) { + $this->compiler->tag_nocache = true; + } + // closing tag of block plugin, restore nocache + list($_params, $this->compiler->nocache) = $this->_close_tag($base_tag . '->' . $methode); // This tag does create output $this->compiler->has_output = true; // compile code diff --git a/libs/sysplugins/smarty_internal_compile_private_object_function.php b/libs/sysplugins/smarty_internal_compile_private_object_function.php index 32bdbdce..1ca3e10d 100644 --- a/libs/sysplugins/smarty_internal_compile_private_object_function.php +++ b/libs/sysplugins/smarty_internal_compile_private_object_function.php @@ -13,22 +13,29 @@ * Smarty Internal Plugin Compile Object Function Class */ class Smarty_Internal_Compile_Private_Object_Function extends Smarty_Internal_CompileBase { + // attribute definitions + public $required_attributes = array(); + public $optional_attributes = array('_any'); + /** * Compiles code for the execution of function plugin * * @param array $args array with attributes from parser + * @param object $compiler compiler object + * @param array $parameter array with compilation parameter * @param string $tag name of function * @param string $methode name of methode to call - * @param object $compiler compiler object * @return string compiled code */ - public function compile($args, $compiler, $tag, $methode) + public function compile($args, $compiler, $parameter, $tag, $methode) { $this->compiler = $compiler; - $this->required_attributes = array(); - $this->optional_attributes = array('_any'); // check and get attributes - $_attr = $this->_get_attributes($args); + $_attr = $this->_get_attributes($args); + if ($_attr['nocache'] === true) { + $this->compiler->tag_nocache = true; + } + unset($_attr['nocache']); $_assign = null; if (isset($_attr['assign'])) { $_assign = $_attr['assign']; diff --git a/libs/sysplugins/smarty_internal_compile_private_print_expression.php b/libs/sysplugins/smarty_internal_compile_private_print_expression.php index f4ce849a..3843428f 100644 --- a/libs/sysplugins/smarty_internal_compile_private_print_expression.php +++ b/libs/sysplugins/smarty_internal_compile_private_print_expression.php @@ -13,47 +13,46 @@ * Smarty Internal Plugin Compile Print Expression Class */ class Smarty_Internal_Compile_Private_Print_Expression extends Smarty_Internal_CompileBase { + // attribute definitions + public $optional_attributes = array('assign'); + public $option_flags = array('nocache', 'nofilter'); + /** * Compiles code for gererting output from any expression * * @param array $args array with attributes from parser * @param object $compiler compiler object + * @param array $parameter array with compilation parameter * @return string compiled code */ - public function compile($args, $compiler) + public function compile($args, $compiler, $parameter) { $this->compiler = $compiler; - $this->optional_attributes = array('assign'); - $this->required_attributes = array('value'); - $this->optional_attributes = array('assign', 'nocache', 'nofilter', 'modifierlist'); // check and get attributes $_attr = $this->_get_attributes($args); // nocache option - if (isset($_attr['nocache'])) { - if ($_attr['nocache'] == 'true') { - $this->compiler->tag_nocache = true; - } + if ($_attr['nocache'] === true) { + $this->compiler->tag_nocache = true; } - // filter handling - if (isset($_attr['nofilter'])) { + if ($_attr['nofilter'] === true) { $_filter = 'false'; } else { $_filter = 'true'; } - + // compiled output // compiled output if (isset($_attr['assign'])) { // assign output to variable - $output = "assign({$_attr['assign']},{$_attr['value']});?>"; + $output = "assign({$_attr['assign']},{$parameter['value']});?>"; } else { // display value - if (isset($this->compiler->smarty->registered_filters['variable'])) { - $output = "Smarty_Internal_Filter_Handler::runFilter('variable', {$_attr['value']},\$_smarty_tpl->smarty, \$_smarty_tpl, {$_filter})"; + if (!$_attr['nofilter'] && isset($this->compiler->smarty->registered_filters['variable'])) { + $output = "Smarty_Internal_Filter_Handler::runFilter('variable', {$parameter['value']},\$_smarty_tpl->smarty, \$_smarty_tpl, {$_filter})"; } else { - $output = $_attr['value']; + $output = $parameter['value']; } - if (!isset($_attr['nofilter']) && !empty($this->compiler->smarty->default_modifiers)) { + if (!$_attr['nofilter'] && !empty($this->compiler->smarty->default_modifiers)) { $modifierlist = array(); foreach ($this->compiler->smarty->default_modifiers as $key => $single_default_modifier) { preg_match_all('/(\'[^\'\\\\]*(?:\\\\.[^\'\\\\]*)*\'|"[^"\\\\]*(?:\\\\.[^"\\\\]*)*"|:|[^:]+)/', $single_default_modifier, $mod_array); @@ -63,10 +62,10 @@ class Smarty_Internal_Compile_Private_Print_Expression extends Smarty_Internal_C } } } - $output = $this->compiler->compileTag('private_modifier', array('modifierlist' => $modifierlist, 'value' => $output)); + $output = $this->compiler->compileTag('private_modifier', array(), array('modifierlist' => $modifierlist, 'value' => $output)); } - if (!empty($_attr['modifierlist'])) { - $output = $this->compiler->compileTag('private_modifier', array('modifierlist' => $_attr['modifierlist'], 'value' => $output)); + if (!empty($parameter['modifierlist'])) { + $output = $this->compiler->compileTag('private_modifier', array(), array('modifierlist' => $parameter['modifierlist'], 'value' => $output)); } $this->compiler->has_output = true; $output = ""; diff --git a/libs/sysplugins/smarty_internal_compile_private_registered_block.php b/libs/sysplugins/smarty_internal_compile_private_registered_block.php index 39ad5903..87dbee6b 100644 --- a/libs/sysplugins/smarty_internal_compile_private_registered_block.php +++ b/libs/sysplugins/smarty_internal_compile_private_registered_block.php @@ -13,23 +13,29 @@ * Smarty Internal Plugin Compile Registered Block Class */ class Smarty_Internal_Compile_Private_Registered_Block extends Smarty_Internal_CompileBase { + // attribute definitions + public $optional_attributes = array('_any'); + /** * Compiles code for the execution of a block function * * @param array $args array with attributes from parser - * @param string $tag name of block function * @param object $compiler compiler object + * @param array $parameter array with compilation parameter + * @param string $tag name of block function * @return string compiled code */ - public function compile($args, $compiler, $tag) + public function compile($args, $compiler, $parameter, $tag) { $this->compiler = $compiler; if (strlen($tag) < 6 || substr($tag,-5) != 'close') { // opening tag of block plugin - $this->required_attributes = array(); - $this->optional_attributes = array('_any'); - // check and get attributes - $_attr = $this->_get_attributes($args); + // check and get attributes + $_attr = $this->_get_attributes($args); + if ($_attr['nocache']) { + $this->compiler->tag_nocache = true; + } + unset($_attr['nocache']); // convert attributes into parameter array string $_paramsArray = array(); foreach ($_attr as $_key => $_value) { @@ -43,8 +49,8 @@ class Smarty_Internal_Compile_Private_Registered_Block extends Smarty_Internal_C $this->_open_tag($tag, array($_params, $this->compiler->nocache)); // maybe nocache because of nocache variables or nocache plugin - $this->compiler->nocache = !$compiler->smarty->registered_plugins['block'][$tag][1] | $this->compiler->nocache | $this->compiler->tag_nocache; - $function = $compiler->smarty->registered_plugins['block'][$tag][0]; + $this->compiler->nocache = !$compiler->smarty->registered_plugins[Smarty::PLUGIN_BLOCK][$tag][1] | $this->compiler->nocache | $this->compiler->tag_nocache; + $function = $compiler->smarty->registered_plugins[Smarty::PLUGIN_BLOCK][$tag][0]; // compile code if (!is_array($function)) { $output = "smarty->_tag_stack[] = array('{$tag}', {$_params}); \$_block_repeat=true; {$function}({$_params}, null, \$_smarty_tpl->smarty, \$_block_repeat, \$_smarty_tpl);while (\$_block_repeat) { ob_start();?>"; @@ -63,7 +69,7 @@ class Smarty_Internal_Compile_Private_Registered_Block extends Smarty_Internal_C list($_params, $this->compiler->nocache) = $this->_close_tag($base_tag); // This tag does create output $this->compiler->has_output = true; - $function = $compiler->smarty->registered_plugins['block'][$base_tag][0]; + $function = $compiler->smarty->registered_plugins[Smarty::PLUGIN_BLOCK][$base_tag][0]; // compile code if (!is_array($function)) { $output = "smarty, \$_block_repeat, \$_smarty_tpl); } array_pop(\$_smarty_tpl->smarty->_tag_stack);?>"; diff --git a/libs/sysplugins/smarty_internal_compile_private_registered_function.php b/libs/sysplugins/smarty_internal_compile_private_registered_function.php index 3590beac..7712e78d 100644 --- a/libs/sysplugins/smarty_internal_compile_private_registered_function.php +++ b/libs/sysplugins/smarty_internal_compile_private_registered_function.php @@ -13,26 +13,31 @@ * Smarty Internal Plugin Compile Registered Function Class */ class Smarty_Internal_Compile_Private_Registered_Function extends Smarty_Internal_CompileBase { + // attribute definitions + public $optional_attributes = array('_any'); + /** * Compiles code for the execution of a registered function * * @param array $args array with attributes from parser - * @param string $tag name of function * @param object $compiler compiler object + * @param array $parameter array with compilation parameter + * @param string $tag name of function * @return string compiled code */ - public function compile($args, $compiler, $tag) + public function compile($args, $compiler, $parameter, $tag) { $this->compiler = $compiler; // This tag does create output $this->compiler->has_output = true; - - $this->required_attributes = array(); - $this->optional_attributes = array('_any'); // check and get attributes $_attr = $this->_get_attributes($args); + if ($_attr['nocache']) { + $this->compiler->tag_nocache = true; + } + unset($_attr['nocache']); // not cachable? - $this->compiler->tag_nocache = !$compiler->smarty->registered_plugins['function'][$tag][1]; + $this->compiler->tag_nocache = $this->compiler->tag_nocache || !$compiler->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION][$tag][1]; // convert attributes into parameter array string $_paramsArray = array(); foreach ($_attr as $_key => $_value) { @@ -43,12 +48,12 @@ class Smarty_Internal_Compile_Private_Registered_Function extends Smarty_Interna } } $_params = 'array(' . implode(",", $_paramsArray) . ')'; - $function = $compiler->smarty->registered_plugins['function'][$tag][0]; + $function = $compiler->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION][$tag][0]; // compile code if (!is_array($function)) { $output = "smarty,\$_smarty_tpl);?>\n"; } else if (is_object($function[0])) { - $output = "smarty->registered_plugins['function']['{$tag}'][0][0]->{$function[1]}({$_params},\$_smarty_tpl->smarty,\$_smarty_tpl);?>\n"; + $output = "smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['{$tag}'][0][0]->{$function[1]}({$_params},\$_smarty_tpl->smarty,\$_smarty_tpl);?>\n"; } else { $output = "smarty,\$_smarty_tpl);?>\n"; } diff --git a/libs/sysplugins/smarty_internal_compile_private_special_variable.php b/libs/sysplugins/smarty_internal_compile_private_special_variable.php index 2be898f0..76527f4e 100644 --- a/libs/sysplugins/smarty_internal_compile_private_special_variable.php +++ b/libs/sysplugins/smarty_internal_compile_private_special_variable.php @@ -20,22 +20,22 @@ class Smarty_Internal_Compile_Private_Special_Variable extends Smarty_Internal_C * @param object $compiler compiler object * @return string compiled code */ - public function compile($args, $compiler) + public function compile($args, $compiler, $parameter) { - $_index = preg_split("/\]\[/",substr($args, 1, strlen($args)-2)); + $_index = preg_split("/\]\[/",substr($parameter, 1, strlen($parameter)-2)); $compiled_ref = ' '; $variable = trim($_index[0], "'"); switch ($variable) { case 'foreach': - return "\$_smarty_tpl->getVariable('smarty')->value$args"; + return "\$_smarty_tpl->getVariable('smarty')->value$parameter"; case 'section': - return "\$_smarty_tpl->getVariable('smarty')->value$args"; + return "\$_smarty_tpl->getVariable('smarty')->value$parameter"; case 'capture': - return "\$_smarty_tpl->smarty->_smarty_vars$args"; + return "\$_smarty_tpl->smarty->_smarty_vars$parameter"; case 'now': return 'time()'; case 'cookies': - if ($compiler->smarty->security && !$compiler->smarty->security_policy->allow_super_globals) { + if (isset($compiler->smarty->security_policy) && !$compiler->smarty->security_policy->allow_super_globals) { $compiler->trigger_template_error("(secure mode) super globals not permitted"); break; } @@ -48,7 +48,7 @@ class Smarty_Internal_Compile_Private_Special_Variable extends Smarty_Internal_C case 'server': case 'session': case 'request': - if ($compiler->smarty->security && !$compiler->smarty->security_policy->allow_super_globals) { + if (isset($compiler->smarty->security_policy) && !$compiler->smarty->security_policy->allow_super_globals) { $compiler->trigger_template_error("(secure mode) super globals not permitted"); break; } @@ -78,7 +78,7 @@ class Smarty_Internal_Compile_Private_Special_Variable extends Smarty_Internal_C return "'$_version'"; case 'const': - if ($compiler->smarty->security && !$compiler->smarty->security_policy->allow_constants) { + if (isset($compiler->smarty->security_policy) && !$compiler->smarty->security_policy->allow_constants) { $compiler->trigger_template_error("(secure mode) constants not permitted"); break; } diff --git a/libs/sysplugins/smarty_internal_compile_rdelim.php b/libs/sysplugins/smarty_internal_compile_rdelim.php index e8f3eb24..6436bfd1 100644 --- a/libs/sysplugins/smarty_internal_compile_rdelim.php +++ b/libs/sysplugins/smarty_internal_compile_rdelim.php @@ -25,6 +25,9 @@ class Smarty_Internal_Compile_Rdelim extends Smarty_Internal_CompileBase { { $this->compiler = $compiler; $_attr = $this->_get_attributes($args); + if ($_attr['nocache'] === true) { + $this->compiler->trigger_template_error('nocache option not allowed', $this->compiler->lex->taglineno); + } // this tag does not return compiled code $this->compiler->has_code = true; return $this->compiler->smarty->right_delimiter; diff --git a/libs/sysplugins/smarty_internal_compile_section.php b/libs/sysplugins/smarty_internal_compile_section.php index 50c82722..0768b026 100644 --- a/libs/sysplugins/smarty_internal_compile_section.php +++ b/libs/sysplugins/smarty_internal_compile_section.php @@ -13,6 +13,11 @@ * Smarty Internal Plugin Compile Section Class */ class Smarty_Internal_Compile_Section extends Smarty_Internal_CompileBase { + // attribute definitions + public $required_attributes = array('name', 'loop'); + public $shorttag_order = array('name', 'loop'); + public $optional_attributes = array('start', 'step', 'max', 'show'); + /** * Compiles code for the {section} tag * @@ -23,8 +28,6 @@ class Smarty_Internal_Compile_Section extends Smarty_Internal_CompileBase { public function compile($args, $compiler) { $this->compiler = $compiler; - $this->required_attributes = array('name', 'loop'); - $this->optional_attributes = array('start', 'step', 'max', 'show'); // check and get attributes $_attr = $this->_get_attributes($args); diff --git a/libs/sysplugins/smarty_internal_compile_while.php b/libs/sysplugins/smarty_internal_compile_while.php index 1a0d8dd4..ecad0714 100644 --- a/libs/sysplugins/smarty_internal_compile_while.php +++ b/libs/sysplugins/smarty_internal_compile_while.php @@ -18,12 +18,12 @@ class Smarty_Internal_Compile_While extends Smarty_Internal_CompileBase { * * @param array $args array with attributes from parser * @param object $compiler compiler object + * @param array $parameter array with compilation parameter * @return string compiled code */ - public function compile($args, $compiler) + public function compile($args, $compiler, $parameter) { $this->compiler = $compiler; - $this->required_attributes = array('if condition'); // check and get attributes $_attr = $this->_get_attributes($args); $this->_open_tag('while', $this->compiler->nocache); @@ -32,12 +32,12 @@ class Smarty_Internal_Compile_While extends Smarty_Internal_CompileBase { $this->compiler->nocache = $this->compiler->nocache | $this->compiler->tag_nocache; - if (is_array($args['if condition'])) { - $_output = " tpl_vars[".$args['if condition']['var']."])) \$_smarty_tpl->tpl_vars[".$args['if condition']['var']."] = new Smarty_Variable;\n"; - $_output .= " while (\$_smarty_tpl->tpl_vars[".$args['if condition']['var']."]->value = ".$args['if condition']['value'].") {\n ?>"; + if (is_array($parameter['if condition'])) { + $_output = " tpl_vars[".$parameter['if condition']['var']."])) \$_smarty_tpl->tpl_vars[".$parameter['if condition']['var']."] = new Smarty_Variable;\n"; + $_output .= " while (\$_smarty_tpl->tpl_vars[".$parameter['if condition']['var']."]->value = ".$parameter['if condition']['value'].") {\n ?>"; return $_output; } else { - return ''; + return ''; } } } diff --git a/libs/sysplugins/smarty_internal_compilebase.php b/libs/sysplugins/smarty_internal_compilebase.php index 9485eacd..5b3260a2 100644 --- a/libs/sysplugins/smarty_internal_compilebase.php +++ b/libs/sysplugins/smarty_internal_compilebase.php @@ -1,80 +1,126 @@ required_attributes = array(); - $this->optional_attributes = array(); - } + * This class does extend all internal compile plugins + */ +// abstract class Smarty_Internal_CompileBase implements TagCompilerInterface +class Smarty_Internal_CompileBase { + public $required_attributes = array(); + public $optional_attributes = array(); + public $shorttag_order = array(); + public $option_flags = array('nocache'); + /** - * This function checks if the attributes passed are valid - * - * The attributes passed for the tag to compile are checked against the list of required and - * optional attributes. Required attributes must be present. Optional attributes are check against - * against the corresponding list. The keyword '_any' specifies that any attribute will be accepted - * as valid - * - * @todo More generallized handling of the nocache attributes in compile plugins - * @param array $args attributes applied to the tag - * @return array attributes for further processing - */ - function _get_attributes ($args) - { + * This function checks if the attributes passed are valid + * + * The attributes passed for the tag to compile are checked against the list of required and + * optional attributes. Required attributes must be present. Optional attributes are check against + * against the corresponding list. The keyword '_any' specifies that any attribute will be accepted + * as valid + * + * @param array $attributes attributes applied to the tag + * @return array of mapped attributes for further processing + */ + function _get_attributes ($attributes) + { + $_indexed_attr = array(); + // loop over attributes + foreach ($attributes as $key => $mixed) { + // shorthand ? + if (!is_array($mixed)) { + // option flag ? + if (in_array(trim($mixed, '\'"'), $this->option_flags)) { + $_indexed_attr[trim($mixed, '\'"')] = true; + // shorthand attribute ? + } else if (isset($this->shorttag_order[$key])) { + $_indexed_attr[$this->shorttag_order[$key]] = $mixed; + } else { + // too many shorthands + $this->compiler->trigger_template_error('too many shorthand attributes', $this->compiler->lex->taglineno); + } + // named attribute + } else { + $kv = each($mixed); + // option flag? + if (in_array($kv['key'], $this->option_flags)) { + if (is_bool($kv['value'])) { + $_indexed_attr[$kv['key']] = $kv['value']; + } else if (is_string($kv['value']) && in_array(trim($kv['value'], '\'"'), array('true', 'false'))) { + if (trim($kv['value']) == 'true') { + $_indexed_attr[$kv['key']] = true; + } else { + $_indexed_attr[$kv['key']] = false; + } + } else if (is_numeric($kv['value']) && in_array($kv['value'], array(0, 1))) { + if ($kv['value'] == 1) { + $_indexed_attr[$kv['key']] = true; + } else { + $_indexed_attr[$kv['key']] = false; + } + } else { + $this->compiler->trigger_template_error("illegal value of option flag \"{$kv['key']}\"", $this->compiler->lex->taglineno); + } + // must be named attribute + } else { + $_indexed_attr = array_merge($_indexed_attr, $mixed); + } + } + } // check if all required attributes present foreach ($this->required_attributes as $attr) { - if (!array_key_exists($attr, $args)) { - $this->compiler->trigger_template_error("missing \"" . $attr . "\" attribute"); + if (!array_key_exists($attr, $_indexed_attr)) { + $this->compiler->trigger_template_error("missing \"" . $attr . "\" attribute", $this->compiler->lex->taglineno); } } // check for unallowed attributes if ($this->optional_attributes != array('_any')) { - $tmp_array = array_merge($this->required_attributes, $this->optional_attributes); - foreach ($args as $key => $dummy) { - if (!in_array($key, $tmp_array) && $key !== 0) { - $this->compiler->trigger_template_error("unexpected \"" . $key . "\" attribute"); + $tmp_array = array_merge($this->required_attributes, $this->optional_attributes, $this->option_flags); + foreach ($_indexed_attr as $key => $dummy) { + if (!in_array($key, $tmp_array) && $key !== 0) { + $this->compiler->trigger_template_error("unexpected \"" . $key . "\" attribute", $this->compiler->lex->taglineno); } } } + // default 'false' for all option flags not set + foreach ($this->option_flags as $flag) { + if (!isset($_indexed_attr[$flag])) { + $_indexed_attr[$flag] = false; + } + } - return $args; + return $_indexed_attr; } /** - * Push opening tag name on stack - * - * Optionally additional data can be saved on stack - * - * @param string $open_tag the opening tag's name - * @param anytype $data optional data which shall be saved on stack - */ + * Push opening tag name on stack + * + * Optionally additional data can be saved on stack + * + * @param string $open_tag the opening tag's name + * @param anytype $data optional data which shall be saved on stack + */ function _open_tag($open_tag, $data = null) { array_push($this->compiler->_tag_stack, array($open_tag, $data)); } /** - * Pop closing tag - * - * Raise an error if this stack-top doesn't match with expected opening tags - * - * @param array $ |string $expected_tag the expected opening tag names - * @return anytype the opening tag's name or saved data - */ + * Pop closing tag + * + * Raise an error if this stack-top doesn't match with expected opening tags + * + * @param array $ |string $expected_tag the expected opening tag names + * @return anytype the opening tag's name or saved data + */ function _close_tag($expected_tag) { if (count($this->compiler->_tag_stack) > 0) { @@ -95,7 +141,7 @@ abstract class Smarty_Internal_CompileBase return; } // wrong nesting of tags - $this->compiler->trigger_template_error("unexpected closing tag",$this->compiler->lex->taglineno); + $this->compiler->trigger_template_error("unexpected closing tag", $this->compiler->lex->taglineno); return; } } diff --git a/libs/sysplugins/smarty_internal_config.php b/libs/sysplugins/smarty_internal_config.php index f9b4d0e3..2ee2d595 100644 --- a/libs/sysplugins/smarty_internal_config.php +++ b/libs/sysplugins/smarty_internal_config.php @@ -241,9 +241,9 @@ class Smarty_Internal_Config { public function loadConfigVars ($sections = null, $scope) { if (isset($this->template)) { - $this->template->properties['file_dependency'][sha1($this->getConfigFilepath())] = array($this->getConfigFilepath(), $this->getTimestamp()); + $this->template->properties['file_dependency'][sha1($this->getConfigFilepath())] = array($this->getConfigFilepath(), $this->getTimestamp(),'file'); } else { - $this->smarty->properties['file_dependency'][sha1($this->getConfigFilepath())] = array($this->getConfigFilepath(), $this->getTimestamp()); + $this->smarty->properties['file_dependency'][sha1($this->getConfigFilepath())] = array($this->getConfigFilepath(), $this->getTimestamp(),'file'); } if ($this->mustCompile()) { $this->compileConfigSource(); diff --git a/libs/sysplugins/smarty_internal_config_file_compiler.php b/libs/sysplugins/smarty_internal_config_file_compiler.php index 469dab27..d13cdfa8 100644 --- a/libs/sysplugins/smarty_internal_config_file_compiler.php +++ b/libs/sysplugins/smarty_internal_config_file_compiler.php @@ -22,8 +22,8 @@ class Smarty_Internal_Config_File_Compiler { { $this->smarty = $smarty; // get required plugins - $this->smarty->loadPlugin('Smarty_Internal_Configfilelexer'); - $this->smarty->loadPlugin('Smarty_Internal_Configfileparser'); + Smarty_Internal_Plugin_Loader::loadPlugin('Smarty_Internal_Configfilelexer', $this->smarty->plugins_dir); + Smarty_Internal_Plugin_Loader::loadPlugin('Smarty_Internal_Configfileparser', $this->smarty->plugins_dir); $this->config_data['sections'] = array(); $this->config_data['vars'] = array(); } diff --git a/libs/sysplugins/smarty_internal_data.php b/libs/sysplugins/smarty_internal_data.php index c72c0847..265555eb 100644 --- a/libs/sysplugins/smarty_internal_data.php +++ b/libs/sysplugins/smarty_internal_data.php @@ -25,17 +25,17 @@ class Smarty_Internal_Data { * @param boolean $nocache if true any output of this variable will be not cached * @param boolean $scope the scope the variable will have (local,parent or root) */ - public function assign($tpl_var, $value = null, $nocache = false, $scope = SMARTY_LOCAL_SCOPE) + public function assign($tpl_var, $value = null, $nocache = false) { if (is_array($tpl_var)) { foreach ($tpl_var as $_key => $_val) { if ($_key != '') { - $this->tpl_vars[$_key] = new Smarty_variable($_val, $nocache, $scope); + $this->tpl_vars[$_key] = new Smarty_variable($_val, $nocache); } } } else { if ($tpl_var != '') { - $this->tpl_vars[$tpl_var] = new Smarty_variable($value, $nocache, $scope); + $this->tpl_vars[$tpl_var] = new Smarty_variable($value, $nocache); } } } @@ -49,7 +49,7 @@ class Smarty_Internal_Data { public function assignGlobal($varname, $value = null, $nocache = false) { if ($varname != '') { - $this->smarty->global_tpl_vars[$varname] = new Smarty_variable($value, $nocache); + Smarty::$global_tpl_vars[$varname] = new Smarty_variable($value, $nocache); } } /** @@ -58,27 +58,26 @@ class Smarty_Internal_Data { * @param string $tpl_var the template variable name * @param mixed $ &$value the referenced value to assign * @param boolean $nocache if true any output of this variable will be not cached - * @param boolean $scope the scope the variable will have (local,parent or root) */ - public function assignByRef($tpl_var, &$value, $nocache = false, $scope = SMARTY_LOCAL_SCOPE) + public function assignByRef($tpl_var, &$value, $nocache = false) { if ($tpl_var != '') { - $this->tpl_vars[$tpl_var] = new Smarty_variable(null, $nocache, $scope); + $this->tpl_vars[$tpl_var] = new Smarty_variable(null, $nocache); $this->tpl_vars[$tpl_var]->value = &$value; } } + /** * wrapper function for Smarty 2 BC * * @param string $tpl_var the template variable name * @param mixed $ &$value the referenced value to assign - * @param boolean $nocache if true any output of this variable will be not cached - * @param boolean $scope the scope the variable will have (local,parent or root) */ - public function assign_by_ref($tpl_var, &$value, $nocache = false, $scope = SMARTY_LOCAL_SCOPE) + public function assign_by_ref($tpl_var, &$value) { - trigger_error("function call 'assign_by_ref' is unknown or deprecated, use 'assignByRef'", E_USER_NOTICE); - $this->assignByRef($tpl_var, $value, $nocache, $scope); + if($this->smarty->deprecation_notices) + trigger_error("function call 'assign_by_ref' is unknown or deprecated, use 'assignByRef'", E_USER_NOTICE); + $this->assignByRef($tpl_var, $value); } /** * appends values to template variables @@ -87,9 +86,8 @@ class Smarty_Internal_Data { * @param mixed $value the value to append * @param boolean $merge flag if array elements shall be merged * @param boolean $nocache if true any output of this variable will be not cached - * @param boolean $scope the scope the variable will have (local,parent or root) */ - public function append($tpl_var, $value = null, $merge = false, $nocache = false, $scope = SMARTY_LOCAL_SCOPE) + public function append($tpl_var, $value = null, $merge = false, $nocache = false) { if (is_array($tpl_var)) { // $tpl_var is an array, ignore $value @@ -98,12 +96,9 @@ class Smarty_Internal_Data { if (!isset($this->tpl_vars[$_key])) { $tpl_var_inst = $this->getVariable($_key, null, true, false); if ($tpl_var_inst instanceof Undefined_Smarty_Variable) { - $this->tpl_vars[$_key] = new Smarty_variable(null, $nocache, $scope); + $this->tpl_vars[$_key] = new Smarty_variable(null, $nocache); } else { $this->tpl_vars[$_key] = clone $tpl_var_inst; - if ($scope != SMARTY_LOCAL_SCOPE) { - $this->tpl_vars[$_key]->scope = $scope; - } } } if (!(is_array($this->tpl_vars[$_key]->value) || $this->tpl_vars[$_key]->value instanceof ArrayAccess)) { @@ -123,12 +118,9 @@ 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 Undefined_Smarty_Variable) { - $this->tpl_vars[$tpl_var] = new Smarty_variable(null, $nocache, $scope); + $this->tpl_vars[$tpl_var] = new Smarty_variable(null, $nocache); } else { $this->tpl_vars[$tpl_var] = clone $tpl_var_inst; - if ($scope != SMARTY_LOCAL_SCOPE) { - $this->tpl_vars[$tpl_var]->scope = $scope; - } } } if (!(is_array($this->tpl_vars[$tpl_var]->value) || $this->tpl_vars[$tpl_var]->value instanceof ArrayAccess)) { @@ -170,8 +162,8 @@ class Smarty_Internal_Data { } } } - /** - * wrapper function for Smarty 2 BC + + /** * * @param string $tpl_var the template variable name * @param mixed $ &$value the referenced value to append @@ -179,7 +171,8 @@ class Smarty_Internal_Data { */ public function append_by_ref($tpl_var, &$value, $merge = false) { - trigger_error("function call 'append_by_ref' is unknown or deprecated, use 'appendByRef'", E_USER_NOTICE); + if($this->smarty->deprecation_notices) + trigger_error("function call 'append_by_ref' is unknown or deprecated, use 'appendByRef'", E_USER_NOTICE); $this->appendByRef($tpl_var, $value, $merge); } /** @@ -212,8 +205,8 @@ class Smarty_Internal_Data { $_ptr = null; } } - if ($search_parents && isset($this->global_tpl_vars)) { - foreach ($this->global_tpl_vars AS $key => $var) { + if ($search_parents && isset(Smarty::$global_tpl_vars)) { + foreach (Smarty::$global_tpl_vars AS $key => $var) { $_result[$key] = $var->value; } } @@ -282,9 +275,9 @@ class Smarty_Internal_Data { $_ptr = null; } } - if (isset($this->smarty->global_tpl_vars[$variable])) { + if (isset(Smarty::$global_tpl_vars[$variable])) { // found it, return it - return $this->smarty->global_tpl_vars[$variable]; + return Smarty::$global_tpl_vars[$variable]; } if ($this->smarty->error_unassigned && $error_enable) { throw new SmartyException('Undefined Smarty variable "' . $variable . '"'); @@ -428,7 +421,7 @@ class Smarty_Variable { * @param boolean $nocache if true any output of this variable will be not cached * @param boolean $scope the scope the variable will have (local,parent or root) */ - public function __construct ($value = null, $nocache = false, $scope = SMARTY_LOCAL_SCOPE) + public function __construct ($value = null, $nocache = false, $scope = Smarty::SCOPE_LOCAL) { $this->value = $value; $this->nocache = $nocache; diff --git a/libs/sysplugins/smarty_internal_debug.php b/libs/sysplugins/smarty_internal_debug.php index ad1091b5..00e6a69c 100644 --- a/libs/sysplugins/smarty_internal_debug.php +++ b/libs/sysplugins/smarty_internal_debug.php @@ -87,7 +87,7 @@ class Smarty_Internal_Debug extends Smarty_Internal_Data { $_template = new Smarty_Template ($smarty->debug_tpl, $smarty); $_template->caching = false; $_template->force_compile = false; - $_template->security = false; + $_template->disableSecurity(); $_template->cache_id = null; $_template->compile_id = null; $_template->assign('template_data', self::$template_data); diff --git a/libs/sysplugins/smarty_internal_filter.php b/libs/sysplugins/smarty_internal_filter.php new file mode 100644 index 00000000..846a729e --- /dev/null +++ b/libs/sysplugins/smarty_internal_filter.php @@ -0,0 +1,89 @@ +smarty = $smarty; + } + /** + * Registers a filter function + * + * @param string $type filter type + * @param callback $callback + */ + public function registerFilter($type, $callback) + { + $this->smarty->registered_filters[$type][$this->_get_filter_name($callback)] = $callback; + } + + /** + * Unregisters a filter function + * + * @param string $type filter type + * @param callback $callback + */ + public function unregisterFilter($type, $callback) + { + $name = $this->_get_filter_name($callback); + if(isset($this->smarty->registered_filters[$type][$name])) { + unset($this->smarty->registered_filters[$type][$name]); + } + } + + + /** + * Return internal filter name + * + * @param callback $function_name + */ + public function _get_filter_name($function_name) + { + if (is_array($function_name)) { + $_class_name = (is_object($function_name[0]) ? + get_class($function_name[0]) : $function_name[0]); + return $_class_name . '_' . $function_name[1]; + } else { + return $function_name; + } + } + + + /** + * load a filter of specified type and name + * + * @param string $type filter type + * @param string $name filter name + * @return bool + */ + function loadFilter($type, $name) + { + $_plugin = "smarty_{$type}filter_{$name}"; + $_filter_name = $_plugin; + if (Smarty_Internal_Plugin_Loader::loadPlugin($_plugin, $this->smarty->plugins_dir)) { + if (class_exists($_plugin, false)) { + $_plugin = array($_plugin, 'execute'); + } + if (is_callable($_plugin)) { + return $this->smarty->registered_filters[$type][$_filter_name] = $_plugin; + } + } + throw new SmartyException("{$type}filter \"{$name}\" not callable"); + return false; + } + + +} +?> \ No newline at end of file diff --git a/libs/sysplugins/smarty_internal_filter_handler.php b/libs/sysplugins/smarty_internal_filter_handler.php index 1992b55e..32401492 100644 --- a/libs/sysplugins/smarty_internal_filter_handler.php +++ b/libs/sysplugins/smarty_internal_filter_handler.php @@ -34,7 +34,7 @@ class Smarty_Internal_Filter_Handler { if (!empty($smarty->autoload_filters[$type])) { foreach ((array)$smarty->autoload_filters[$type] as $name) { $plugin_name = "Smarty_{$type}filter_{$name}"; - if ($smarty->loadPlugin($plugin_name)) { + if (Smarty_Internal_Plugin_Loader::loadPlugin($plugin_name, $smarty->plugins_dir)) { if (function_exists($plugin_name)) { // use loaded Smarty2 style plugin $output = $plugin_name($output, $smarty); diff --git a/libs/sysplugins/smarty_internal_plugin_loader.php b/libs/sysplugins/smarty_internal_plugin_loader.php new file mode 100644 index 00000000..1c43ecca --- /dev/null +++ b/libs/sysplugins/smarty_internal_plugin_loader.php @@ -0,0 +1,64 @@ + diff --git a/libs/sysplugins/smarty_internal_register.php b/libs/sysplugins/smarty_internal_register.php index a1e3acd0..aee61584 100644 --- a/libs/sysplugins/smarty_internal_register.php +++ b/libs/sysplugins/smarty_internal_register.php @@ -1,121 +1,83 @@ - * @author Uwe Tews * @package Smarty - * @subpackage PluginsInternal - * @version 3-SVN$Rev: 3286 $ + * @author Uwe Tews */ +/** + * Class for register/unregister methods + */ class Smarty_Internal_Register { - protected $smarty; function __construct($smarty) { $this->smarty = $smarty; } - /** - * Registers block function to be used in templates + * Registers plugin to be used in templates * - * @param string $block_tag name of template block - * @param string $block_impl PHP function to register + * @param string $type plugin type + * @param string $tag name of template tag + * @param callback $callback PHP callback to register * @param boolean $cacheable if true (default) this fuction is cachable * @param array $cache_attr caching attributes if any */ - function block($block_tag, $block_impl, $cacheable = true, $cache_attr = array()) + + public function registerPlugin($type, $tag, $callback, $cacheable = true, $cache_attr = null) + { + if (isset($this->smarty->registered_plugins[$type][$tag])) { + throw new Exception("Plugin tag \"{$tag}\" already registered"); + } elseif (!is_callable($callback)) { + throw new Exception("Plugin \"{$tag}\" not callable"); + } else { + $this->smarty->registered_plugins[$type][$tag] = array($callback, (bool) $cacheable); + if (isset($cache_attr)&&in_array($type, array(Smarty::PLUGIN_BLOCK, Smarty::PLUGIN_FUNCTION))) { + $this->smarty->registered_plugins[$type][$tag][] = (array) $cache_attr; + } + } + } + + /** + * Unregister Plugin + * + * @param string $type of plugin + * @param string $tag name of plugin + */ + function unregisterPlugin($type, $tag) { - if (isset($this->smarty->registered_plugins['block'][$block_tag])) { - throw new SmartyException("Plugin tag \"{$block_tag}\" already registered"); - } elseif (!is_callable($block_impl)) { - throw new SmartyException("Plugin \"{$block_tag}\" not callable"); - } else { - $this->smarty->registered_plugins['block'][$block_tag] = - array($block_impl, $cacheable, $cache_attr); + if (isset($this->smarty->registered_plugins[$type][$tag])) { + unset($this->smarty->registered_plugins[$type][$tag]); + } + } + + /** + * Registers a resource to fetch a template + * + * @param string $type name of resource type + * @param array $callback array of callbacks to handle resource + */ + public function registerResource($type, $callback) + { + $this->smarty->registered_resources[$type] = array($callback, false); + } + + /** + * Unregisters a resource + * + * @param string $type name of resource type + */ + function unregisterResource($type) + { + if (isset($this->smarty->registered_resources[$type])) { + unset($this->smarty->registered_resources[$type]); } } - /** - * Registers compiler function - * - * @param string $compiler_tag of template function - * @param string $compiler_impl name of PHP function to register - * @param boolean $cacheable if true (default) this fuction is cachable - */ - function compilerFunction($compiler_tag, $compiler_impl, $cacheable = true) - { - if (isset($this->smarty->registered_plugins['compiler'][$compiler_tag])) { - throw new SmartyException("Plugin tag \"{$compiler_tag}\" already registered"); - } elseif (!is_callable($compiler_impl)) { - throw new SmartyException("Plugin \"{$compiler_tag}\" not callable"); - } else { - $this->smarty->registered_plugins['compiler'][$compiler_tag] = - array($compiler_impl, $cacheable); - } - } - - /** - * Registers custom function to be used in templates - * - * @param string $function_tag the name of the template function - * @param string $function_impl the name of the PHP function to register - * @param boolean $cacheable if true (default) this fuction is cachable - * @param array $cache_attr caching attributes if any - */ - function templateFunction($function_tag, $function_impl, $cacheable = true, $cache_attr = array()) - { - if (isset($this->smarty->registered_plugins['function'][$function_tag])) { - throw new SmartyException("Plugin tag \"{$function_tag}\" already registered"); - } elseif (!is_callable($function_impl)) { - throw new SmartyException("Plugin \"{$function_tag}\" not callable"); - } else { - $this->smarty->registered_plugins['function'][$function_tag] = - array($function_impl, $cacheable, $cache_attr); - } - } - - /** - * Registers modifier to be used in templates - * - * @param string $modifier_name name of template modifier - * @param string $modifier_impl name of PHP function to register - */ - function modifier($modifier_name, $modifier_impl) - { - if (isset($this->smarty->registered_plugins['modifier'][$modifier_name])) { - throw new SmartyException("Plugin \"{$modifier_name}\" already registered"); - } elseif (!is_callable($modifier_impl)) { - throw new SmartyException("Plugin \"{$modifier_name}\" not callable"); - } else { - $this->smarty->registered_plugins['modifier'][$modifier_name] = - array($modifier_impl); - } - } /** * Registers object to be used in templates @@ -126,7 +88,7 @@ class Smarty_Internal_Register { * @param boolean $smarty_args smarty argument format, else traditional * @param mixed $ null | array $block_functs list of methods that are block format */ - function templateObject($object_name, $object_impl, $allowed = array(), $smarty_args = true, $block_methods = array()) + function registerObject($object_name, $object_impl, $allowed = array(), $smarty_args = true, $block_methods = array()) { // test if allowed methodes callable if (!empty($allowed)) { @@ -155,7 +117,7 @@ class Smarty_Internal_Register { * @param string $class name of template class * @param string $class_impl the referenced PHP class to register */ - function templateClass($class_name, $class_impl) + function registerClass($class_name, $class_impl) { // test if exists if (!class_exists($class_impl)) { @@ -165,100 +127,33 @@ class Smarty_Internal_Register { $this->smarty->registered_classes[$class_name] = $class_impl; } - /** - * Registers an output filter function to apply - * to a template output - * - * @param callback $function_name - */ - function outputFilter($function_name) - { - $this->smarty->registered_filters['output'][$this->smarty->_get_filter_name($function_name)] = $function_name; - } - - /** - * Registers a postfilter function to apply - * to a compiled template after compilation - * - * @param callback $function_name - */ - function postFilter($function_name) - { - $this->smarty->registered_filters['post'][$this->smarty->_get_filter_name($function_name)] = $function_name; - } - - /** - * Registers a prefilter function to apply - * to a template before compiling - * - * @param callback $function_name - */ - function preFilter($function_name) - { - $this->smarty->registered_filters['pre'][$this->smarty->_get_filter_name($function_name)] = $function_name; - } - - /** - * Registers a resource to fetch a template - * - * @param string $resource_type name of resource type - * @param array $function_names array of functions to handle resource - */ - function resource($resource_type, $function_names) - { - if (count($function_names) == 4) { - $this->smarty->_plugins['resource'][$resource_type] = - array($function_names, false); - } elseif (count($function_names) == 5) { - $this->smarty->_plugins['resource'][$resource_type] = - array(array(array(&$function_names[0], $function_names[1]), - array(&$function_names[0], $function_names[2]), - array(&$function_names[0], $function_names[3]), - array(&$function_names[0], $function_names[4])), - false); - } else { - throw new SmartyException("malformed function-list for '$resource_type' in register_resource"); - } - } - - /** - * Registers an output filter function which - * runs over any variable output - * - * @param callback $function_name - */ - function variableFilter($function_name) - { - $this->smarty->registered_filters['variable'][$this->smarty->_get_filter_name($function_name)] = $function_name; - } - /** * Registers a default plugin handler * - * @param $function_name mixed string | array $plugin class/methode name + * @param $callback mixed string | array $plugin class/methode name */ - function defaultPluginHandler($function_name) + function registerDefaultPluginHandler($callback) { - if (is_callable($function_name)) { - $this->smarty->default_plugin_handler_func = $function_name; + if (is_callable($callback)) { + $this->smarty->default_plugin_handler_func = $callback; } else { - throw new SmartyException("Default plugin handler '$function_name' not callable"); + throw new SmartyException("Default plugin handler '$callback' not callable"); } } /** * Registers a default template handler * - * @param $function_name mixed string | array class/method name + * @param $callback mixed string | array class/method name */ - function defaultTemplateHandler($function_name) + function registerDefaultTemplateHandler($callback) { - if (is_callable($function_name)) { - $this->smarty->default_template_handler_func = $function_name; + if (is_callable($callback)) { + $this->smarty->default_template_handler_func = $callback; } else { - throw new SmartyException("Default template handler '$function_name' not callable"); + throw new SmartyException("Default template handler '$callback' not callable"); } } -} +} ?> \ No newline at end of file diff --git a/libs/sysplugins/smarty_internal_resource_eval.php b/libs/sysplugins/smarty_internal_resource_eval.php index 2eb20857..c4a75f58 100644 --- a/libs/sysplugins/smarty_internal_resource_eval.php +++ b/libs/sysplugins/smarty_internal_resource_eval.php @@ -86,5 +86,4 @@ class Smarty_Internal_Resource_Eval { return false; } } - ?> \ No newline at end of file diff --git a/libs/sysplugins/smarty_internal_resource_extends.php b/libs/sysplugins/smarty_internal_resource_extends.php index 95572f31..74dc0f9b 100644 --- a/libs/sysplugins/smarty_internal_resource_extends.php +++ b/libs/sysplugins/smarty_internal_resource_extends.php @@ -58,9 +58,9 @@ class Smarty_Internal_Resource_Extends { foreach ($_files as $_file) { $_filepath = $_template->buildTemplateFilepath ($_file); if ($_filepath !== false) { - if ($_template->security) { - $_template->smarty->security_handler->isTrustedResourceDir($_filepath); - } + if (is_object($_template->smarty->security_policy)) { + $_template->smarty->security_policy->isTrustedResourceDir($_filepath); + } } $sha1String .= $_filepath; $this->allFilepaths[$_file] = $_filepath; @@ -98,14 +98,14 @@ class Smarty_Internal_Resource_Extends { } // read template file if ($_filepath != $_first) { - $_template->properties['file_dependency'][sha1($_filepath)] = array($_filepath, filemtime($_filepath)); + $_template->properties['file_dependency'][sha1($_filepath)] = array($_filepath, filemtime($_filepath),'file'); } $_template->template_filepath = $_filepath; $_content = file_get_contents($_filepath); if ($_filepath != $_last) { if (preg_match_all("!({$this->_ldl}block\s(.+?){$this->_rdl})!", $_content, $_open) != preg_match_all("!({$this->_ldl}/block{$this->_rdl})!", $_content, $_close)) { - $this->smarty->trigger_error("unmatched {block} {/block} pairs in file '$_filepath'"); + $this->smarty->triggerError("unmatched {block} {/block} pairs in file '$_filepath'"); } preg_match_all("!{$this->_ldl}block\s(.+?){$this->_rdl}|{$this->_ldl}/block{$this->_rdl}!", $_content, $_result, PREG_OFFSET_CAPTURE); $_result_count = count($_result[0]); @@ -123,7 +123,7 @@ class Smarty_Internal_Resource_Extends { } $_block_content = str_replace($this->smarty->left_delimiter . '$smarty.block.parent' . $this->smarty->right_delimiter, '%%%%SMARTY_PARENT%%%%', substr($_content, $_result[0][$_start][1] + strlen($_result[0][$_start][0]), $_result[0][$_start + $_end][1] - $_result[0][$_start][1] - + strlen($_result[0][$_start][0]))); - $this->saveBlockData($_block_content, $_result[0][$_start][0], $_filepath, $_template); + Smarty_Internal_Compile_Block::saveBlockData($_block_content, $_result[0][$_start][0], $_template, $_filepath); $_start = $_start + $_end + 1; } } else { @@ -133,48 +133,6 @@ class Smarty_Internal_Resource_Extends { } } - /** - * saveBlockData - */ - protected function saveBlockData($block_content, $block_tag, $_filepath, $_template) - { - if (0 == preg_match("!(.?)(name=)(.*?)(?=(\s|{$this->_rdl}))!", $block_tag, $_match)) { - $this->smarty->trigger_error("'{$block_tag}' missing name attribute in file '$_filepath'"); - } else { - $_name = trim($_match[3], '\'"'); - // replace {$smarty.block.child} - if (strpos($block_content, $this->smarty->left_delimiter . '$smarty.block.child' . $this->smarty->right_delimiter) !== false) { - if (isset($_template->block_data[$_name])) { - $block_content = str_replace($this->smarty->left_delimiter . '$smarty.block.child' . $this->smarty->right_delimiter, - $_template->block_data[$_name]['source'], $block_content); - unset($_template->block_data[$_name]); - } else { - $block_content = str_replace($this->smarty->left_delimiter . '$smarty.block.child' . $this->smarty->right_delimiter, - '', $block_content); - } - } - if (isset($_template->block_data[$_name])) { - if (strpos($_template->block_data[$_name]['source'], '%%%%SMARTY_PARENT%%%%') !== false) { - $_template->block_data[$_name]['source'] = - str_replace('%%%%SMARTY_PARENT%%%%', $block_content, $_template->block_data[$_name]['source']); - } elseif ($_template->block_data[$_name]['mode'] == 'prepend') { - $_template->block_data[$_name]['source'] .= $block_content; - } elseif ($_template->block_data[$_name]['mode'] == 'append') { - $_template->block_data[$_name]['source'] = $block_content . $_template->block_data[$_name]['source']; - } - } else { - $_template->block_data[$_name]['source'] = $block_content; - } - if (preg_match('/(.?)(append)(.*)/', $block_tag, $_match) != 0) { - $_template->block_data[$_name]['mode'] = 'append'; - } elseif (preg_match('/(.?)(prepend)(.*)/', $block_tag, $_match) != 0) { - $_template->block_data[$_name]['mode'] = 'prepend'; - } else { - $_template->block_data[$_name]['mode'] = 'replace'; - } - $_template->block_data[$_name]['file'] = $_filepath; - } - } /** * Get filepath to compiled template diff --git a/libs/sysplugins/smarty_internal_resource_file.php b/libs/sysplugins/smarty_internal_resource_file.php index abdd6c5a..79decc59 100644 --- a/libs/sysplugins/smarty_internal_resource_file.php +++ b/libs/sysplugins/smarty_internal_resource_file.php @@ -51,8 +51,8 @@ class Smarty_Internal_Resource_File { $_filepath = $_template->buildTemplateFilepath (); if ($_filepath !== false) { - if ($_template->security) { - $_template->smarty->security_handler->isTrustedResourceDir($_filepath); + if (is_object($_template->smarty->security_policy)) { + $_template->smarty->security_policy->isTrustedResourceDir($_filepath); } } $_template->templateUid = sha1($_filepath); @@ -79,8 +79,8 @@ class Smarty_Internal_Resource_File { public function getTemplateSource($_template) { // read template file - if (file_exists($_template->getTemplateFilepath())) { - $_template->template_source = file_get_contents($_template->getTemplateFilepath()); + if (file_exists($_tfp = $_template->getTemplateFilepath())) { + $_template->template_source = file_get_contents($_tfp); return true; } else { return false; diff --git a/libs/sysplugins/smarty_internal_resource_php.php b/libs/sysplugins/smarty_internal_resource_php.php index d0d285f6..16c77446 100644 --- a/libs/sysplugins/smarty_internal_resource_php.php +++ b/libs/sysplugins/smarty_internal_resource_php.php @@ -50,8 +50,8 @@ class Smarty_Internal_Resource_PHP { { $_filepath = $_template->buildTemplateFilepath (); - if ($_template->security) { - $_template->smarty->security_handler->isTrustedResourceDir($_filepath); + if (is_object($_template->smarty->security_policy)) { + $_template->smarty->security_policy->isTrustedResourceDir($_filepath); } $_template->templateUid = sha1($_filepath); return $_filepath; @@ -76,8 +76,8 @@ class Smarty_Internal_Resource_PHP { */ public function getTemplateSource($_template) { - if (file_exists($_template->getTemplateFilepath())) { - $_template->template_source = file_get_contents($_template->getTemplateFilepath()); + if (file_exists($_tfp = $_template->getTemplateFilepath())) { + $_template->template_source = file_get_contents($_tfp); return true; } else { return false; diff --git a/libs/sysplugins/smarty_internal_resource_registered.php b/libs/sysplugins/smarty_internal_resource_registered.php index d120d179..467da11a 100644 --- a/libs/sysplugins/smarty_internal_resource_registered.php +++ b/libs/sysplugins/smarty_internal_resource_registered.php @@ -14,9 +14,16 @@ * Smarty Internal Plugin Resource Registered */ class Smarty_Internal_Resource_Registered { - public function __construct($smarty) + public function __construct($template, $resource_type = null) { - $this->smarty = $smarty; + $this->smarty = $template->smarty; + if (isset($resource_type)) { + $template->smarty->registerResource($resource_type, + array("smarty_resource_{$resource_type}_source", + "smarty_resource_{$resource_type}_timestamp", + "smarty_resource_{$resource_type}_secure", + "smarty_resource_{$resource_type}_trusted")); + } } // classes used for compiling Smarty templates from file resource public $compiler_class = 'Smarty_Internal_SmartyTemplateCompiler'; @@ -62,7 +69,7 @@ class Smarty_Internal_Resource_Registered { { // return timestamp $time_stamp = false; - call_user_func_array($this->smarty->_plugins['resource'][$_template->resource_type][0][1], + call_user_func_array($this->smarty->registered_resources[$_template->resource_type][0][1], array($_template->resource_name, &$time_stamp, $this->smarty)); return is_numeric($time_stamp) ? (int)$time_stamp : $time_stamp; } @@ -77,7 +84,7 @@ class Smarty_Internal_Resource_Registered { { // return timestamp $time_stamp = false; - call_user_func_array($this->smarty->_plugins['resource'][$_resource_type][0][1], + call_user_func_array($this->smarty->registered_resources[$_resource_type][0][1], array($_resource_name, &$time_stamp, $this->smarty)); return is_numeric($time_stamp) ? (int)$time_stamp : $time_stamp; } @@ -91,7 +98,7 @@ class Smarty_Internal_Resource_Registered { public function getTemplateSource($_template) { // return template string - return call_user_func_array($this->smarty->_plugins['resource'][$_template->resource_type][0][0], + return call_user_func_array($this->smarty->registered_resources[$_template->resource_type][0][0], array($_template->resource_name, &$_template->template_source, $this->smarty)); } diff --git a/libs/sysplugins/smarty_internal_security_handler.php b/libs/sysplugins/smarty_internal_security_handler.php deleted file mode 100644 index daf567b2..00000000 --- a/libs/sysplugins/smarty_internal_security_handler.php +++ /dev/null @@ -1,148 +0,0 @@ -smarty = $smarty; - } - /** - * Check if PHP function is trusted. - * - * @param string $function_name - * @param object $compiler compiler object - * @return boolean true if function is trusted - */ - function isTrustedPhpFunction($function_name, $compiler) - { - if (empty($this->smarty->security_policy->php_functions) || in_array($function_name, $this->smarty->security_policy->php_functions)) { - return true; - } else { - $compiler->trigger_template_error ("PHP function '{$function_name}' not allowed by security setting"); - return false; - } - } - - /** - * Check if static class is trusted. - * - * @param string $class_name - * @param object $compiler compiler object - * @return boolean true if class is trusted - */ - function isTrustedStaticClass($class_name, $compiler) - { - if (empty($this->smarty->security_policy->static_classes) || in_array($class_name, $this->smarty->security_policy->static_classes)) { - return true; - } else { - $compiler->trigger_template_error ("access to static class '{$class_name}' not allowed by security setting"); - return false; - } - } - /** - * Check if modifier is trusted. - * - * @param string $modifier_name - * @param object $compiler compiler object - * @return boolean true if modifier is trusted - */ - function isTrustedModifier($modifier_name, $compiler) - { - if (empty($this->smarty->security_policy->modifiers) || in_array($modifier_name, $this->smarty->security_policy->modifiers)) { - return true; - } else { - $compiler->trigger_template_error ("modifier '{$modifier_name}' not allowed by security setting"); - return false; - } - } - /** - * Check if stream is trusted. - * - * @param string $stream_name - * @param object $compiler compiler object - * @return boolean true if stream is trusted - */ - function isTrustedStream($stream_name) - { - if (empty($this->smarty->security_policy->streams) || in_array($stream_name, $this->smarty->security_policy->streams)) { - return true; - } else { - throw new SmartyException ("stream '{$stream_name}' not allowed by security setting"); - return false; - } - } - - /** - * Check if directory of file resource is trusted. - * - * @param string $filepath - * @param object $compiler compiler object - * @return boolean true if directory is trusted - */ - function isTrustedResourceDir($filepath) - { - $_rp = realpath($filepath); - if (isset($this->smarty->template_dir)) { - foreach ((array)$this->smarty->template_dir as $curr_dir) { - if (($_cd = realpath($curr_dir)) !== false && - strncmp($_rp, $_cd, strlen($_cd)) == 0 && - (strlen($_rp) == strlen($_cd) || substr($_rp, strlen($_cd), 1) == DS)) { - return true; - } - } - } - if (!empty($this->smarty->security_policy->secure_dir)) { - foreach ((array)$this->smarty->security_policy->secure_dir as $curr_dir) { - if (($_cd = realpath($curr_dir)) !== false) { - if ($_cd == $_rp) { - return true; - } elseif (strncmp($_rp, $_cd, strlen($_cd)) == 0 && - (strlen($_rp) == strlen($_cd) || substr($_rp, strlen($_cd), 1) == DS)) { - return true; - } - } - } - } - - throw new SmartyException ("directory '{$_rp}' not allowed by security setting"); - return false; - } - - /** - * Check if directory of file resource is trusted. - * - * @param string $filepath - * @param object $compiler compiler object - * @return boolean true if directory is trusted - */ - function isTrustedPHPDir($filepath) - { - $_rp = realpath($filepath); - if (!empty($this->smarty->security_policy->trusted_dir)) { - foreach ((array)$this->smarty->security_policy->trusted_dir as $curr_dir) { - if (($_cd = realpath($curr_dir)) !== false) { - if ($_cd == $_rp) { - return true; - } elseif (strncmp($_rp, $_cd, strlen($_cd)) == 0 && - substr($_rp, strlen($_cd), 1) == DS) { - return true; - } - } - } - } - - throw new SmartyException ("directory '{$_rp}' not allowed by security setting"); - return false; - } -} - -?> \ No newline at end of file diff --git a/libs/sysplugins/smarty_internal_template.php b/libs/sysplugins/smarty_internal_template.php index e8a4e7f8..59613054 100644 --- a/libs/sysplugins/smarty_internal_template.php +++ b/libs/sysplugins/smarty_internal_template.php @@ -24,13 +24,12 @@ class Smarty_Internal_Template extends Smarty_Internal_Data { public $cache_lifetime = null; public $cacher_class = null; public $caching_type = null; - public $force_compile = null; public $forceNocache = false; // Template resource public $template_resource = null; public $resource_type = null; public $resource_name = null; - public $resource_object = null; +// public $resource_object = null; private $isExisting = null; public $templateUid = ''; // Template source @@ -45,13 +44,14 @@ class Smarty_Internal_Template extends Smarty_Internal_Data { public $suppressHeader = false; public $suppressFileDependency = false; public $has_nocache_code = false; + public $write_compiled_code = true; // Rendered content public $rendered_content = null; // Cache file private $cached_filepath = null; public $cached_timestamp = null; private $isCached = null; - private $cache_resource_object = null; +// private $cache_resource_object = null; private $cacheFileChecked = false; // template variables public $tpl_vars = array(); @@ -65,7 +65,6 @@ class Smarty_Internal_Template extends Smarty_Internal_Data { 'function' => array()); // required plugins public $required_plugins = array('compiled' => array(), 'nocache' => array()); - public $security = false; public $saved_modifier = null; public $smarty = null; // blocks for template inheritance @@ -87,25 +86,14 @@ class Smarty_Internal_Template extends Smarty_Internal_Data { // Smarty parameter $this->cache_id = $_cache_id === null ? $this->smarty->cache_id : $_cache_id; $this->compile_id = $_compile_id === null ? $this->smarty->compile_id : $_compile_id; - $this->force_compile = $this->smarty->force_compile; $this->caching = $_caching === null ? $this->smarty->caching : $_caching; - if ($this->caching === true) $this->caching = SMARTY_CACHING_LIFETIME_CURRENT; + if ($this->caching === true) $this->caching = Smarty::CACHING_LIFETIME_CURRENT; $this->cache_lifetime = $_cache_lifetime === null ?$this->smarty->cache_lifetime : $_cache_lifetime; - $this->force_cache = $this->smarty->force_cache; - $this->security = $this->smarty->security; $this->parent = $_parent; // dummy local smarty variable $this->tpl_vars['smarty'] = new Smarty_Variable; // Template resource $this->template_resource = $template_resource; - // parse resource name - if (!$this->parseResourceName ($template_resource, $this->resource_type, $this->resource_name, $this->resource_object)) { - throw new SmartyException ("Unable to parse resource name \"{$template_resource}\""); - } - // load cache resource - if (!$this->resource_object->isEvaluated && ($this->caching == SMARTY_CACHING_LIFETIME_CURRENT || $this->caching == SMARTY_CACHING_LIFETIME_SAVED)) { - $this->cache_resource_object = $this->smarty->cache->loadResource(); - } // copy block data of template inheritance if ($this->parent instanceof Smarty_Template or $this->parent instanceof Smarty_Internal_Template) { $this->block_data = $this->parent->block_data; @@ -187,7 +175,7 @@ class Smarty_Internal_Template extends Smarty_Internal_Data { { $this->isExisting(true); if ($this->mustCompile === null) { - $this->mustCompile = ($this->resource_object->usesCompiler && ($this->force_compile || $this->resource_object->isEvaluated || $this->getCompiledTimestamp () === false || + $this->mustCompile = ($this->resource_object->usesCompiler && ($this->smarty->force_compile || $this->resource_object->isEvaluated || $this->getCompiledTimestamp () === false || // ($this->smarty->compile_check && $this->getCompiledTimestamp () !== $this->getTemplateTimestamp ()))); ($this->smarty->compile_check && $this->getCompiledTimestamp () < $this->getTemplateTimestamp ()))); } @@ -249,7 +237,7 @@ class Smarty_Internal_Template extends Smarty_Internal_Data { { if (!$this->resource_object->isEvaluated) { $this->properties['file_dependency'] = array(); - $this->properties['file_dependency'][$this->templateUid] = array($this->getTemplateFilepath(), $this->getTemplateTimestamp()); + $this->properties['file_dependency'][$this->templateUid] = array($this->getTemplateFilepath(), $this->getTemplateTimestamp(),$this->resource_type); } if ($this->smarty->debugging) { Smarty_Internal_Debug::start_compile($this); @@ -257,7 +245,7 @@ class Smarty_Internal_Template extends Smarty_Internal_Data { // compile template if (!is_object($this->compiler_object)) { // load compiler - $this->smarty->loadPlugin($this->resource_object->compiler_class); + Smarty_Internal_Plugin_Loader::loadPlugin($this->resource_object->compiler_class,$this->smarty->plugins_dir); $this->compiler_object = new $this->resource_object->compiler_class($this->resource_object->template_lexer_class, $this->resource_object->template_parser_class, $this->smarty); } // compile locking @@ -278,7 +266,7 @@ class Smarty_Internal_Template extends Smarty_Internal_Data { throw $e; } // compiling succeded - if (!$this->resource_object->isEvaluated) { + if (!$this->resource_object->isEvaluated && $this->write_compiled_code) { // write compiled template Smarty_Internal_Write_File::writeFile($this->getCompiledFilepath(), $this->compiled_template, $this->smarty); } @@ -296,11 +284,8 @@ class Smarty_Internal_Template extends Smarty_Internal_Data { */ public function getCachedFilepath () { - if (!isset($this->cache_resource_object)) { - $this->cache_resource_object = $this->smarty->cache->loadResource(); - } return $this->cached_filepath === null ? - $this->cached_filepath = ($this->resource_object->isEvaluated || !($this->caching == SMARTY_CACHING_LIFETIME_CURRENT || $this->caching == SMARTY_CACHING_LIFETIME_SAVED)) ? false : $this->cache_resource_object->getCachedFilepath($this) : + $this->cached_filepath = ($this->resource_object->isEvaluated || !($this->caching == Smarty::CACHING_LIFETIME_CURRENT || $this->caching == Smarty::CACHING_LIFETIME_SAVED)) ? false : $this->cache_resource_object->getCachedFilepath($this) : $this->cached_filepath; } @@ -313,11 +298,8 @@ class Smarty_Internal_Template extends Smarty_Internal_Data { */ public function getCachedTimestamp () { - if (!isset($this->cache_resource_object)) { - $this->cache_resource_object = $this->smarty->cache->loadResource(); - } return $this->cached_timestamp === null ? - $this->cached_timestamp = ($this->resource_object->isEvaluated || !($this->caching == SMARTY_CACHING_LIFETIME_CURRENT || $this->caching == SMARTY_CACHING_LIFETIME_SAVED)) ? false : $this->cache_resource_object->getCachedTimestamp($this) : + $this->cached_timestamp = ($this->resource_object->isEvaluated || !($this->caching == Smarty::CACHING_LIFETIME_CURRENT || $this->caching == Smarty::CACHING_LIFETIME_SAVED)) ? false : $this->cache_resource_object->getCachedTimestamp($this) : $this->cached_timestamp; } @@ -328,11 +310,8 @@ class Smarty_Internal_Template extends Smarty_Internal_Data { */ public function getCachedContent () { - if (!isset($this->cache_resource_object)) { - $this->cache_resource_object = $this->smarty->cache->loadResource(); - } return $this->rendered_content === null ? - $this->rendered_content = ($this->resource_object->isEvaluated || !($this->caching == SMARTY_CACHING_LIFETIME_CURRENT || $this->caching == SMARTY_CACHING_LIFETIME_SAVED)) ? false : $this->cache_resource_object->getCachedContents($this) : + $this->rendered_content = ($this->resource_object->isEvaluated || !($this->caching == Smarty::CACHING_LIFETIME_CURRENT || $this->caching == Smarty::CACHING_LIFETIME_SAVED)) ? false : $this->cache_resource_object->getCachedContents($this) : $this->rendered_content; } @@ -341,7 +320,7 @@ class Smarty_Internal_Template extends Smarty_Internal_Data { */ public function writeCachedContent ($content) { - if ($this->resource_object->isEvaluated || !($this->caching == SMARTY_CACHING_LIFETIME_CURRENT || $this->caching == SMARTY_CACHING_LIFETIME_SAVED)) { + if ($this->resource_object->isEvaluated || !($this->caching == Smarty::CACHING_LIFETIME_CURRENT || $this->caching == Smarty::CACHING_LIFETIME_SAVED)) { // don't write cache file return false; } @@ -360,15 +339,12 @@ class Smarty_Internal_Template extends Smarty_Internal_Data { { if ($this->isCached === null) { $this->isCached = false; - if (($this->caching == SMARTY_CACHING_LIFETIME_CURRENT || $this->caching == SMARTY_CACHING_LIFETIME_SAVED) && !$this->resource_object->isEvaluated) { - if (!isset($this->cache_resource_object)) { - $this->cache_resource_object = $this->smarty->cache->loadResource(); - } + if (($this->caching == Smarty::CACHING_LIFETIME_CURRENT || $this->caching == Smarty::CACHING_LIFETIME_SAVED) && !$this->resource_object->isEvaluated) { $cachedTimestamp = $this->getCachedTimestamp(); - if ($cachedTimestamp === false || $this->force_compile || $this->force_cache) { + if ($cachedTimestamp === false || $this->smarty->force_compile || $this->smarty->force_cache) { return $this->isCached; } - if ($this->caching === SMARTY_CACHING_LIFETIME_SAVED || ($this->caching == SMARTY_CACHING_LIFETIME_CURRENT && (time() <= ($cachedTimestamp + $this->cache_lifetime) || $this->cache_lifetime < 0))) { + if ($this->caching === Smarty::CACHING_LIFETIME_SAVED || ($this->caching == Smarty::CACHING_LIFETIME_CURRENT && (time() <= ($cachedTimestamp + $this->cache_lifetime) || $this->cache_lifetime < 0))) { if ($this->smarty->debugging) { Smarty_Internal_Debug::start_cache($this); } @@ -381,7 +357,7 @@ class Smarty_Internal_Template extends Smarty_Internal_Data { return $this->isCached; } $this->cacheFileChecked = true; - if ($this->caching === SMARTY_CACHING_LIFETIME_SAVED && $this->properties['cache_lifetime'] >= 0 && (time() > ($this->getCachedTimestamp() + $this->properties['cache_lifetime']))) { + if ($this->caching === Smarty::CACHING_LIFETIME_SAVED && $this->properties['cache_lifetime'] >= 0 && (time() > ($this->getCachedTimestamp() + $this->properties['cache_lifetime']))) { $this->tpl_vars = array(); $this->rendered_content = null; return $this->isCached; @@ -390,10 +366,10 @@ class Smarty_Internal_Template extends Smarty_Internal_Data { $resource_type = null; $resource_name = null; foreach ($this->properties['file_dependency'] as $_file_to_check) { - $this->getResourceTypeName($_file_to_check[0], $resource_type, $resource_name); - If ($resource_type == 'file') { + If ($_file_to_check[2] == 'file' || $_file_to_check[2] == 'extends' || $_file_to_check[2] == 'php') { $mtime = filemtime($_file_to_check[0]); } else { + $this->getResourceTypeName($_file_to_check[0], $resource_type, $resource_name); $resource_handler = $this->loadTemplateResourceHandler($resource_type); $mtime = $resource_handler->getTemplateTimestampTypeName($resource_type, $resource_name); } @@ -441,10 +417,10 @@ class Smarty_Internal_Template extends Smarty_Internal_Data { $resource_type = null; $resource_name = null; foreach ($this->properties['file_dependency'] as $_file_to_check) { - $this->getResourceTypeName($_file_to_check[0], $resource_type, $resource_name); - If ($resource_type == 'file') { + If ($_file_to_check[2] == 'file' || $_file_to_check[2] == 'extends' || $_file_to_check[2] == 'php') { $mtime = filemtime($_file_to_check[0]); } else { + $this->getResourceTypeName($_file_to_check[0], $resource_type, $resource_name); $resource_handler = $this->loadTemplateResourceHandler($resource_type); $mtime = $resource_handler->getTemplateTimestampTypeName($resource_type, $resource_name); } @@ -477,7 +453,7 @@ class Smarty_Internal_Template extends Smarty_Internal_Data { } $this->rendered_content = ob_get_clean(); if (!$this->resource_object->isEvaluated && empty($this->properties['file_dependency'][$this->templateUid])) { - $this->properties['file_dependency'][$this->templateUid] = array($this->getTemplateFilepath(), $this->getTemplateTimestamp()); + $this->properties['file_dependency'][$this->templateUid] = array($this->getTemplateFilepath(), $this->getTemplateTimestamp(),$this->resource_type); } if ($this->parent instanceof Smarty_Template or $this->parent instanceof Smarty_Internal_Template) { $this->parent->properties['file_dependency'] = array_merge($this->parent->properties['file_dependency'], $this->properties['file_dependency']); @@ -493,7 +469,7 @@ class Smarty_Internal_Template extends Smarty_Internal_Data { Smarty_Internal_Debug::end_render($this); } // write to cache when nessecary - if (!$this->resource_object->isEvaluated && ($this->caching == SMARTY_CACHING_LIFETIME_SAVED || $this->caching == SMARTY_CACHING_LIFETIME_CURRENT)) { + if (!$this->resource_object->isEvaluated && ($this->caching == Smarty::CACHING_LIFETIME_SAVED || $this->caching == Smarty::CACHING_LIFETIME_CURRENT)) { if ($this->smarty->debugging) { Smarty_Internal_Debug::start_cache($this); } @@ -591,7 +567,7 @@ class Smarty_Internal_Template extends Smarty_Internal_Data { // cache template object under a unique ID // do not cache eval resources if ($resource_type != 'eval') { - $this->smarty->template_objects[crc32($this->template_resource . $this->cache_id . $this->compile_id)] = $this; + $this->smarty->template_objects[sha1($this->template_resource . $this->cache_id . $this->compile_id)] = $this; } return true; } @@ -634,25 +610,25 @@ class Smarty_Internal_Template extends Smarty_Internal_Data { /** * Update Smarty variables in other scopes */ - public function updateParentVariables ($scope = SMARTY_LOCAL_SCOPE) + public function updateParentVariables ($scope = Smarty::SCOPE_LOCAL) { $has_root = false; foreach ($this->tpl_vars as $_key => $_variable) { $_variable_scope = $this->tpl_vars[$_key]->scope; - if ($scope == SMARTY_LOCAL_SCOPE && $_variable_scope == SMARTY_LOCAL_SCOPE) { + if ($scope == Smarty::SCOPE_LOCAL && $_variable_scope == Smarty::SCOPE_LOCAL) { continue; } - if (isset($this->parent) && ($scope == SMARTY_PARENT_SCOPE || $_variable_scope == SMARTY_PARENT_SCOPE)) { + if (isset($this->parent) && ($scope == Smarty::SCOPE_PARENT || $_variable_scope == Smarty::SCOPE_PARENT)) { if (isset($this->parent->tpl_vars[$_key])) { // variable is already defined in parent, copy value $this->parent->tpl_vars[$_key]->value = $this->tpl_vars[$_key]->value; } else { // create variable in parent $this->parent->tpl_vars[$_key] = clone $_variable; - $this->parent->tpl_vars[$_key]->scope = SMARTY_LOCAL_SCOPE; + $this->parent->tpl_vars[$_key]->scope = Smarty::SCOPE_LOCAL; } } - if ($scope == SMARTY_ROOT_SCOPE || $_variable_scope == SMARTY_ROOT_SCOPE) { + if ($scope == Smarty::SCOPE_ROOT || $_variable_scope == Smarty::SCOPE_ROOT) { if ($this->parent == null) { continue; } @@ -670,18 +646,18 @@ class Smarty_Internal_Template extends Smarty_Internal_Data { } else { // create variable in root $root_ptr->tpl_vars[$_key] = clone $_variable; - $root_ptr->tpl_vars[$_key]->scope = SMARTY_LOCAL_SCOPE; + $root_ptr->tpl_vars[$_key]->scope = Smarty::SCOPE_LOCAL; } } - if ($scope == SMARTY_GLOBAL_SCOPE || $_variable_scope == SMARTY_GLOBAL_SCOPE) { - if (isset($this->smarty->global_tpl_vars[$_key])) { + if ($scope == Smarty::SCOPE_GLOBAL || $_variable_scope == Smarty::SCOPE_GLOBAL) { + if (isset(Smarty::$global_tpl_vars[$_key])) { // variable is already defined in root, copy value - $this->smarty->global_tpl_vars[$_key]->value = $this->tpl_vars[$_key]->value; + Smarty::$global_tpl_vars[$_key]->value = $this->tpl_vars[$_key]->value; } else { - // create variable in root - $this->smarty->global_tpl_vars[$_key] = clone $_variable; + // create global variable + Smarty::$global_tpl_vars[$_key] = clone $_variable; } - $this->smarty->global_tpl_vars[$_key]->scope = SMARTY_LOCAL_SCOPE; + Smarty::$global_tpl_vars[$_key]->scope = Smarty::SCOPE_LOCAL; } } } @@ -706,9 +682,7 @@ class Smarty_Internal_Template extends Smarty_Internal_Data { // 1 char is not resource type, but part of filepath $resource_type = 'file'; $resource_name = $template_resource; - } else { - $resource_type = $resource_type; - } + } } } @@ -721,34 +695,29 @@ class Smarty_Internal_Template extends Smarty_Internal_Data { protected function loadTemplateResourceHandler ($resource_type) { // try registered resource - if (isset($this->smarty->_plugins['resource'][$resource_type])) { - return new Smarty_Internal_Resource_Registered($this->smarty); + if (isset($this->smarty->registered_resources[$resource_type])) { + return new Smarty_Internal_Resource_Registered($this); } else { // try sysplugins dir - if (in_array($resource_type, array('file', 'string', 'extends', 'php', 'registered', 'stream', 'eval'))) { + if (in_array($resource_type, array('file', 'string', 'extends', 'php', 'stream', 'eval'))) { $_resource_class = 'Smarty_Internal_Resource_' . ucfirst($resource_type); return new $_resource_class($this->smarty); } else { // try plugins dir $_resource_class = 'Smarty_Resource_' . ucfirst($resource_type); - if ($this->smarty->loadPlugin($_resource_class)) { + if (Smarty_Internal_Plugin_Loader::loadPlugin($_resource_class,$this->smarty->plugins_dir)) { if (class_exists($_resource_class, false)) { return new $_resource_class($this->smarty); } else { - $this->smarty->register->resource($resource_type, - array("smarty_resource_{$resource_type}_source", - "smarty_resource_{$resource_type}_timestamp", - "smarty_resource_{$resource_type}_secure", - "smarty_resource_{$resource_type}_trusted")); - return new Smarty_Internal_Resource_Registered($this->smarty); + return new Smarty_Internal_Resource_Registered($this, $resource_type); } } else { // try streams $_known_stream = stream_get_wrappers(); if (in_array($resource_type, $_known_stream)) { // is known stream - if ($this->smarty->security) { - $this->smarty->security_handler->isTrustedStream($resource_type); + if (is_object($this->smarty->security_policy)) { + $this->smarty->security_policy->isTrustedStream($resource_type); } return new Smarty_Internal_Resource_Stream($this->smarty); } else { @@ -830,9 +799,9 @@ class Smarty_Internal_Template extends Smarty_Internal_Data { } /** - * creates a loacal Smarty variable for array assihgments + * creates a loacal Smarty variable for array assignments */ - public function createLocalArrayVariable($tpl_var, $nocache = false, $scope = SMARTY_LOCAL_SCOPE) + public function createLocalArrayVariable($tpl_var, $nocache = false, $scope = Smarty::SCOPE_LOCAL) { if (!isset($this->tpl_vars[$tpl_var])) { $tpl_var_inst = $this->getVariable($tpl_var, null, true, false); @@ -840,7 +809,7 @@ class Smarty_Internal_Template extends Smarty_Internal_Data { $this->tpl_vars[$tpl_var] = new Smarty_variable(array(), $nocache, $scope); } else { $this->tpl_vars[$tpl_var] = clone $tpl_var_inst; - if ($scope != SMARTY_LOCAL_SCOPE) { + if ($scope != Smarty::SCOPE_LOCAL) { $this->tpl_vars[$tpl_var]->scope = $scope; } } @@ -857,6 +826,38 @@ class Smarty_Internal_Template extends Smarty_Internal_Data { return $this->smarty->display($this); } + /** + * [util function] counts an array, arrayaccess/traversable or PDOStatement object + * @param mixed $value + * @return int the count for arrays and objects that implement countable, 1 for other objects that don't, and 0 for empty elements + */ + public function _count($value) + { + if (is_array($value) === true || $value instanceof Countable) { + return count($value); + } elseif ($value instanceof ArrayAccess) { + if ($value->offsetExists(0)) { + return 1; + } + } elseif ($value instanceof Iterator) { + $value->rewind(); + if ($value->valid()) { + return 1; + } + } elseif ($value instanceof PDOStatement) { + return $value->rowCount(); + } elseif ($value instanceof Traversable) { + return iterator_count($value); + } elseif ($value instanceof ArrayAccess) { + if ($value->offsetExists(0)) { + return 1; + } + } elseif (is_object($value)) { + return count($value); + } + return 0; + } + /** * wrapper for fetch */ @@ -864,25 +865,48 @@ class Smarty_Internal_Template extends Smarty_Internal_Data { { return $this->smarty->fetch($this); } + /** + * set Smarty property in template context + * @param string $property_name property name + * @param mixed $value value + */ + public function __set($property_name, $value) + { + if ($property_name == 'resource_object' || $property_name == 'cache_resource_object') { + $this->$property_name = $value; + } elseif (property_exists($this->smarty, $property_name)) { + $this->smarty->$property_name = $value; + } else { + throw new SmartyException("invalid template property '$property_name'."); + } + } /** - * lazy loads (valid) property objects - * - * @param string $name property name + * get Smarty property in template context + * @param string $property_name property name */ - public function __get($name) + public function __get($property_name) { - if (in_array($name, array('register', 'unregister', 'utility', 'cache'))) { - $class = "Smarty_Internal_" . ucfirst($name); - $this->$name = new $class($this); - return $this->$name; - } else if ($name == '_version') { - // Smarty 2 BC - $this->_version = self::SMARTY_VERSION; - return $this->_version; - } - return null; - } + if ($property_name == 'resource_object') { + // load template resource + $this->resource_object = null; + if (!$this->parseResourceName ($this->template_resource, $this->resource_type, $this->resource_name, $this->resource_object)) { + throw new SmartyException ("Unable to parse resource name \"{$template_resource}\""); + } + return $this->resource_object; + } + if ($property_name == 'cache_resource_object') { + // load cache resource + $this->cache_resource_object = $this->loadCacheResource(); + return $this->cache_resource_object; + } + if (property_exists($this->smarty, $property_name)) { + return $this->smarty->$property_name; + } else { + throw new SmartyException("template property '$property_name' does not exist."); + } + } + /** * Takes unknown class methods and lazy loads sysplugin files for them @@ -905,18 +929,18 @@ class Smarty_Internal_Template extends Smarty_Internal_Data { $property_name = strtolower(substr($name, 3, 1)) . substr($name, 4); // convert camel case to underscored name $property_name = preg_replace_callback('/([A-Z])/', $camel_func, $property_name); - if (!property_exists($this, $property_name)) { - throw new SmartyException("property '$property_name' does not exist."); - return false; - } - if ($first3 == 'get') - return $this->$property_name; - else - return $this->$property_name = $args[0]; - } + if (property_exists($this, $property_name)) { + if ($first3 == 'get') + return $this->$property_name; + else + return $this->$property_name = $args[0]; + } + } + // pass call to Smarty object + return call_user_func_array(array($this->smarty,$name),$args); } -} +} /** * wrapper for template class */ diff --git a/libs/sysplugins/smarty_internal_templatecompilerbase.php b/libs/sysplugins/smarty_internal_templatecompilerbase.php index 0a0218c2..89d5df1b 100644 --- a/libs/sysplugins/smarty_internal_templatecompilerbase.php +++ b/libs/sysplugins/smarty_internal_templatecompilerbase.php @@ -23,6 +23,8 @@ class Smarty_Internal_TemplateCompilerBase { public $_tag_stack = array(); // current template public $template = null; + // optional log of tag/attributes + public $used_tags = array(); /** * Initialize compiler @@ -45,9 +47,6 @@ class Smarty_Internal_TemplateCompilerBase { } else { $this->nocache_hash = $template->properties['nocache_hash']; } - /* here is where the compiling takes place. Smarty - tags in the templates are replaces with PHP code, - then written to compiled files. */ // flag for nochache sections $this->nocache = false; $this->tag_nocache = false; @@ -102,20 +101,30 @@ class Smarty_Internal_TemplateCompilerBase { * * @param string $tag tag name * @param array $args array with tag attributes + * @param array $parameter array with compilation parameter * @return string compiled code */ - public function compileTag($tag, $args) + public function compileTag($tag, $args, $parameter = array()) { // $args contains the attributes parsed and compiled by the lexer/parser // assume that tag does compile into code, but creates no HTML output $this->has_code = true; - $this->has_output = false; + $this->has_output = false; + // log tag/attributes + if (isset($this->smarty->get_used_tags) && $this->smarty->get_used_tags) { + $this->used_tags[] = array($tag,$args); + } + // check nocache option flag + if (in_array("'nocache'",$args) || in_array(array('nocache'=>'true'),$args) + || in_array(array('nocache'=>'"true"'),$args) || in_array(array('nocache'=>"'true'"),$args)) { + $this->tag_nocache = true; + } // compile the smarty tag (required compile classes to compile the tag are autoloaded) - if (($_output = $this->callTagCompiler($tag, $args)) === false) { + if (($_output = $this->callTagCompiler($tag, $args, $parameter)) === false) { if (isset($this->smarty->template_functions[$tag])) { // template defined by {template} tag - $args['name'] = "'" . $tag . "'"; - $_output = $this->callTagCompiler('call', $args); + $args['_attr']['name'] = "'" . $tag . "'"; + $_output = $this->callTagCompiler('call', $args, $parameter); } } if ($_output !== false) { @@ -133,47 +142,58 @@ class Smarty_Internal_TemplateCompilerBase { // tag did not produce compiled code return ''; } else { + // map_named attributes + if (isset($args['_attr'])) { + foreach ($args['_attr'] as $key => $attribute) { + if (is_array($attribute)) { + $args = array_merge($args, $attribute); + } + } + } // not an internal compiler tag if (strlen($tag) < 6 || substr($tag, -5) != 'close') { // check if tag is a registered object - if (isset($this->smarty->registered_objects[$tag]) && isset($args['object_methode'])) { - $methode = $args['object_methode']; - unset ($args['object_methode']); + if (isset($this->smarty->registered_objects[$tag]) && isset($parameter['object_methode'])) { + $methode = $parameter['object_methode']; if (!in_array($methode, $this->smarty->registered_objects[$tag][3]) && (empty($this->smarty->registered_objects[$tag][1]) || in_array($methode, $this->smarty->registered_objects[$tag][1]))) { - return $this->callTagCompiler('private_object_function', $args, $tag, $methode); + return $this->callTagCompiler('private_object_function', $args, $parameter, $tag, $methode); } elseif (in_array($methode, $this->smarty->registered_objects[$tag][3])) { - return $this->callTagCompiler('private_object_block_function', $args, $tag, $methode); + return $this->callTagCompiler('private_object_block_function', $args, $parameter, $tag, $methode); } else { return $this->trigger_template_error ('unallowed methode "' . $methode . '" in registered object "' . $tag . '"', $this->lex->taglineno); } } // check if tag is registered - foreach (array('compiler', 'function', 'block') as $type) { + foreach (array(Smarty::PLUGIN_COMPILER, Smarty::PLUGIN_FUNCTION, Smarty::PLUGIN_BLOCK) as $type) { if (isset($this->smarty->registered_plugins[$type][$tag])) { // if compiler function plugin call it now - if ($type == 'compiler') { + if ($type == Smarty::PLUGIN_COMPILER) { + $new_args = array(); + foreach ($args as $mixed) { + $new_args = array_merge($new_args, $mixed); + } if (!$this->smarty->registered_plugins[$type][$tag][1]) { $this->tag_nocache = true; } $function = $this->smarty->registered_plugins[$type][$tag][0]; if (!is_array($function)) { - return $function($args, $this); + return $function($new_args, $this); } else if (is_object($function[0])) { - return $this->smarty->registered_plugins[$type][$tag][0][0]->$function[1]($args, $this); + return $this->smarty->registered_plugins[$type][$tag][0][0]->$function[1]($new_args, $this); } else { - return call_user_func_array($this->smarty->registered_plugins[$type][$tag][0], array($args, $this)); + return call_user_func_array($this->smarty->registered_plugins[$type][$tag][0], array($new_args, $this)); } } // compile registered function or block function - if ($type == 'function' || $type == 'block') { - return $this->callTagCompiler('private_registered_' . $type, $args, $tag); + if ($type == Smarty::PLUGIN_FUNCTION || $type == Smarty::PLUGIN_BLOCK) { + return $this->callTagCompiler('private_registered_' . $type, $args, $parameter, $tag); } } } // check plugins from plugins folder foreach ($this->smarty->plugin_search_order as $plugin_type) { - if ($plugin_type == 'compiler' && $this->smarty->loadPlugin('smarty_compiler_' . $tag)) { + if ($plugin_type == Smarty::PLUGIN_BLOCK && Smarty_Internal_Plugin_Loader::loadPlugin('smarty_compiler_' . $tag, $this->smarty->plugins_dir)) { $plugin = 'smarty_compiler_' . $tag; if (is_callable($plugin)) { return $plugin($args, $this->smarty); @@ -187,7 +207,7 @@ class Smarty_Internal_TemplateCompilerBase { throw new SmartyException("Plugin \"{$tag}\" not callable"); } else { if ($function = $this->getPlugin($tag, $plugin_type)) { - return $this->callTagCompiler('private_' . $plugin_type . '_plugin', $args, $tag, $function); + return $this->callTagCompiler('private_' . $plugin_type . '_plugin', $args, $parameter, $tag, $function); } } } @@ -195,24 +215,23 @@ class Smarty_Internal_TemplateCompilerBase { // compile closing tag of block function $base_tag = substr($tag, 0, -5); // check if closing tag is a registered object - if (isset($this->smarty->registered_objects[$base_tag]) && isset($args['object_methode'])) { - $methode = $args['object_methode']; - unset ($args['object_methode']); + if (isset($this->smarty->registered_objects[$base_tag]) && isset($parameter['object_methode'])) { + $methode = $parameter['object_methode']; if (in_array($methode, $this->smarty->registered_objects[$base_tag][3])) { - return $this->callTagCompiler('private_object_block_function', $args, $tag, $methode); + return $this->callTagCompiler('private_object_block_function', $args, $parameter, $tag, $methode); } else { return $this->trigger_template_error ('unallowed closing tag methode "' . $methode . '" in registered object "' . $base_tag . '"', $this->lex->taglineno); } } // registered block tag ? - if (isset($this->smarty->registered_plugins['block'][$base_tag])) { - return $this->callTagCompiler('private_registered_block', $args, $tag); + if (isset($this->smarty->registered_plugins[Smarty::PLUGIN_BLOCK][$base_tag])) { + return $this->callTagCompiler('private_registered_block', $args, $parameter, $tag); } // block plugin? - if ($function = $this->getPlugin($base_tag, 'block')) { - return $this->callTagCompiler('private_block_plugin', $args, $tag, $function); + if ($function = $this->getPlugin($base_tag, Smarty::PLUGIN_BLOCK)) { + return $this->callTagCompiler('private_block_plugin', $args, $parameter, $tag, $function); } - if ($this->smarty->loadPlugin('smarty_compiler_' . $tag)) { + if (Smarty_Internal_Plugin_Loader::loadPlugin('smarty_compiler_' . $tag, $this->smarty->plugins_dir)) { $plugin = 'smarty_compiler_' . $tag; if (is_callable($plugin)) { return $plugin($args, $this->smarty); @@ -253,7 +272,7 @@ class Smarty_Internal_TemplateCompilerBase { } // lazy load internal compiler plugin $class_name = 'Smarty_Internal_Compile_' . $tag; - if ($this->smarty->loadPlugin($class_name)) { + if (Smarty_Internal_Plugin_Loader::loadPlugin($class_name, $this->smarty->plugins_dir)) { // use plugin if found self::$_tag_objects[$tag] = new $class_name; // compile this tag @@ -403,5 +422,6 @@ class Smarty_Internal_TemplateCompilerBase { } throw new SmartyCompilerException($error_text); } -} +} + ?> \ No newline at end of file diff --git a/libs/sysplugins/smarty_internal_templatelexer.php b/libs/sysplugins/smarty_internal_templatelexer.php index 50decb9e..6744e7f6 100644 --- a/libs/sysplugins/smarty_internal_templatelexer.php +++ b/libs/sysplugins/smarty_internal_templatelexer.php @@ -133,16 +133,16 @@ class Smarty_Internal_Templatelexer { $tokenMap = array ( 1 => 0, - 2 => 1, - 4 => 0, + 2 => 0, + 3 => 1, 5 => 0, 6 => 0, 7 => 0, 8 => 0, 9 => 0, 10 => 0, - 11 => 1, - 13 => 0, + 11 => 0, + 12 => 1, 14 => 0, 15 => 0, 16 => 0, @@ -151,13 +151,14 @@ class Smarty_Internal_Templatelexer 19 => 0, 20 => 0, 21 => 0, - 22 => 2, - 25 => 0, + 22 => 0, + 23 => 2, + 26 => 0, ); if ($this->counter >= strlen($this->data)) { return false; // end of input } - $yy_global_pattern = "/^(\\{\\})|^(".$this->ldel."\\*([\S\s]*?)\\*".$this->rdel.")|^([\t ]*[\r\n]+[\t ]*)|^(".$this->ldel."strip".$this->rdel.")|^(".$this->ldel."\\s{1,}strip\\s{1,}".$this->rdel.")|^(".$this->ldel."\/strip".$this->rdel.")|^(".$this->ldel."\\s{1,}\/strip\\s{1,}".$this->rdel.")|^(".$this->ldel."\\s*literal\\s*".$this->rdel.")|^(".$this->ldel."\\s{1,}\/)|^(".$this->ldel."\\s*(if|elseif|else if|while)(?![^\s]))|^(".$this->ldel."\\s*for(?![^\s]))|^(".$this->ldel."\\s*foreach(?![^\s]))|^(".$this->ldel."\\s{1,})|^(".$this->ldel."\/)|^(".$this->ldel.")|^(<\\?(?:php\\w+|=|[a-zA-Z]+)?)|^(\\?>)|^(<%)|^(%>)|^(([\S\s]*?)(?=([\t ]*[\r\n]+[\t ]*|".$this->ldel."|<\\?|\\?>|<%|%>)))|^([\S\s]+)/"; + $yy_global_pattern = "/^(".$this->ldel."[$]smarty\\.block\\.child".$this->rdel.")|^(\\{\\})|^(".$this->ldel."\\*([\S\s]*?)\\*".$this->rdel.")|^([\t ]*[\r\n]+[\t ]*)|^(".$this->ldel."strip".$this->rdel.")|^(".$this->ldel."\\s{1,}strip\\s{1,}".$this->rdel.")|^(".$this->ldel."\/strip".$this->rdel.")|^(".$this->ldel."\\s{1,}\/strip\\s{1,}".$this->rdel.")|^(".$this->ldel."\\s*literal\\s*".$this->rdel.")|^(".$this->ldel."\\s{1,}\/)|^(".$this->ldel."\\s*(if|elseif|else if|while)(?![^\s]))|^(".$this->ldel."\\s*for(?![^\s]))|^(".$this->ldel."\\s*foreach(?![^\s]))|^(".$this->ldel."\\s{1,})|^(".$this->ldel."\/)|^(".$this->ldel.")|^(<\\?(?:php\\w+|=|[a-zA-Z]+)?)|^(\\?>)|^(<%)|^(%>)|^(([\S\s]*?)(?=([\t ]*[\r\n]+[\t ]*|".$this->ldel."|<\\?|\\?>|<%|%>)))|^([\S\s]+)/"; do { if (preg_match($yy_global_pattern, substr($this->data, $this->counter), $yymatches)) { @@ -210,14 +211,19 @@ class Smarty_Internal_Templatelexer function yy_r1_1($yy_subpatterns) { - $this->token = Smarty_Internal_Templateparser::TP_OTHER; + $this->token = Smarty_Internal_Templateparser::TP_SMARTYBLOCKCHILD; } function yy_r1_2($yy_subpatterns) { + $this->token = Smarty_Internal_Templateparser::TP_OTHER; + } + function yy_r1_3($yy_subpatterns) + { + $this->token = Smarty_Internal_Templateparser::TP_COMMENT; } - function yy_r1_4($yy_subpatterns) + function yy_r1_5($yy_subpatterns) { if ($this->strip) { @@ -226,13 +232,13 @@ class Smarty_Internal_Templatelexer $this->token = Smarty_Internal_Templateparser::TP_LINEBREAK; } } - function yy_r1_5($yy_subpatterns) + function yy_r1_6($yy_subpatterns) { $this->strip = true; return false; } - function yy_r1_6($yy_subpatterns) + function yy_r1_7($yy_subpatterns) { if ($this->smarty->auto_literal) { @@ -242,13 +248,13 @@ class Smarty_Internal_Templatelexer return false; } } - function yy_r1_7($yy_subpatterns) + function yy_r1_8($yy_subpatterns) { $this->strip = false; return false; } - function yy_r1_8($yy_subpatterns) + function yy_r1_9($yy_subpatterns) { if ($this->smarty->auto_literal) { @@ -258,13 +264,13 @@ class Smarty_Internal_Templatelexer return false; } } - function yy_r1_9($yy_subpatterns) + function yy_r1_10($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_LITERALSTART; $this->yypushstate(self::LITERAL); } - function yy_r1_10($yy_subpatterns) + function yy_r1_11($yy_subpatterns) { if ($this->smarty->auto_literal) { @@ -275,7 +281,7 @@ class Smarty_Internal_Templatelexer $this->taglineno = $this->line; } } - function yy_r1_11($yy_subpatterns) + function yy_r1_12($yy_subpatterns) { if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') { @@ -286,7 +292,7 @@ class Smarty_Internal_Templatelexer $this->taglineno = $this->line; } } - function yy_r1_13($yy_subpatterns) + function yy_r1_14($yy_subpatterns) { if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') { @@ -297,7 +303,7 @@ class Smarty_Internal_Templatelexer $this->taglineno = $this->line; } } - function yy_r1_14($yy_subpatterns) + function yy_r1_15($yy_subpatterns) { if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') { @@ -308,7 +314,7 @@ class Smarty_Internal_Templatelexer $this->taglineno = $this->line; } } - function yy_r1_15($yy_subpatterns) + function yy_r1_16($yy_subpatterns) { if ($this->smarty->auto_literal) { @@ -319,21 +325,21 @@ class Smarty_Internal_Templatelexer $this->taglineno = $this->line; } } - function yy_r1_16($yy_subpatterns) + function yy_r1_17($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_LDELSLASH; $this->yypushstate(self::SMARTY); $this->taglineno = $this->line; } - function yy_r1_17($yy_subpatterns) + function yy_r1_18($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_LDEL; $this->yypushstate(self::SMARTY); $this->taglineno = $this->line; } - function yy_r1_18($yy_subpatterns) + function yy_r1_19($yy_subpatterns) { if (in_array($this->value, Array('value = substr($this->value, 0, 2); } } - function yy_r1_19($yy_subpatterns) + function yy_r1_20($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_PHPENDTAG; } - function yy_r1_20($yy_subpatterns) + function yy_r1_21($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_ASPSTARTTAG; } - function yy_r1_21($yy_subpatterns) + function yy_r1_22($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_ASPENDTAG; } - function yy_r1_22($yy_subpatterns) + function yy_r1_23($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_OTHER; } - function yy_r1_25($yy_subpatterns) + function yy_r1_26($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_OTHER; @@ -421,9 +427,10 @@ class Smarty_Internal_Templatelexer 62 => 0, 63 => 0, 64 => 0, - 65 => 1, - 67 => 1, - 69 => 1, + 65 => 0, + 66 => 1, + 68 => 1, + 70 => 0, 71 => 0, 72 => 0, 73 => 0, @@ -441,12 +448,11 @@ class Smarty_Internal_Templatelexer 85 => 0, 86 => 0, 87 => 0, - 88 => 0, ); if ($this->counter >= strlen($this->data)) { return false; // end of input } - $yy_global_pattern = "/^('[^'\\\\]*(?:\\\\.[^'\\\\]*)*')|^(".$this->ldel."\\s{1,}\/)|^(".$this->ldel."\\s*(if|elseif|else if|while)(?![^\s]))|^(".$this->ldel."\\s*for(?![^\s]))|^(".$this->ldel."\\s*foreach(?![^\s]))|^(".$this->ldel."\\s{1,})|^(\\s{1,}".$this->rdel.")|^(".$this->ldel."\/)|^(".$this->ldel.")|^(".$this->rdel.")|^(\\s+is\\s+in\\s+)|^(\\s+(AS|as)\\s+)|^(\\s+(to)\\s+)|^(\\s+(step)\\s+)|^(\\s+instanceof\\s+)|^(\\s*===\\s*)|^(\\s*!==\\s*)|^(\\s*==\\s*|\\s+(EQ|eq)\\s+)|^(\\s*!=\\s*|\\s*<>\\s*|\\s+(NE|NEQ|ne|neq)\\s+)|^(\\s*>=\\s*|\\s+(GE|GTE|ge|gte)\\s+)|^(\\s*<=\\s*|\\s+(LE|LTE|le|lte)\\s+)|^(\\s*>\\s*|\\s+(GT|gt)\\s+)|^(\\s*<\\s*|\\s+(LT|lt)\\s+)|^(\\s+(MOD|mod)\\s+)|^(!\\s*|(NOT|not)\\s+)|^(\\s*&&\\s*|\\s*(AND|and)\\s+)|^(\\s*\\|\\|\\s*|\\s*(OR|or)\\s+)|^(\\s*(XOR|xor)\\s+)|^(\\s+is\\s+odd\\s+by\\s+)|^(\\s+is\\s+not\\s+odd\\s+by\\s+)|^(\\s+is\\s+odd)|^(\\s+is\\s+not\\s+odd)|^(\\s+is\\s+even\\s+by\\s+)|^(\\s+is\\s+not\\s+even\\s+by\\s+)|^(\\s+is\\s+even)|^(\\s+is\\s+not\\s+even)|^(\\s+is\\s+div\\s+by\\s+)|^(\\s+is\\s+not\\s+div\\s+by\\s+)|^(\\((int(eger)?|bool(ean)?|float|double|real|string|binary|array|object)\\)\\s*)|^(\\(\\s*)|^(\\s*\\))|^(\\[\\s*)|^(\\s*\\])|^(\\s*->\\s*)|^(\\s*=>\\s*)|^(\\s*=\\s*)|^((\\+\\+|--)\\s*)|^(\\s*(\\+|-)\\s*)|^(\\s*(\\*|\/|%)\\s*)|^(\\$)|^(\\s*;)|^(::)|^(\\s*:\\s*)|^(@)|^(#)|^(\")|^(`)|^(\\|)|^(\\.)|^(\\s*,\\s*)|^(\\s*&\\s*)|^(\\s*\\?\\s*)|^(0[xX][0-9a-fA-F]+)|^([0-9]*[a-zA-Z_]\\w*)|^(\\d+)|^(\\s+)|^(.)/"; + $yy_global_pattern = "/^('[^'\\\\]*(?:\\\\.[^'\\\\]*)*')|^(".$this->ldel."\\s{1,}\/)|^(".$this->ldel."\\s*(if|elseif|else if|while)(?![^\s]))|^(".$this->ldel."\\s*for(?![^\s]))|^(".$this->ldel."\\s*foreach(?![^\s]))|^(".$this->ldel."\\s{1,})|^(\\s{1,}".$this->rdel.")|^(".$this->ldel."\/)|^(".$this->ldel.")|^(".$this->rdel.")|^(\\s+is\\s+in\\s+)|^(\\s+(AS|as)\\s+)|^(\\s+(to)\\s+)|^(\\s+(step)\\s+)|^(\\s+instanceof\\s+)|^(\\s*===\\s*)|^(\\s*!==\\s*)|^(\\s*==\\s*|\\s+(EQ|eq)\\s+)|^(\\s*!=\\s*|\\s*<>\\s*|\\s+(NE|NEQ|ne|neq)\\s+)|^(\\s*>=\\s*|\\s+(GE|GTE|ge|gte)\\s+)|^(\\s*<=\\s*|\\s+(LE|LTE|le|lte)\\s+)|^(\\s*>\\s*|\\s+(GT|gt)\\s+)|^(\\s*<\\s*|\\s+(LT|lt)\\s+)|^(\\s+(MOD|mod)\\s+)|^(!\\s*|(NOT|not)\\s+)|^(\\s*&&\\s*|\\s*(AND|and)\\s+)|^(\\s*\\|\\|\\s*|\\s*(OR|or)\\s+)|^(\\s*(XOR|xor)\\s+)|^(\\s+is\\s+odd\\s+by\\s+)|^(\\s+is\\s+not\\s+odd\\s+by\\s+)|^(\\s+is\\s+odd)|^(\\s+is\\s+not\\s+odd)|^(\\s+is\\s+even\\s+by\\s+)|^(\\s+is\\s+not\\s+even\\s+by\\s+)|^(\\s+is\\s+even)|^(\\s+is\\s+not\\s+even)|^(\\s+is\\s+div\\s+by\\s+)|^(\\s+is\\s+not\\s+div\\s+by\\s+)|^(\\((int(eger)?|bool(ean)?|float|double|real|string|binary|array|object)\\)\\s*)|^(\\(\\s*)|^(\\s*\\))|^(\\[\\s*)|^(\\s*\\])|^(\\s*->\\s*)|^(\\s*=>\\s*)|^(\\s*=\\s*)|^(\\+\\+|--)|^(\\s*(\\+|-)\\s*)|^(\\s*(\\*|\/|%)\\s*)|^(\\$)|^(\\s*;)|^(::)|^(\\s*:\\s*)|^(@)|^(#)|^(\")|^(`)|^(\\|)|^(\\.)|^(\\s*,\\s*)|^(\\s*&\\s*)|^(\\s*\\?\\s*)|^(0[xX][0-9a-fA-F]+)|^([0-9]*[a-zA-Z_]\\w*)|^(\\d+)|^(\\s+)|^(.)/"; do { if (preg_match($yy_global_pattern, substr($this->data, $this->counter), $yymatches)) { @@ -771,104 +777,104 @@ class Smarty_Internal_Templatelexer $this->token = Smarty_Internal_Templateparser::TP_INCDEC; } - function yy_r2_67($yy_subpatterns) + function yy_r2_66($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_UNIMATH; } - function yy_r2_69($yy_subpatterns) + function yy_r2_68($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_MATH; } - function yy_r2_71($yy_subpatterns) + function yy_r2_70($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_DOLLAR; } - function yy_r2_72($yy_subpatterns) + function yy_r2_71($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_SEMICOLON; } - function yy_r2_73($yy_subpatterns) + function yy_r2_72($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_DOUBLECOLON; } - function yy_r2_74($yy_subpatterns) + function yy_r2_73($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_COLON; } - function yy_r2_75($yy_subpatterns) + function yy_r2_74($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_AT; } - function yy_r2_76($yy_subpatterns) + function yy_r2_75($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_HATCH; } - function yy_r2_77($yy_subpatterns) + function yy_r2_76($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_QUOTE; $this->yypushstate(self::DOUBLEQUOTEDSTRING); } - function yy_r2_78($yy_subpatterns) + function yy_r2_77($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_BACKTICK; $this->yypopstate(); } - function yy_r2_79($yy_subpatterns) + function yy_r2_78($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_VERT; } - function yy_r2_80($yy_subpatterns) + function yy_r2_79($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_DOT; } - function yy_r2_81($yy_subpatterns) + function yy_r2_80($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_COMMA; } - function yy_r2_82($yy_subpatterns) + function yy_r2_81($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_ANDSYM; } - function yy_r2_83($yy_subpatterns) + function yy_r2_82($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_QMARK; } - function yy_r2_84($yy_subpatterns) + function yy_r2_83($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_HEX; } - function yy_r2_85($yy_subpatterns) + function yy_r2_84($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_ID; } - function yy_r2_86($yy_subpatterns) + function yy_r2_85($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_INTEGER; } - function yy_r2_87($yy_subpatterns) + function yy_r2_86($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_SPACE; } - function yy_r2_88($yy_subpatterns) + function yy_r2_87($yy_subpatterns) { $this->token = Smarty_Internal_Templateparser::TP_OTHER; @@ -1169,6 +1175,5 @@ class Smarty_Internal_Templatelexer $this->token = Smarty_Internal_Templateparser::TP_OTHER; } - } ?> \ No newline at end of file diff --git a/libs/sysplugins/smarty_internal_templateparser.php b/libs/sysplugins/smarty_internal_templateparser.php index 826c7f78..c06df6d1 100644 --- a/libs/sysplugins/smarty_internal_templateparser.php +++ b/libs/sysplugins/smarty_internal_templateparser.php @@ -88,6 +88,8 @@ class Smarty_Internal_Templateparser#line 79 "smarty_internal_templateparser.php { #line 14 "smarty_internal_templateparser.y" + const Err1 = "Security error: Call to private object member not allowed"; + const Err2 = "Security error: Call to dynamic object member not allowed"; // states whether the parse was successful or not public $successful = true; public $retvalue = 0; @@ -101,15 +103,15 @@ class Smarty_Internal_Templateparser#line 79 "smarty_internal_templateparser.php $this->compiler = $compiler; $this->smarty = $this->compiler->smarty; $this->template = $this->compiler->template; - if ($this->template->security && isset($this->smarty->security_handler)) { - $this->sec_obj = $this->smarty->security_policy; - } else { - $this->sec_obj = $this->smarty; - } $this->compiler->has_variable_string = false; $this->compiler->prefix_code = array(); $this->prefix_number = 0; $this->block_nesting_level = 0; + if ($this->security = isset($this->smarty->security_policy)) { + $this->php_handling = $this->smarty->security_policy->php_handling; + } else { + $this->php_handling = $this->smarty->php_handling; + } $this->is_xml = false; $this->asp_tags = (ini_get('asp_tags') != '0'); $this->current_buffer = $this->root_buffer = new _smarty_template_buffer($this); @@ -134,7 +136,7 @@ class Smarty_Internal_Templateparser#line 79 "smarty_internal_templateparser.php } -#line 130 "smarty_internal_templateparser.php" +#line 132 "smarty_internal_templateparser.php" const TP_VERT = 1; const TP_COLON = 2; @@ -166,830 +168,830 @@ class Smarty_Internal_Templateparser#line 79 "smarty_internal_templateparser.php const TP_LDELFOREACH = 28; const TP_AS = 29; const TP_APTR = 30; - const TP_LDELSLASH = 31; - const TP_INTEGER = 32; - const TP_COMMA = 33; - const TP_MATH = 34; - const TP_UNIMATH = 35; - const TP_ANDSYM = 36; - const TP_ISIN = 37; - const TP_ISDIVBY = 38; - const TP_ISNOTDIVBY = 39; - const TP_ISEVEN = 40; - const TP_ISNOTEVEN = 41; - const TP_ISEVENBY = 42; - const TP_ISNOTEVENBY = 43; - const TP_ISODD = 44; - const TP_ISNOTODD = 45; - const TP_ISODDBY = 46; - const TP_ISNOTODDBY = 47; - const TP_INSTANCEOF = 48; - const TP_OPENP = 49; - const TP_CLOSEP = 50; - const TP_QMARK = 51; - const TP_NOT = 52; - const TP_TYPECAST = 53; - const TP_HEX = 54; - const TP_DOT = 55; - const TP_SINGLEQUOTESTRING = 56; - const TP_DOUBLECOLON = 57; - const TP_AT = 58; - const TP_HATCH = 59; - const TP_OPENB = 60; - const TP_CLOSEB = 61; - const TP_EQUALS = 62; - const TP_NOTEQUALS = 63; - const TP_GREATERTHAN = 64; - const TP_LESSTHAN = 65; - const TP_GREATEREQUAL = 66; - const TP_LESSEQUAL = 67; - const TP_IDENTITY = 68; - const TP_NONEIDENTITY = 69; - const TP_MOD = 70; - const TP_LAND = 71; - const TP_LOR = 72; - const TP_LXOR = 73; - const TP_QUOTE = 74; - const TP_BACKTICK = 75; - const TP_DOLLARID = 76; - const YY_NO_ACTION = 570; - const YY_ACCEPT_ACTION = 569; - const YY_ERROR_ACTION = 568; + const TP_SMARTYBLOCKCHILD = 31; + const TP_LDELSLASH = 32; + const TP_INTEGER = 33; + const TP_COMMA = 34; + const TP_MATH = 35; + const TP_UNIMATH = 36; + const TP_ANDSYM = 37; + const TP_ISIN = 38; + const TP_ISDIVBY = 39; + const TP_ISNOTDIVBY = 40; + const TP_ISEVEN = 41; + const TP_ISNOTEVEN = 42; + const TP_ISEVENBY = 43; + const TP_ISNOTEVENBY = 44; + const TP_ISODD = 45; + const TP_ISNOTODD = 46; + const TP_ISODDBY = 47; + const TP_ISNOTODDBY = 48; + const TP_INSTANCEOF = 49; + const TP_OPENP = 50; + const TP_CLOSEP = 51; + const TP_QMARK = 52; + const TP_NOT = 53; + const TP_TYPECAST = 54; + const TP_HEX = 55; + const TP_DOT = 56; + const TP_SINGLEQUOTESTRING = 57; + const TP_DOUBLECOLON = 58; + const TP_AT = 59; + const TP_HATCH = 60; + const TP_OPENB = 61; + const TP_CLOSEB = 62; + const TP_EQUALS = 63; + const TP_NOTEQUALS = 64; + const TP_GREATERTHAN = 65; + const TP_LESSTHAN = 66; + const TP_GREATEREQUAL = 67; + const TP_LESSEQUAL = 68; + const TP_IDENTITY = 69; + const TP_NONEIDENTITY = 70; + const TP_MOD = 71; + const TP_LAND = 72; + const TP_LOR = 73; + const TP_LXOR = 74; + const TP_QUOTE = 75; + const TP_BACKTICK = 76; + const TP_DOLLARID = 77; + const YY_NO_ACTION = 573; + const YY_ACCEPT_ACTION = 572; + const YY_ERROR_ACTION = 571; - const YY_SZ_ACTTAB = 2411; + const YY_SZ_ACTTAB = 2401; static public $yy_action = array( - /* 0 */ 187, 274, 279, 264, 265, 270, 269, 281, 292, 290, - /* 10 */ 289, 233, 373, 170, 435, 26, 6, 367, 346, 10, - /* 20 */ 188, 188, 215, 245, 214, 211, 32, 118, 344, 126, - /* 30 */ 337, 248, 218, 48, 46, 45, 41, 27, 16, 342, - /* 40 */ 370, 14, 19, 360, 362, 24, 17, 354, 365, 336, - /* 50 */ 312, 371, 249, 96, 355, 170, 353, 343, 221, 165, - /* 60 */ 313, 335, 309, 314, 308, 301, 300, 302, 303, 304, - /* 70 */ 316, 317, 330, 187, 328, 168, 220, 8, 219, 26, - /* 80 */ 217, 58, 346, 18, 109, 201, 39, 36, 319, 296, - /* 90 */ 329, 480, 227, 7, 188, 262, 285, 480, 331, 174, - /* 100 */ 569, 88, 275, 279, 264, 340, 48, 46, 45, 41, - /* 110 */ 27, 16, 342, 370, 14, 19, 360, 362, 24, 17, - /* 120 */ 2, 21, 26, 480, 10, 346, 30, 438, 26, 283, - /* 130 */ 480, 346, 118, 438, 335, 309, 314, 308, 301, 300, - /* 140 */ 302, 303, 304, 316, 317, 330, 187, 328, 28, 138, - /* 150 */ 10, 180, 128, 217, 76, 11, 276, 109, 118, 44, - /* 160 */ 35, 347, 250, 329, 322, 221, 44, 188, 262, 285, - /* 170 */ 188, 331, 34, 245, 108, 137, 174, 241, 187, 48, - /* 180 */ 46, 45, 41, 27, 16, 342, 370, 14, 19, 360, - /* 190 */ 362, 24, 17, 352, 150, 26, 207, 196, 346, 188, - /* 200 */ 26, 202, 186, 346, 30, 5, 133, 335, 309, 314, - /* 210 */ 308, 301, 300, 302, 303, 304, 316, 317, 330, 187, - /* 220 */ 328, 38, 107, 163, 219, 328, 217, 66, 166, 236, - /* 230 */ 109, 217, 164, 436, 171, 109, 329, 159, 225, 436, - /* 240 */ 10, 262, 285, 110, 331, 4, 262, 285, 118, 331, - /* 250 */ 250, 203, 48, 46, 45, 41, 27, 16, 342, 370, - /* 260 */ 14, 19, 360, 362, 24, 17, 10, 26, 341, 299, - /* 270 */ 346, 112, 213, 245, 118, 188, 282, 235, 169, 313, - /* 280 */ 335, 309, 314, 308, 301, 300, 302, 303, 304, 316, - /* 290 */ 317, 330, 187, 328, 212, 187, 198, 103, 125, 100, - /* 300 */ 50, 44, 129, 104, 95, 26, 359, 173, 346, 329, - /* 310 */ 435, 155, 331, 92, 262, 285, 188, 331, 318, 172, - /* 320 */ 222, 230, 229, 369, 250, 48, 46, 45, 41, 27, - /* 330 */ 16, 342, 370, 14, 19, 360, 362, 24, 17, 259, - /* 340 */ 179, 323, 334, 26, 115, 13, 346, 188, 188, 33, - /* 350 */ 44, 106, 287, 335, 309, 314, 308, 301, 300, 302, - /* 360 */ 303, 304, 316, 317, 330, 187, 297, 157, 328, 205, - /* 370 */ 168, 195, 219, 26, 217, 54, 193, 124, 109, 133, - /* 380 */ 250, 39, 36, 200, 329, 10, 161, 313, 162, 262, - /* 390 */ 285, 363, 331, 118, 174, 113, 114, 188, 48, 46, - /* 400 */ 45, 41, 27, 16, 342, 370, 14, 19, 360, 362, - /* 410 */ 24, 17, 187, 105, 179, 361, 320, 325, 321, 13, - /* 420 */ 40, 188, 188, 188, 188, 149, 335, 309, 314, 308, - /* 430 */ 301, 300, 302, 303, 304, 316, 317, 330, 250, 187, - /* 440 */ 188, 152, 223, 345, 3, 48, 46, 45, 41, 27, - /* 450 */ 16, 342, 370, 14, 19, 360, 362, 24, 17, 187, - /* 460 */ 188, 324, 267, 310, 306, 333, 351, 188, 188, 188, - /* 470 */ 188, 188, 188, 335, 309, 314, 308, 301, 300, 302, - /* 480 */ 303, 304, 316, 317, 330, 356, 26, 26, 284, 216, - /* 490 */ 189, 188, 48, 46, 45, 41, 27, 16, 342, 370, - /* 500 */ 14, 19, 360, 362, 24, 17, 142, 253, 257, 307, - /* 510 */ 315, 349, 44, 188, 367, 188, 188, 293, 123, 250, - /* 520 */ 335, 309, 314, 308, 301, 300, 302, 303, 304, 316, - /* 530 */ 317, 330, 187, 328, 278, 86, 263, 219, 328, 217, - /* 540 */ 66, 123, 239, 109, 217, 144, 133, 266, 109, 329, - /* 550 */ 102, 364, 207, 26, 262, 285, 206, 331, 250, 262, - /* 560 */ 285, 326, 331, 288, 197, 48, 46, 45, 41, 27, - /* 570 */ 16, 342, 370, 14, 19, 360, 362, 24, 17, 134, - /* 580 */ 140, 167, 345, 110, 277, 160, 254, 245, 11, 220, - /* 590 */ 2, 20, 288, 335, 309, 314, 308, 301, 300, 302, - /* 600 */ 303, 304, 316, 317, 330, 187, 328, 232, 273, 255, - /* 610 */ 219, 328, 217, 66, 244, 261, 109, 217, 130, 345, - /* 620 */ 237, 109, 329, 135, 272, 31, 22, 262, 285, 87, - /* 630 */ 331, 288, 262, 285, 127, 331, 288, 298, 48, 46, - /* 640 */ 45, 41, 27, 16, 342, 370, 14, 19, 360, 362, - /* 650 */ 24, 17, 187, 9, 258, 252, 348, 204, 305, 35, - /* 660 */ 282, 91, 187, 116, 133, 111, 335, 309, 314, 308, - /* 670 */ 301, 300, 302, 303, 304, 316, 317, 330, 288, 188, - /* 680 */ 42, 345, 40, 158, 23, 48, 46, 45, 41, 27, - /* 690 */ 16, 342, 370, 14, 19, 360, 362, 24, 17, 242, - /* 700 */ 148, 294, 97, 327, 350, 291, 259, 315, 228, 315, - /* 710 */ 172, 315, 251, 335, 309, 314, 308, 301, 300, 302, - /* 720 */ 303, 304, 316, 317, 330, 187, 328, 315, 146, 315, - /* 730 */ 103, 93, 101, 53, 315, 129, 104, 26, 286, 315, - /* 740 */ 346, 250, 329, 99, 98, 315, 188, 262, 285, 315, - /* 750 */ 331, 315, 199, 315, 315, 174, 288, 288, 48, 46, - /* 760 */ 45, 41, 27, 16, 342, 370, 14, 19, 360, 362, - /* 770 */ 24, 17, 154, 315, 315, 315, 315, 315, 315, 315, - /* 780 */ 315, 315, 315, 315, 315, 250, 335, 309, 314, 308, - /* 790 */ 301, 300, 302, 303, 304, 316, 317, 330, 187, 328, - /* 800 */ 315, 315, 315, 219, 328, 217, 66, 315, 280, 109, - /* 810 */ 217, 139, 315, 247, 109, 329, 132, 315, 315, 315, - /* 820 */ 262, 285, 315, 331, 250, 262, 285, 315, 331, 288, - /* 830 */ 210, 48, 46, 45, 41, 27, 16, 342, 370, 14, - /* 840 */ 19, 360, 362, 24, 17, 187, 15, 315, 315, 315, - /* 850 */ 315, 315, 315, 315, 315, 315, 315, 315, 136, 335, - /* 860 */ 309, 314, 308, 301, 300, 302, 303, 304, 316, 317, - /* 870 */ 330, 288, 315, 315, 315, 315, 315, 315, 48, 46, - /* 880 */ 45, 41, 27, 16, 342, 370, 14, 19, 360, 362, - /* 890 */ 24, 17, 187, 315, 315, 315, 315, 315, 315, 315, - /* 900 */ 315, 315, 315, 315, 315, 131, 335, 309, 314, 308, - /* 910 */ 301, 300, 302, 303, 304, 316, 317, 330, 288, 315, - /* 920 */ 315, 315, 315, 315, 315, 48, 46, 45, 41, 27, - /* 930 */ 16, 342, 370, 14, 19, 360, 362, 24, 17, 315, - /* 940 */ 315, 208, 315, 315, 315, 315, 315, 315, 315, 315, - /* 950 */ 315, 315, 315, 335, 309, 314, 308, 301, 300, 302, - /* 960 */ 303, 304, 316, 317, 330, 187, 328, 315, 145, 315, - /* 970 */ 184, 94, 217, 51, 315, 122, 109, 315, 315, 315, - /* 980 */ 332, 250, 329, 315, 315, 315, 315, 262, 285, 315, - /* 990 */ 331, 315, 315, 315, 315, 174, 315, 315, 48, 46, - /* 1000 */ 45, 41, 27, 16, 342, 370, 14, 19, 360, 362, - /* 1010 */ 24, 17, 187, 315, 315, 315, 315, 315, 315, 315, - /* 1020 */ 315, 315, 315, 315, 315, 315, 335, 309, 314, 308, - /* 1030 */ 301, 300, 302, 303, 304, 316, 317, 330, 315, 315, - /* 1040 */ 315, 315, 315, 315, 315, 48, 46, 45, 41, 27, - /* 1050 */ 16, 342, 370, 14, 19, 360, 362, 24, 17, 187, - /* 1060 */ 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, - /* 1070 */ 315, 315, 315, 335, 309, 314, 308, 301, 300, 302, - /* 1080 */ 303, 304, 316, 317, 330, 315, 372, 315, 315, 315, - /* 1090 */ 315, 315, 48, 46, 45, 41, 27, 16, 342, 370, - /* 1100 */ 14, 19, 360, 362, 24, 17, 315, 315, 315, 315, - /* 1110 */ 315, 315, 315, 315, 315, 315, 315, 315, 315, 153, - /* 1120 */ 335, 309, 314, 308, 301, 300, 302, 303, 304, 316, - /* 1130 */ 317, 330, 250, 315, 315, 315, 6, 147, 120, 177, - /* 1140 */ 315, 328, 215, 315, 214, 219, 172, 217, 83, 126, - /* 1150 */ 250, 109, 218, 226, 315, 315, 49, 329, 315, 315, - /* 1160 */ 315, 315, 262, 285, 172, 331, 141, 315, 315, 315, - /* 1170 */ 29, 315, 315, 47, 43, 268, 231, 246, 315, 250, - /* 1180 */ 92, 1, 260, 315, 315, 315, 6, 315, 120, 183, - /* 1190 */ 315, 315, 215, 172, 214, 89, 315, 315, 315, 126, - /* 1200 */ 368, 315, 218, 226, 315, 12, 49, 315, 315, 315, - /* 1210 */ 315, 215, 315, 214, 315, 315, 315, 315, 126, 315, - /* 1220 */ 29, 218, 315, 47, 43, 268, 231, 246, 315, 315, - /* 1230 */ 92, 1, 315, 315, 315, 315, 6, 315, 112, 178, - /* 1240 */ 315, 315, 215, 315, 214, 89, 315, 315, 315, 126, - /* 1250 */ 368, 315, 218, 190, 315, 12, 49, 315, 315, 315, - /* 1260 */ 315, 215, 315, 214, 357, 37, 366, 315, 126, 156, - /* 1270 */ 29, 218, 90, 47, 43, 268, 231, 246, 315, 315, - /* 1280 */ 92, 1, 250, 39, 36, 315, 6, 328, 112, 183, - /* 1290 */ 315, 295, 215, 217, 214, 89, 174, 109, 315, 126, - /* 1300 */ 315, 315, 218, 226, 315, 315, 49, 315, 262, 285, - /* 1310 */ 315, 331, 315, 315, 358, 37, 366, 315, 315, 315, - /* 1320 */ 29, 315, 315, 47, 43, 268, 231, 246, 315, 315, - /* 1330 */ 92, 1, 315, 315, 315, 315, 6, 328, 121, 85, - /* 1340 */ 315, 271, 215, 217, 214, 89, 315, 109, 315, 126, - /* 1350 */ 315, 315, 218, 226, 315, 315, 49, 315, 262, 285, - /* 1360 */ 315, 331, 315, 187, 315, 315, 315, 315, 315, 315, - /* 1370 */ 25, 315, 315, 47, 43, 268, 231, 246, 311, 315, - /* 1380 */ 92, 1, 209, 315, 188, 315, 6, 315, 120, 175, - /* 1390 */ 315, 315, 215, 315, 214, 89, 315, 315, 315, 126, - /* 1400 */ 315, 151, 218, 226, 168, 315, 49, 315, 315, 315, - /* 1410 */ 315, 10, 315, 315, 250, 39, 36, 315, 315, 118, - /* 1420 */ 29, 315, 315, 47, 43, 268, 231, 246, 174, 315, - /* 1430 */ 92, 1, 315, 315, 315, 315, 6, 315, 119, 183, - /* 1440 */ 315, 315, 215, 315, 214, 89, 315, 315, 315, 126, - /* 1450 */ 315, 315, 218, 226, 315, 315, 49, 315, 315, 315, - /* 1460 */ 315, 315, 315, 315, 315, 315, 315, 315, 315, 143, - /* 1470 */ 29, 315, 168, 47, 43, 268, 231, 246, 315, 315, - /* 1480 */ 92, 1, 250, 39, 36, 315, 6, 315, 120, 176, - /* 1490 */ 315, 315, 215, 315, 214, 89, 174, 315, 315, 126, - /* 1500 */ 315, 315, 218, 226, 315, 315, 49, 315, 315, 315, - /* 1510 */ 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, - /* 1520 */ 25, 315, 315, 47, 43, 268, 231, 246, 315, 315, - /* 1530 */ 92, 1, 315, 315, 315, 315, 6, 315, 120, 181, - /* 1540 */ 315, 315, 215, 315, 214, 89, 315, 315, 315, 126, - /* 1550 */ 315, 315, 218, 226, 315, 315, 49, 315, 315, 315, - /* 1560 */ 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, - /* 1570 */ 29, 315, 315, 47, 43, 268, 231, 246, 315, 315, - /* 1580 */ 92, 1, 315, 315, 315, 315, 6, 315, 120, 183, - /* 1590 */ 315, 315, 215, 315, 214, 89, 315, 315, 315, 126, - /* 1600 */ 315, 315, 218, 226, 315, 315, 49, 315, 315, 315, - /* 1610 */ 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, - /* 1620 */ 25, 315, 315, 47, 43, 268, 231, 246, 315, 315, - /* 1630 */ 92, 1, 315, 315, 315, 315, 6, 315, 117, 183, - /* 1640 */ 315, 315, 215, 315, 214, 89, 315, 315, 315, 126, - /* 1650 */ 315, 315, 218, 226, 315, 315, 49, 315, 315, 315, - /* 1660 */ 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, - /* 1670 */ 29, 315, 315, 47, 43, 268, 231, 246, 315, 315, - /* 1680 */ 92, 1, 315, 315, 315, 315, 6, 315, 112, 192, - /* 1690 */ 315, 315, 215, 315, 214, 89, 315, 315, 315, 126, - /* 1700 */ 315, 315, 218, 226, 315, 315, 49, 328, 315, 315, - /* 1710 */ 315, 243, 315, 217, 315, 315, 315, 109, 315, 315, - /* 1720 */ 29, 315, 315, 47, 43, 268, 231, 246, 262, 285, - /* 1730 */ 92, 331, 315, 315, 315, 315, 6, 315, 112, 183, - /* 1740 */ 315, 315, 215, 315, 214, 89, 315, 315, 315, 126, - /* 1750 */ 315, 315, 218, 226, 315, 315, 49, 315, 315, 315, - /* 1760 */ 315, 315, 328, 315, 315, 315, 182, 315, 217, 71, - /* 1770 */ 29, 315, 109, 47, 43, 268, 231, 246, 329, 315, - /* 1780 */ 92, 315, 315, 262, 285, 315, 331, 315, 315, 315, - /* 1790 */ 315, 315, 315, 315, 315, 89, 185, 339, 315, 315, - /* 1800 */ 315, 315, 315, 315, 315, 328, 315, 315, 315, 182, - /* 1810 */ 315, 217, 71, 315, 315, 109, 315, 315, 315, 315, - /* 1820 */ 315, 329, 315, 315, 315, 315, 262, 285, 315, 331, - /* 1830 */ 315, 328, 315, 315, 315, 219, 315, 217, 74, 315, - /* 1840 */ 338, 109, 315, 315, 328, 315, 315, 329, 219, 315, - /* 1850 */ 217, 65, 262, 285, 109, 331, 315, 328, 315, 315, - /* 1860 */ 329, 219, 315, 217, 56, 262, 285, 109, 331, 315, - /* 1870 */ 315, 315, 315, 329, 315, 315, 315, 315, 262, 285, - /* 1880 */ 315, 331, 315, 315, 315, 315, 315, 328, 315, 315, - /* 1890 */ 315, 219, 315, 217, 72, 315, 315, 109, 315, 315, - /* 1900 */ 315, 315, 315, 329, 315, 315, 315, 315, 262, 285, - /* 1910 */ 315, 331, 315, 328, 315, 315, 315, 219, 315, 217, - /* 1920 */ 67, 315, 315, 109, 315, 315, 328, 315, 315, 329, - /* 1930 */ 219, 315, 217, 60, 262, 285, 109, 331, 315, 328, - /* 1940 */ 315, 315, 329, 219, 315, 217, 63, 262, 285, 109, - /* 1950 */ 331, 315, 315, 315, 315, 329, 315, 315, 315, 315, - /* 1960 */ 262, 285, 315, 331, 315, 315, 315, 315, 315, 328, - /* 1970 */ 315, 315, 315, 219, 315, 217, 84, 315, 315, 109, - /* 1980 */ 315, 315, 315, 315, 315, 329, 315, 315, 315, 315, - /* 1990 */ 262, 285, 315, 331, 315, 328, 315, 315, 315, 219, - /* 2000 */ 315, 217, 68, 315, 315, 109, 315, 315, 328, 315, - /* 2010 */ 315, 329, 219, 315, 217, 52, 262, 285, 109, 331, - /* 2020 */ 315, 328, 315, 315, 329, 219, 315, 217, 80, 262, - /* 2030 */ 285, 109, 331, 315, 315, 315, 315, 329, 315, 315, - /* 2040 */ 315, 315, 262, 285, 315, 331, 315, 315, 315, 315, - /* 2050 */ 315, 328, 315, 315, 315, 219, 315, 217, 57, 315, - /* 2060 */ 315, 109, 315, 315, 315, 315, 315, 329, 315, 315, - /* 2070 */ 315, 315, 262, 285, 315, 331, 315, 328, 315, 315, - /* 2080 */ 315, 219, 315, 217, 64, 315, 315, 109, 315, 315, - /* 2090 */ 328, 315, 315, 329, 219, 315, 217, 70, 262, 285, - /* 2100 */ 109, 331, 315, 328, 315, 315, 329, 219, 315, 217, - /* 2110 */ 77, 262, 285, 109, 331, 315, 315, 315, 315, 329, - /* 2120 */ 315, 315, 315, 315, 262, 285, 315, 331, 315, 315, - /* 2130 */ 315, 315, 315, 328, 315, 315, 315, 219, 315, 217, - /* 2140 */ 73, 315, 315, 109, 315, 315, 315, 315, 315, 329, - /* 2150 */ 315, 315, 315, 315, 262, 285, 315, 331, 315, 328, - /* 2160 */ 315, 315, 315, 219, 315, 217, 75, 315, 315, 109, - /* 2170 */ 315, 315, 328, 315, 315, 329, 219, 315, 217, 61, - /* 2180 */ 262, 285, 109, 331, 315, 328, 315, 315, 329, 219, - /* 2190 */ 315, 217, 81, 262, 285, 109, 331, 315, 315, 315, - /* 2200 */ 315, 329, 315, 315, 315, 315, 262, 285, 315, 331, - /* 2210 */ 315, 315, 315, 315, 315, 328, 315, 315, 315, 219, - /* 2220 */ 315, 217, 62, 315, 315, 109, 315, 315, 315, 315, - /* 2230 */ 315, 329, 315, 315, 315, 315, 262, 285, 315, 331, - /* 2240 */ 315, 328, 315, 315, 315, 219, 315, 217, 82, 315, - /* 2250 */ 315, 109, 315, 315, 328, 315, 315, 329, 219, 315, - /* 2260 */ 217, 55, 262, 285, 109, 331, 315, 328, 315, 315, - /* 2270 */ 329, 219, 315, 191, 59, 262, 285, 109, 331, 315, - /* 2280 */ 315, 315, 315, 329, 315, 315, 315, 315, 262, 285, - /* 2290 */ 315, 331, 315, 315, 315, 315, 315, 328, 315, 315, - /* 2300 */ 315, 219, 315, 217, 79, 315, 315, 109, 315, 315, - /* 2310 */ 315, 315, 315, 329, 315, 315, 315, 315, 262, 285, - /* 2320 */ 315, 331, 315, 328, 315, 315, 315, 219, 315, 217, - /* 2330 */ 69, 315, 315, 109, 315, 315, 328, 315, 315, 329, - /* 2340 */ 219, 315, 217, 78, 262, 285, 109, 331, 315, 328, - /* 2350 */ 315, 315, 329, 224, 315, 217, 315, 262, 285, 109, - /* 2360 */ 331, 315, 315, 315, 315, 194, 315, 315, 315, 315, - /* 2370 */ 262, 285, 315, 331, 315, 315, 315, 315, 315, 328, - /* 2380 */ 315, 315, 315, 234, 315, 217, 328, 315, 315, 109, - /* 2390 */ 238, 315, 217, 315, 315, 256, 109, 315, 315, 315, - /* 2400 */ 262, 285, 240, 331, 315, 315, 315, 262, 285, 315, - /* 2410 */ 331, + /* 0 */ 191, 304, 303, 306, 305, 307, 302, 301, 297, 296, + /* 10 */ 298, 299, 300, 168, 334, 325, 37, 341, 152, 3, + /* 20 */ 38, 38, 215, 281, 201, 218, 360, 128, 277, 133, + /* 30 */ 33, 243, 270, 209, 50, 44, 49, 43, 13, 9, + /* 40 */ 354, 361, 19, 35, 362, 370, 30, 20, 320, 315, + /* 50 */ 311, 310, 316, 103, 265, 279, 168, 309, 319, 356, + /* 60 */ 191, 38, 371, 372, 373, 369, 368, 364, 363, 365, + /* 70 */ 366, 367, 349, 268, 191, 269, 331, 170, 25, 219, + /* 80 */ 202, 38, 213, 52, 252, 116, 115, 176, 440, 324, + /* 90 */ 17, 14, 284, 348, 440, 38, 359, 352, 3, 330, + /* 100 */ 226, 572, 91, 239, 303, 306, 128, 169, 50, 44, + /* 110 */ 49, 43, 13, 9, 354, 361, 19, 35, 362, 370, + /* 120 */ 30, 20, 3, 272, 7, 146, 437, 204, 102, 38, + /* 130 */ 128, 10, 437, 112, 322, 277, 371, 372, 373, 369, + /* 140 */ 368, 364, 363, 365, 366, 367, 349, 268, 191, 357, + /* 150 */ 331, 179, 238, 142, 202, 275, 213, 61, 18, 116, + /* 160 */ 3, 274, 41, 295, 24, 135, 284, 348, 128, 38, + /* 170 */ 359, 352, 18, 330, 18, 274, 41, 274, 233, 192, + /* 180 */ 232, 38, 50, 44, 49, 43, 13, 9, 354, 361, + /* 190 */ 19, 35, 362, 370, 30, 20, 18, 283, 18, 274, + /* 200 */ 15, 274, 228, 119, 185, 18, 236, 155, 274, 8, + /* 210 */ 371, 372, 373, 369, 368, 364, 363, 365, 366, 367, + /* 220 */ 349, 268, 191, 167, 331, 281, 148, 173, 202, 101, + /* 230 */ 213, 61, 21, 116, 120, 158, 277, 12, 11, 135, + /* 240 */ 284, 348, 228, 38, 359, 352, 159, 330, 39, 230, + /* 250 */ 179, 40, 179, 27, 200, 260, 50, 44, 49, 43, + /* 260 */ 13, 9, 354, 361, 19, 35, 362, 370, 30, 20, + /* 270 */ 3, 144, 48, 442, 100, 185, 339, 312, 128, 442, + /* 280 */ 8, 277, 191, 38, 371, 372, 373, 369, 368, 364, + /* 290 */ 363, 365, 366, 367, 349, 268, 191, 179, 331, 259, + /* 300 */ 94, 147, 202, 38, 213, 61, 48, 116, 229, 18, + /* 310 */ 48, 277, 274, 321, 284, 348, 38, 38, 359, 352, + /* 320 */ 313, 330, 275, 439, 206, 23, 38, 285, 257, 439, + /* 330 */ 50, 44, 49, 43, 13, 9, 354, 361, 19, 35, + /* 340 */ 362, 370, 30, 20, 287, 436, 286, 141, 175, 335, + /* 350 */ 267, 38, 114, 231, 281, 2, 48, 277, 371, 372, + /* 360 */ 373, 369, 368, 364, 363, 365, 366, 367, 349, 268, + /* 370 */ 191, 331, 164, 177, 150, 202, 174, 213, 61, 162, + /* 380 */ 116, 191, 277, 18, 277, 180, 274, 284, 348, 277, + /* 390 */ 38, 359, 352, 275, 330, 96, 436, 271, 210, 38, + /* 400 */ 275, 223, 38, 38, 50, 44, 49, 43, 13, 9, + /* 410 */ 354, 361, 19, 35, 362, 370, 30, 20, 345, 278, + /* 420 */ 151, 327, 220, 18, 38, 38, 274, 38, 166, 335, + /* 430 */ 277, 126, 371, 372, 373, 369, 368, 364, 363, 365, + /* 440 */ 366, 367, 349, 268, 191, 331, 177, 222, 143, 202, + /* 450 */ 131, 197, 68, 121, 116, 224, 203, 276, 277, 178, + /* 460 */ 135, 284, 348, 38, 330, 359, 352, 346, 330, 275, + /* 470 */ 227, 347, 18, 38, 318, 208, 317, 38, 50, 44, + /* 480 */ 49, 43, 13, 9, 354, 361, 19, 35, 362, 370, + /* 490 */ 30, 20, 191, 153, 149, 294, 329, 18, 119, 240, + /* 500 */ 225, 38, 38, 277, 277, 38, 371, 372, 373, 369, + /* 510 */ 368, 364, 363, 365, 366, 367, 349, 268, 326, 177, + /* 520 */ 177, 156, 18, 275, 38, 207, 50, 44, 49, 43, + /* 530 */ 13, 9, 354, 361, 19, 35, 362, 370, 30, 20, + /* 540 */ 99, 280, 247, 248, 336, 266, 323, 38, 6, 38, + /* 550 */ 38, 38, 117, 321, 371, 372, 373, 369, 368, 364, + /* 560 */ 363, 365, 366, 367, 349, 268, 191, 331, 172, 335, + /* 570 */ 353, 202, 256, 213, 74, 160, 116, 130, 38, 48, + /* 580 */ 333, 254, 28, 284, 348, 277, 38, 359, 352, 258, + /* 590 */ 330, 328, 255, 281, 4, 38, 18, 38, 38, 196, + /* 600 */ 50, 44, 49, 43, 13, 9, 354, 361, 19, 35, + /* 610 */ 362, 370, 30, 20, 191, 288, 89, 2, 127, 234, + /* 620 */ 48, 293, 130, 264, 289, 341, 204, 93, 371, 372, + /* 630 */ 373, 369, 368, 364, 363, 365, 366, 367, 349, 268, + /* 640 */ 321, 253, 229, 118, 34, 134, 90, 5, 50, 44, + /* 650 */ 49, 43, 13, 9, 354, 361, 19, 35, 362, 370, + /* 660 */ 30, 20, 338, 157, 165, 161, 314, 286, 135, 16, + /* 670 */ 275, 332, 42, 123, 277, 277, 371, 372, 373, 369, + /* 680 */ 368, 364, 363, 365, 366, 367, 349, 268, 191, 331, + /* 690 */ 263, 122, 95, 202, 108, 213, 72, 214, 116, 242, + /* 700 */ 136, 108, 245, 106, 321, 284, 348, 321, 132, 359, + /* 710 */ 352, 171, 330, 321, 321, 273, 321, 177, 191, 104, + /* 720 */ 275, 29, 50, 44, 49, 43, 13, 9, 354, 361, + /* 730 */ 19, 35, 362, 370, 30, 20, 105, 308, 318, 318, + /* 740 */ 318, 318, 318, 318, 318, 318, 318, 318, 318, 321, + /* 750 */ 371, 372, 373, 369, 368, 364, 363, 365, 366, 367, + /* 760 */ 349, 268, 191, 331, 318, 318, 318, 202, 318, 213, + /* 770 */ 55, 318, 116, 318, 137, 97, 318, 261, 318, 284, + /* 780 */ 348, 318, 318, 359, 352, 318, 330, 321, 321, 318, + /* 790 */ 318, 318, 318, 318, 318, 318, 50, 44, 49, 43, + /* 800 */ 13, 9, 354, 361, 19, 35, 362, 370, 30, 20, + /* 810 */ 191, 31, 318, 318, 318, 318, 318, 318, 318, 318, + /* 820 */ 318, 318, 318, 318, 371, 372, 373, 369, 368, 364, + /* 830 */ 363, 365, 366, 367, 349, 268, 318, 318, 318, 318, + /* 840 */ 318, 318, 318, 318, 50, 44, 49, 43, 13, 9, + /* 850 */ 354, 361, 19, 35, 362, 370, 30, 20, 191, 318, + /* 860 */ 318, 318, 318, 318, 318, 318, 318, 318, 318, 318, + /* 870 */ 318, 318, 371, 372, 373, 369, 368, 364, 363, 365, + /* 880 */ 366, 367, 349, 268, 318, 318, 318, 318, 318, 318, + /* 890 */ 318, 318, 50, 44, 49, 43, 13, 9, 354, 361, + /* 900 */ 19, 35, 362, 370, 30, 20, 191, 318, 221, 318, + /* 910 */ 318, 318, 318, 318, 318, 318, 318, 318, 318, 318, + /* 920 */ 371, 372, 373, 369, 368, 364, 363, 365, 366, 367, + /* 930 */ 349, 268, 318, 318, 217, 318, 318, 318, 318, 318, + /* 940 */ 50, 44, 49, 43, 13, 9, 354, 361, 19, 35, + /* 950 */ 362, 370, 30, 20, 191, 318, 318, 318, 318, 318, + /* 960 */ 318, 318, 318, 318, 318, 318, 318, 318, 371, 372, + /* 970 */ 373, 369, 368, 364, 363, 365, 366, 367, 349, 268, + /* 980 */ 318, 318, 318, 318, 318, 318, 318, 318, 50, 44, + /* 990 */ 49, 43, 13, 9, 354, 361, 19, 35, 362, 370, + /* 1000 */ 30, 20, 191, 318, 318, 318, 318, 318, 318, 318, + /* 1010 */ 318, 318, 318, 318, 318, 246, 371, 372, 373, 369, + /* 1020 */ 368, 364, 363, 365, 366, 367, 349, 268, 318, 318, + /* 1030 */ 318, 318, 318, 318, 318, 318, 50, 44, 49, 43, + /* 1040 */ 13, 9, 354, 361, 19, 35, 362, 370, 30, 20, + /* 1050 */ 191, 318, 318, 318, 318, 318, 318, 318, 318, 318, + /* 1060 */ 318, 318, 318, 318, 371, 372, 373, 369, 368, 364, + /* 1070 */ 363, 365, 366, 367, 349, 268, 318, 337, 318, 318, + /* 1080 */ 318, 318, 318, 318, 50, 44, 49, 43, 13, 9, + /* 1090 */ 354, 361, 19, 35, 362, 370, 30, 20, 318, 318, + /* 1100 */ 318, 318, 318, 318, 318, 318, 318, 318, 318, 318, + /* 1110 */ 318, 318, 371, 372, 373, 369, 368, 364, 363, 365, + /* 1120 */ 366, 367, 349, 268, 50, 44, 49, 43, 13, 9, + /* 1130 */ 354, 361, 19, 35, 362, 370, 30, 20, 318, 318, + /* 1140 */ 318, 318, 318, 318, 318, 318, 318, 318, 318, 318, + /* 1150 */ 318, 318, 371, 372, 373, 369, 368, 364, 363, 365, + /* 1160 */ 366, 367, 349, 268, 318, 318, 318, 318, 37, 318, + /* 1170 */ 129, 186, 318, 331, 215, 318, 201, 351, 318, 213, + /* 1180 */ 318, 133, 116, 318, 270, 209, 216, 318, 318, 45, + /* 1190 */ 355, 442, 318, 359, 352, 318, 330, 442, 318, 318, + /* 1200 */ 318, 318, 318, 32, 212, 318, 46, 47, 292, 205, + /* 1210 */ 350, 318, 318, 96, 1, 241, 318, 318, 318, 37, + /* 1220 */ 318, 129, 193, 318, 48, 215, 318, 201, 92, 318, + /* 1230 */ 318, 318, 133, 318, 318, 270, 209, 216, 318, 318, + /* 1240 */ 45, 318, 318, 318, 318, 318, 331, 318, 318, 318, + /* 1250 */ 195, 318, 213, 73, 32, 116, 318, 46, 47, 292, + /* 1260 */ 205, 350, 284, 348, 96, 1, 359, 352, 318, 330, + /* 1270 */ 37, 318, 114, 193, 318, 318, 215, 318, 201, 92, + /* 1280 */ 194, 235, 318, 133, 318, 318, 270, 209, 216, 318, + /* 1290 */ 318, 45, 318, 318, 318, 318, 318, 331, 318, 318, + /* 1300 */ 318, 195, 318, 213, 73, 36, 116, 318, 46, 47, + /* 1310 */ 292, 205, 350, 284, 348, 96, 1, 359, 352, 318, + /* 1320 */ 330, 37, 318, 129, 189, 318, 318, 215, 318, 201, + /* 1330 */ 92, 318, 244, 318, 133, 318, 318, 270, 209, 216, + /* 1340 */ 318, 318, 45, 318, 318, 318, 318, 318, 331, 318, + /* 1350 */ 318, 318, 202, 318, 213, 66, 32, 116, 318, 46, + /* 1360 */ 47, 292, 205, 350, 284, 348, 96, 1, 359, 352, + /* 1370 */ 318, 330, 37, 318, 129, 181, 318, 318, 215, 318, + /* 1380 */ 201, 92, 318, 318, 318, 133, 318, 318, 270, 209, + /* 1390 */ 216, 318, 318, 45, 318, 318, 318, 318, 318, 331, + /* 1400 */ 318, 318, 318, 202, 318, 213, 77, 32, 116, 318, + /* 1410 */ 46, 47, 292, 205, 350, 284, 348, 96, 1, 359, + /* 1420 */ 352, 318, 330, 37, 318, 129, 182, 318, 318, 215, + /* 1430 */ 318, 201, 92, 318, 318, 318, 133, 318, 318, 270, + /* 1440 */ 209, 198, 318, 318, 45, 318, 318, 318, 318, 318, + /* 1450 */ 331, 318, 318, 318, 187, 318, 213, 83, 32, 116, + /* 1460 */ 318, 46, 47, 292, 205, 350, 284, 348, 96, 1, + /* 1470 */ 359, 352, 318, 330, 37, 318, 113, 193, 318, 318, + /* 1480 */ 215, 318, 201, 92, 318, 318, 318, 133, 318, 318, + /* 1490 */ 270, 209, 216, 318, 318, 45, 318, 318, 318, 318, + /* 1500 */ 318, 331, 318, 318, 318, 202, 318, 213, 71, 32, + /* 1510 */ 116, 318, 46, 47, 292, 205, 350, 284, 348, 96, + /* 1520 */ 1, 359, 352, 318, 330, 37, 318, 124, 88, 318, + /* 1530 */ 318, 215, 318, 201, 92, 318, 318, 318, 133, 318, + /* 1540 */ 318, 270, 209, 216, 318, 318, 45, 318, 318, 318, + /* 1550 */ 318, 318, 331, 318, 318, 318, 202, 318, 213, 81, + /* 1560 */ 32, 116, 318, 46, 47, 292, 205, 350, 284, 348, + /* 1570 */ 96, 1, 359, 352, 318, 330, 37, 318, 129, 183, + /* 1580 */ 318, 318, 215, 318, 201, 92, 318, 318, 318, 133, + /* 1590 */ 318, 318, 270, 209, 216, 318, 318, 45, 318, 318, + /* 1600 */ 318, 318, 318, 331, 318, 318, 318, 202, 318, 213, + /* 1610 */ 58, 32, 116, 318, 46, 47, 292, 205, 350, 284, + /* 1620 */ 348, 96, 1, 359, 352, 318, 330, 37, 318, 125, + /* 1630 */ 193, 318, 318, 215, 318, 201, 92, 318, 318, 318, + /* 1640 */ 133, 318, 318, 270, 209, 216, 318, 318, 45, 318, + /* 1650 */ 318, 318, 318, 318, 331, 318, 318, 318, 190, 318, + /* 1660 */ 213, 53, 32, 116, 318, 46, 47, 292, 205, 350, + /* 1670 */ 284, 348, 96, 1, 359, 352, 318, 330, 37, 318, + /* 1680 */ 114, 193, 318, 318, 215, 318, 201, 92, 318, 318, + /* 1690 */ 318, 133, 318, 318, 270, 209, 216, 318, 318, 45, + /* 1700 */ 318, 318, 318, 318, 318, 331, 318, 318, 318, 111, + /* 1710 */ 318, 107, 54, 36, 109, 318, 46, 47, 292, 205, + /* 1720 */ 350, 284, 348, 96, 318, 359, 352, 318, 330, 37, + /* 1730 */ 318, 114, 199, 318, 318, 215, 318, 201, 92, 318, + /* 1740 */ 318, 318, 133, 318, 318, 270, 209, 216, 483, 318, + /* 1750 */ 45, 318, 318, 318, 483, 318, 483, 318, 483, 483, + /* 1760 */ 318, 483, 139, 318, 36, 173, 483, 46, 47, 292, + /* 1770 */ 205, 350, 277, 318, 96, 12, 11, 318, 318, 318, + /* 1780 */ 318, 483, 3, 483, 318, 318, 318, 318, 179, 92, + /* 1790 */ 128, 318, 318, 163, 483, 331, 98, 318, 318, 202, + /* 1800 */ 318, 213, 84, 277, 116, 318, 12, 11, 483, 318, + /* 1810 */ 318, 284, 348, 318, 318, 359, 352, 318, 330, 179, + /* 1820 */ 331, 318, 318, 318, 202, 318, 213, 85, 318, 116, + /* 1830 */ 318, 318, 318, 318, 318, 318, 284, 348, 318, 318, + /* 1840 */ 359, 352, 331, 330, 318, 318, 184, 318, 213, 63, + /* 1850 */ 318, 116, 318, 318, 318, 318, 318, 318, 284, 348, + /* 1860 */ 318, 318, 359, 352, 331, 330, 318, 318, 202, 318, + /* 1870 */ 213, 75, 318, 116, 318, 318, 318, 318, 318, 318, + /* 1880 */ 284, 348, 331, 318, 359, 352, 202, 330, 213, 62, + /* 1890 */ 318, 116, 318, 318, 318, 318, 318, 318, 284, 348, + /* 1900 */ 318, 318, 359, 352, 318, 330, 318, 331, 318, 318, + /* 1910 */ 318, 202, 318, 213, 76, 318, 116, 318, 318, 318, + /* 1920 */ 318, 318, 318, 284, 348, 318, 318, 359, 352, 318, + /* 1930 */ 330, 318, 318, 318, 374, 318, 318, 318, 318, 22, + /* 1940 */ 318, 318, 331, 318, 318, 215, 202, 201, 213, 60, + /* 1950 */ 318, 116, 133, 318, 318, 270, 209, 318, 284, 348, + /* 1960 */ 318, 318, 359, 352, 331, 330, 318, 318, 202, 318, + /* 1970 */ 213, 80, 318, 116, 318, 318, 318, 318, 318, 318, + /* 1980 */ 284, 348, 318, 318, 359, 352, 331, 330, 318, 318, + /* 1990 */ 202, 318, 213, 82, 318, 116, 318, 318, 318, 343, + /* 2000 */ 26, 340, 284, 348, 318, 318, 359, 352, 318, 330, + /* 2010 */ 331, 318, 318, 318, 202, 318, 213, 87, 318, 116, + /* 2020 */ 318, 318, 318, 318, 318, 318, 284, 348, 331, 318, + /* 2030 */ 359, 352, 202, 330, 213, 69, 318, 116, 318, 318, + /* 2040 */ 318, 318, 318, 318, 284, 348, 331, 318, 359, 352, + /* 2050 */ 202, 330, 213, 57, 318, 116, 318, 318, 318, 318, + /* 2060 */ 318, 318, 284, 348, 331, 318, 359, 352, 202, 330, + /* 2070 */ 213, 70, 318, 116, 318, 318, 318, 318, 318, 318, + /* 2080 */ 284, 348, 331, 318, 359, 352, 202, 330, 213, 59, + /* 2090 */ 318, 116, 318, 318, 318, 318, 318, 318, 284, 348, + /* 2100 */ 331, 318, 359, 352, 111, 330, 110, 56, 318, 109, + /* 2110 */ 318, 318, 318, 318, 318, 318, 284, 348, 331, 318, + /* 2120 */ 359, 352, 188, 330, 213, 79, 318, 116, 318, 318, + /* 2130 */ 318, 374, 318, 318, 284, 348, 22, 318, 359, 352, + /* 2140 */ 318, 330, 215, 318, 201, 318, 318, 318, 318, 133, + /* 2150 */ 331, 318, 270, 209, 202, 318, 213, 78, 318, 116, + /* 2160 */ 318, 318, 318, 318, 318, 318, 284, 348, 331, 318, + /* 2170 */ 359, 352, 202, 330, 213, 51, 318, 116, 318, 318, + /* 2180 */ 318, 318, 318, 318, 284, 348, 331, 318, 359, 352, + /* 2190 */ 202, 330, 213, 67, 318, 116, 342, 26, 340, 318, + /* 2200 */ 318, 318, 284, 348, 331, 318, 359, 352, 202, 330, + /* 2210 */ 213, 65, 318, 116, 318, 318, 318, 318, 318, 318, + /* 2220 */ 284, 348, 331, 318, 359, 352, 202, 330, 213, 64, + /* 2230 */ 318, 116, 318, 318, 318, 318, 318, 318, 284, 348, + /* 2240 */ 331, 318, 359, 352, 202, 330, 213, 86, 318, 116, + /* 2250 */ 318, 318, 318, 318, 318, 318, 284, 348, 331, 318, + /* 2260 */ 359, 352, 251, 330, 213, 318, 318, 116, 331, 318, + /* 2270 */ 318, 318, 282, 318, 213, 250, 331, 116, 359, 352, + /* 2280 */ 358, 330, 213, 318, 318, 116, 331, 318, 359, 352, + /* 2290 */ 290, 330, 213, 318, 331, 116, 359, 352, 262, 330, + /* 2300 */ 213, 318, 318, 116, 331, 318, 359, 352, 249, 330, + /* 2310 */ 213, 318, 331, 116, 359, 352, 237, 330, 213, 191, + /* 2320 */ 318, 116, 331, 318, 359, 352, 291, 330, 213, 318, + /* 2330 */ 318, 116, 359, 352, 344, 330, 318, 318, 211, 318, + /* 2340 */ 38, 318, 359, 352, 140, 330, 138, 173, 318, 173, + /* 2350 */ 318, 318, 145, 318, 277, 173, 277, 12, 11, 12, + /* 2360 */ 11, 318, 277, 318, 318, 12, 11, 318, 3, 318, + /* 2370 */ 179, 318, 179, 318, 154, 318, 128, 173, 179, 318, + /* 2380 */ 318, 318, 318, 318, 277, 318, 318, 12, 11, 318, + /* 2390 */ 318, 318, 318, 318, 318, 318, 318, 318, 318, 318, + /* 2400 */ 179, ); static public $yy_lookahead = array( - /* 0 */ 1, 80, 81, 82, 3, 4, 5, 6, 7, 8, - /* 10 */ 9, 10, 11, 12, 16, 15, 15, 81, 18, 49, - /* 20 */ 22, 22, 21, 25, 23, 55, 27, 57, 82, 28, - /* 30 */ 84, 61, 31, 34, 35, 36, 37, 38, 39, 40, - /* 40 */ 41, 42, 43, 44, 45, 46, 47, 4, 5, 6, - /* 50 */ 7, 8, 18, 117, 118, 12, 13, 14, 58, 109, - /* 60 */ 110, 62, 63, 64, 65, 66, 67, 68, 69, 70, - /* 70 */ 71, 72, 73, 1, 81, 89, 2, 33, 85, 15, - /* 80 */ 87, 88, 18, 19, 91, 92, 100, 101, 16, 25, - /* 90 */ 97, 16, 58, 19, 22, 102, 103, 22, 105, 113, - /* 100 */ 78, 79, 80, 81, 82, 61, 34, 35, 36, 37, - /* 110 */ 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, - /* 120 */ 19, 15, 15, 48, 49, 18, 19, 16, 15, 16, - /* 130 */ 29, 18, 57, 22, 62, 63, 64, 65, 66, 67, - /* 140 */ 68, 69, 70, 71, 72, 73, 1, 81, 30, 86, - /* 150 */ 49, 85, 89, 87, 88, 49, 90, 91, 57, 48, - /* 160 */ 19, 16, 99, 97, 16, 58, 48, 22, 102, 103, - /* 170 */ 22, 105, 15, 25, 17, 18, 113, 16, 1, 34, - /* 180 */ 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, - /* 190 */ 45, 46, 47, 16, 106, 15, 55, 20, 18, 22, - /* 200 */ 15, 92, 93, 18, 19, 19, 20, 62, 63, 64, - /* 210 */ 65, 66, 67, 68, 69, 70, 71, 72, 73, 1, - /* 220 */ 81, 30, 17, 24, 85, 81, 87, 88, 98, 85, - /* 230 */ 91, 87, 33, 16, 16, 91, 97, 86, 58, 22, - /* 240 */ 49, 102, 103, 57, 105, 49, 102, 103, 57, 105, - /* 250 */ 99, 112, 34, 35, 36, 37, 38, 39, 40, 41, - /* 260 */ 42, 43, 44, 45, 46, 47, 49, 15, 16, 16, - /* 270 */ 18, 17, 18, 25, 57, 22, 107, 50, 109, 110, - /* 280 */ 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, - /* 290 */ 72, 73, 1, 81, 87, 1, 29, 85, 91, 87, - /* 300 */ 88, 48, 90, 91, 98, 15, 16, 16, 18, 97, - /* 310 */ 16, 86, 105, 59, 102, 103, 22, 105, 16, 113, - /* 320 */ 30, 17, 18, 75, 99, 34, 35, 36, 37, 38, - /* 330 */ 39, 40, 41, 42, 43, 44, 45, 46, 47, 114, - /* 340 */ 55, 16, 16, 15, 17, 60, 18, 22, 22, 15, - /* 350 */ 48, 17, 18, 62, 63, 64, 65, 66, 67, 68, - /* 360 */ 69, 70, 71, 72, 73, 1, 32, 86, 81, 18, - /* 370 */ 89, 18, 85, 15, 87, 88, 18, 90, 91, 20, - /* 380 */ 99, 100, 101, 32, 97, 49, 109, 110, 24, 102, - /* 390 */ 103, 16, 105, 57, 113, 17, 17, 22, 34, 35, - /* 400 */ 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, - /* 410 */ 46, 47, 1, 17, 55, 16, 16, 16, 16, 60, - /* 420 */ 2, 22, 22, 22, 22, 86, 62, 63, 64, 65, - /* 430 */ 66, 67, 68, 69, 70, 71, 72, 73, 99, 1, - /* 440 */ 22, 106, 29, 108, 33, 34, 35, 36, 37, 38, - /* 450 */ 39, 40, 41, 42, 43, 44, 45, 46, 47, 1, - /* 460 */ 22, 16, 16, 16, 16, 16, 16, 22, 22, 22, - /* 470 */ 22, 22, 22, 62, 63, 64, 65, 66, 67, 68, - /* 480 */ 69, 70, 71, 72, 73, 16, 15, 15, 18, 18, - /* 490 */ 18, 22, 34, 35, 36, 37, 38, 39, 40, 41, - /* 500 */ 42, 43, 44, 45, 46, 47, 86, 16, 50, 16, - /* 510 */ 16, 104, 48, 22, 81, 22, 22, 18, 111, 99, - /* 520 */ 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, - /* 530 */ 72, 73, 1, 81, 104, 18, 18, 85, 81, 87, - /* 540 */ 88, 111, 85, 91, 87, 86, 20, 16, 91, 97, - /* 550 */ 95, 118, 55, 15, 102, 103, 18, 105, 99, 102, - /* 560 */ 103, 16, 105, 108, 112, 34, 35, 36, 37, 38, - /* 570 */ 39, 40, 41, 42, 43, 44, 45, 46, 47, 95, - /* 580 */ 106, 98, 108, 57, 32, 18, 18, 25, 49, 2, - /* 590 */ 19, 2, 108, 62, 63, 64, 65, 66, 67, 68, - /* 600 */ 69, 70, 71, 72, 73, 1, 81, 96, 32, 61, - /* 610 */ 85, 81, 87, 88, 50, 85, 91, 87, 95, 108, - /* 620 */ 16, 91, 97, 95, 16, 26, 51, 102, 103, 18, - /* 630 */ 105, 108, 102, 103, 22, 105, 108, 112, 34, 35, - /* 640 */ 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, - /* 650 */ 46, 47, 1, 22, 59, 59, 50, 18, 99, 19, - /* 660 */ 107, 106, 1, 17, 20, 95, 62, 63, 64, 65, - /* 670 */ 66, 67, 68, 69, 70, 71, 72, 73, 108, 22, - /* 680 */ 22, 108, 2, 106, 94, 34, 35, 36, 37, 38, - /* 690 */ 39, 40, 41, 42, 43, 44, 45, 46, 47, 111, - /* 700 */ 106, 22, 83, 110, 13, 92, 114, 119, 94, 119, - /* 710 */ 113, 119, 61, 62, 63, 64, 65, 66, 67, 68, - /* 720 */ 69, 70, 71, 72, 73, 1, 81, 119, 86, 119, - /* 730 */ 85, 89, 87, 88, 119, 90, 91, 15, 16, 119, - /* 740 */ 18, 99, 97, 95, 95, 119, 22, 102, 103, 119, - /* 750 */ 105, 119, 30, 119, 119, 113, 108, 108, 34, 35, - /* 760 */ 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, - /* 770 */ 46, 47, 86, 119, 119, 119, 119, 119, 119, 119, - /* 780 */ 119, 119, 119, 119, 119, 99, 62, 63, 64, 65, - /* 790 */ 66, 67, 68, 69, 70, 71, 72, 73, 1, 81, - /* 800 */ 119, 119, 119, 85, 81, 87, 88, 119, 85, 91, - /* 810 */ 87, 86, 119, 16, 91, 97, 95, 119, 119, 119, - /* 820 */ 102, 103, 119, 105, 99, 102, 103, 119, 105, 108, - /* 830 */ 112, 34, 35, 36, 37, 38, 39, 40, 41, 42, - /* 840 */ 43, 44, 45, 46, 47, 1, 2, 119, 119, 119, - /* 850 */ 119, 119, 119, 119, 119, 119, 119, 119, 95, 62, - /* 860 */ 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, - /* 870 */ 73, 108, 119, 119, 119, 119, 119, 119, 34, 35, - /* 880 */ 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, - /* 890 */ 46, 47, 1, 119, 119, 119, 119, 119, 119, 119, - /* 900 */ 119, 119, 119, 119, 119, 95, 62, 63, 64, 65, - /* 910 */ 66, 67, 68, 69, 70, 71, 72, 73, 108, 119, - /* 920 */ 119, 119, 119, 119, 119, 34, 35, 36, 37, 38, - /* 930 */ 39, 40, 41, 42, 43, 44, 45, 46, 47, 119, - /* 940 */ 119, 50, 119, 119, 119, 119, 119, 119, 119, 119, - /* 950 */ 119, 119, 119, 62, 63, 64, 65, 66, 67, 68, - /* 960 */ 69, 70, 71, 72, 73, 1, 81, 119, 86, 119, - /* 970 */ 85, 89, 87, 88, 119, 90, 91, 119, 119, 119, - /* 980 */ 16, 99, 97, 119, 119, 119, 119, 102, 103, 119, - /* 990 */ 105, 119, 119, 119, 119, 113, 119, 119, 34, 35, - /* 1000 */ 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, - /* 1010 */ 46, 47, 1, 119, 119, 119, 119, 119, 119, 119, - /* 1020 */ 119, 119, 119, 119, 119, 119, 62, 63, 64, 65, - /* 1030 */ 66, 67, 68, 69, 70, 71, 72, 73, 119, 119, - /* 1040 */ 119, 119, 119, 119, 119, 34, 35, 36, 37, 38, - /* 1050 */ 39, 40, 41, 42, 43, 44, 45, 46, 47, 1, - /* 1060 */ 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, - /* 1070 */ 119, 119, 119, 62, 63, 64, 65, 66, 67, 68, - /* 1080 */ 69, 70, 71, 72, 73, 119, 75, 119, 119, 119, - /* 1090 */ 119, 119, 34, 35, 36, 37, 38, 39, 40, 41, - /* 1100 */ 42, 43, 44, 45, 46, 47, 119, 119, 119, 119, - /* 1110 */ 119, 119, 119, 119, 119, 119, 119, 119, 119, 86, - /* 1120 */ 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, - /* 1130 */ 72, 73, 99, 119, 119, 119, 15, 86, 17, 18, - /* 1140 */ 119, 81, 21, 119, 23, 85, 113, 87, 88, 28, - /* 1150 */ 99, 91, 31, 32, 119, 119, 35, 97, 119, 119, - /* 1160 */ 119, 119, 102, 103, 113, 105, 86, 119, 119, 119, - /* 1170 */ 49, 119, 119, 52, 53, 54, 55, 56, 119, 99, - /* 1180 */ 59, 60, 61, 119, 119, 119, 15, 119, 17, 18, - /* 1190 */ 119, 119, 21, 113, 23, 74, 119, 119, 119, 28, - /* 1200 */ 10, 119, 31, 32, 119, 15, 35, 119, 119, 119, - /* 1210 */ 119, 21, 119, 23, 119, 119, 119, 119, 28, 119, - /* 1220 */ 49, 31, 119, 52, 53, 54, 55, 56, 119, 119, - /* 1230 */ 59, 60, 119, 119, 119, 119, 15, 119, 17, 18, - /* 1240 */ 119, 119, 21, 119, 23, 74, 119, 119, 119, 28, - /* 1250 */ 10, 119, 31, 32, 119, 15, 35, 119, 119, 119, - /* 1260 */ 119, 21, 119, 23, 74, 75, 76, 119, 28, 86, - /* 1270 */ 49, 31, 89, 52, 53, 54, 55, 56, 119, 119, - /* 1280 */ 59, 60, 99, 100, 101, 119, 15, 81, 17, 18, - /* 1290 */ 119, 85, 21, 87, 23, 74, 113, 91, 119, 28, - /* 1300 */ 119, 119, 31, 32, 119, 119, 35, 119, 102, 103, - /* 1310 */ 119, 105, 119, 119, 74, 75, 76, 119, 119, 119, - /* 1320 */ 49, 119, 119, 52, 53, 54, 55, 56, 119, 119, - /* 1330 */ 59, 60, 119, 119, 119, 119, 15, 81, 17, 18, - /* 1340 */ 119, 85, 21, 87, 23, 74, 119, 91, 119, 28, - /* 1350 */ 119, 119, 31, 32, 119, 119, 35, 119, 102, 103, - /* 1360 */ 119, 105, 119, 1, 119, 119, 119, 119, 119, 119, - /* 1370 */ 49, 119, 119, 52, 53, 54, 55, 56, 16, 119, - /* 1380 */ 59, 60, 20, 119, 22, 119, 15, 119, 17, 18, - /* 1390 */ 119, 119, 21, 119, 23, 74, 119, 119, 119, 28, - /* 1400 */ 119, 86, 31, 32, 89, 119, 35, 119, 119, 119, - /* 1410 */ 119, 49, 119, 119, 99, 100, 101, 119, 119, 57, - /* 1420 */ 49, 119, 119, 52, 53, 54, 55, 56, 113, 119, - /* 1430 */ 59, 60, 119, 119, 119, 119, 15, 119, 17, 18, - /* 1440 */ 119, 119, 21, 119, 23, 74, 119, 119, 119, 28, - /* 1450 */ 119, 119, 31, 32, 119, 119, 35, 119, 119, 119, - /* 1460 */ 119, 119, 119, 119, 119, 119, 119, 119, 119, 86, - /* 1470 */ 49, 119, 89, 52, 53, 54, 55, 56, 119, 119, - /* 1480 */ 59, 60, 99, 100, 101, 119, 15, 119, 17, 18, - /* 1490 */ 119, 119, 21, 119, 23, 74, 113, 119, 119, 28, - /* 1500 */ 119, 119, 31, 32, 119, 119, 35, 119, 119, 119, - /* 1510 */ 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, - /* 1520 */ 49, 119, 119, 52, 53, 54, 55, 56, 119, 119, - /* 1530 */ 59, 60, 119, 119, 119, 119, 15, 119, 17, 18, - /* 1540 */ 119, 119, 21, 119, 23, 74, 119, 119, 119, 28, - /* 1550 */ 119, 119, 31, 32, 119, 119, 35, 119, 119, 119, - /* 1560 */ 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, - /* 1570 */ 49, 119, 119, 52, 53, 54, 55, 56, 119, 119, - /* 1580 */ 59, 60, 119, 119, 119, 119, 15, 119, 17, 18, - /* 1590 */ 119, 119, 21, 119, 23, 74, 119, 119, 119, 28, - /* 1600 */ 119, 119, 31, 32, 119, 119, 35, 119, 119, 119, - /* 1610 */ 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, - /* 1620 */ 49, 119, 119, 52, 53, 54, 55, 56, 119, 119, - /* 1630 */ 59, 60, 119, 119, 119, 119, 15, 119, 17, 18, - /* 1640 */ 119, 119, 21, 119, 23, 74, 119, 119, 119, 28, - /* 1650 */ 119, 119, 31, 32, 119, 119, 35, 119, 119, 119, - /* 1660 */ 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, - /* 1670 */ 49, 119, 119, 52, 53, 54, 55, 56, 119, 119, - /* 1680 */ 59, 60, 119, 119, 119, 119, 15, 119, 17, 18, - /* 1690 */ 119, 119, 21, 119, 23, 74, 119, 119, 119, 28, - /* 1700 */ 119, 119, 31, 32, 119, 119, 35, 81, 119, 119, - /* 1710 */ 119, 85, 119, 87, 119, 119, 119, 91, 119, 119, - /* 1720 */ 49, 119, 119, 52, 53, 54, 55, 56, 102, 103, - /* 1730 */ 59, 105, 119, 119, 119, 119, 15, 119, 17, 18, - /* 1740 */ 119, 119, 21, 119, 23, 74, 119, 119, 119, 28, - /* 1750 */ 119, 119, 31, 32, 119, 119, 35, 119, 119, 119, - /* 1760 */ 119, 119, 81, 119, 119, 119, 85, 119, 87, 88, - /* 1770 */ 49, 119, 91, 52, 53, 54, 55, 56, 97, 119, - /* 1780 */ 59, 119, 119, 102, 103, 119, 105, 119, 119, 119, - /* 1790 */ 119, 119, 119, 119, 119, 74, 115, 116, 119, 119, - /* 1800 */ 119, 119, 119, 119, 119, 81, 119, 119, 119, 85, - /* 1810 */ 119, 87, 88, 119, 119, 91, 119, 119, 119, 119, - /* 1820 */ 119, 97, 119, 119, 119, 119, 102, 103, 119, 105, - /* 1830 */ 119, 81, 119, 119, 119, 85, 119, 87, 88, 119, - /* 1840 */ 116, 91, 119, 119, 81, 119, 119, 97, 85, 119, - /* 1850 */ 87, 88, 102, 103, 91, 105, 119, 81, 119, 119, - /* 1860 */ 97, 85, 119, 87, 88, 102, 103, 91, 105, 119, - /* 1870 */ 119, 119, 119, 97, 119, 119, 119, 119, 102, 103, - /* 1880 */ 119, 105, 119, 119, 119, 119, 119, 81, 119, 119, - /* 1890 */ 119, 85, 119, 87, 88, 119, 119, 91, 119, 119, - /* 1900 */ 119, 119, 119, 97, 119, 119, 119, 119, 102, 103, - /* 1910 */ 119, 105, 119, 81, 119, 119, 119, 85, 119, 87, - /* 1920 */ 88, 119, 119, 91, 119, 119, 81, 119, 119, 97, - /* 1930 */ 85, 119, 87, 88, 102, 103, 91, 105, 119, 81, - /* 1940 */ 119, 119, 97, 85, 119, 87, 88, 102, 103, 91, - /* 1950 */ 105, 119, 119, 119, 119, 97, 119, 119, 119, 119, - /* 1960 */ 102, 103, 119, 105, 119, 119, 119, 119, 119, 81, - /* 1970 */ 119, 119, 119, 85, 119, 87, 88, 119, 119, 91, - /* 1980 */ 119, 119, 119, 119, 119, 97, 119, 119, 119, 119, - /* 1990 */ 102, 103, 119, 105, 119, 81, 119, 119, 119, 85, - /* 2000 */ 119, 87, 88, 119, 119, 91, 119, 119, 81, 119, - /* 2010 */ 119, 97, 85, 119, 87, 88, 102, 103, 91, 105, - /* 2020 */ 119, 81, 119, 119, 97, 85, 119, 87, 88, 102, - /* 2030 */ 103, 91, 105, 119, 119, 119, 119, 97, 119, 119, - /* 2040 */ 119, 119, 102, 103, 119, 105, 119, 119, 119, 119, - /* 2050 */ 119, 81, 119, 119, 119, 85, 119, 87, 88, 119, - /* 2060 */ 119, 91, 119, 119, 119, 119, 119, 97, 119, 119, - /* 2070 */ 119, 119, 102, 103, 119, 105, 119, 81, 119, 119, - /* 2080 */ 119, 85, 119, 87, 88, 119, 119, 91, 119, 119, - /* 2090 */ 81, 119, 119, 97, 85, 119, 87, 88, 102, 103, - /* 2100 */ 91, 105, 119, 81, 119, 119, 97, 85, 119, 87, - /* 2110 */ 88, 102, 103, 91, 105, 119, 119, 119, 119, 97, - /* 2120 */ 119, 119, 119, 119, 102, 103, 119, 105, 119, 119, - /* 2130 */ 119, 119, 119, 81, 119, 119, 119, 85, 119, 87, - /* 2140 */ 88, 119, 119, 91, 119, 119, 119, 119, 119, 97, - /* 2150 */ 119, 119, 119, 119, 102, 103, 119, 105, 119, 81, - /* 2160 */ 119, 119, 119, 85, 119, 87, 88, 119, 119, 91, - /* 2170 */ 119, 119, 81, 119, 119, 97, 85, 119, 87, 88, - /* 2180 */ 102, 103, 91, 105, 119, 81, 119, 119, 97, 85, - /* 2190 */ 119, 87, 88, 102, 103, 91, 105, 119, 119, 119, - /* 2200 */ 119, 97, 119, 119, 119, 119, 102, 103, 119, 105, - /* 2210 */ 119, 119, 119, 119, 119, 81, 119, 119, 119, 85, - /* 2220 */ 119, 87, 88, 119, 119, 91, 119, 119, 119, 119, - /* 2230 */ 119, 97, 119, 119, 119, 119, 102, 103, 119, 105, - /* 2240 */ 119, 81, 119, 119, 119, 85, 119, 87, 88, 119, - /* 2250 */ 119, 91, 119, 119, 81, 119, 119, 97, 85, 119, - /* 2260 */ 87, 88, 102, 103, 91, 105, 119, 81, 119, 119, - /* 2270 */ 97, 85, 119, 87, 88, 102, 103, 91, 105, 119, - /* 2280 */ 119, 119, 119, 97, 119, 119, 119, 119, 102, 103, - /* 2290 */ 119, 105, 119, 119, 119, 119, 119, 81, 119, 119, - /* 2300 */ 119, 85, 119, 87, 88, 119, 119, 91, 119, 119, - /* 2310 */ 119, 119, 119, 97, 119, 119, 119, 119, 102, 103, - /* 2320 */ 119, 105, 119, 81, 119, 119, 119, 85, 119, 87, - /* 2330 */ 88, 119, 119, 91, 119, 119, 81, 119, 119, 97, - /* 2340 */ 85, 119, 87, 88, 102, 103, 91, 105, 119, 81, - /* 2350 */ 119, 119, 97, 85, 119, 87, 119, 102, 103, 91, - /* 2360 */ 105, 119, 119, 119, 119, 97, 119, 119, 119, 119, - /* 2370 */ 102, 103, 119, 105, 119, 119, 119, 119, 119, 81, - /* 2380 */ 119, 119, 119, 85, 119, 87, 81, 119, 119, 91, - /* 2390 */ 85, 119, 87, 119, 119, 97, 91, 119, 119, 119, - /* 2400 */ 102, 103, 97, 105, 119, 119, 119, 102, 103, 119, - /* 2410 */ 105, + /* 0 */ 1, 81, 82, 83, 3, 4, 5, 6, 7, 8, + /* 10 */ 9, 10, 11, 12, 16, 16, 15, 82, 87, 50, + /* 20 */ 22, 22, 21, 25, 23, 56, 18, 58, 97, 28, + /* 30 */ 2, 62, 31, 32, 35, 36, 37, 38, 39, 40, + /* 40 */ 41, 42, 43, 44, 45, 46, 47, 48, 4, 5, + /* 50 */ 6, 7, 8, 118, 119, 16, 12, 13, 14, 18, + /* 60 */ 1, 22, 63, 64, 65, 66, 67, 68, 69, 70, + /* 70 */ 71, 72, 73, 74, 1, 16, 82, 24, 30, 20, + /* 80 */ 86, 22, 88, 89, 51, 91, 92, 34, 16, 16, + /* 90 */ 19, 19, 98, 99, 22, 22, 102, 103, 50, 105, + /* 100 */ 59, 79, 80, 81, 82, 83, 58, 18, 35, 36, + /* 110 */ 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, + /* 120 */ 47, 48, 50, 16, 34, 87, 16, 56, 90, 22, + /* 130 */ 58, 15, 22, 17, 18, 97, 63, 64, 65, 66, + /* 140 */ 67, 68, 69, 70, 71, 72, 73, 74, 1, 33, + /* 150 */ 82, 113, 62, 106, 86, 108, 88, 89, 15, 91, + /* 160 */ 50, 18, 19, 16, 19, 20, 98, 99, 58, 22, + /* 170 */ 102, 103, 15, 105, 15, 18, 19, 18, 92, 93, + /* 180 */ 112, 22, 35, 36, 37, 38, 39, 40, 41, 42, + /* 190 */ 43, 44, 45, 46, 47, 48, 15, 18, 15, 18, + /* 200 */ 19, 18, 59, 58, 56, 15, 25, 106, 18, 61, + /* 210 */ 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, + /* 220 */ 73, 74, 1, 114, 82, 25, 87, 90, 86, 90, + /* 230 */ 88, 89, 15, 91, 17, 18, 97, 100, 101, 20, + /* 240 */ 98, 99, 59, 22, 102, 103, 106, 105, 27, 59, + /* 250 */ 113, 26, 113, 30, 112, 51, 35, 36, 37, 38, + /* 260 */ 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, + /* 270 */ 50, 87, 49, 16, 90, 56, 76, 16, 58, 22, + /* 280 */ 61, 97, 1, 22, 63, 64, 65, 66, 67, 68, + /* 290 */ 69, 70, 71, 72, 73, 74, 1, 113, 82, 62, + /* 300 */ 95, 87, 86, 22, 88, 89, 49, 91, 2, 15, + /* 310 */ 49, 97, 18, 108, 98, 99, 22, 22, 102, 103, + /* 320 */ 16, 105, 108, 16, 30, 19, 22, 18, 112, 22, + /* 330 */ 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + /* 340 */ 45, 46, 47, 48, 18, 16, 107, 87, 109, 110, + /* 350 */ 60, 22, 17, 18, 25, 50, 49, 97, 63, 64, + /* 360 */ 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + /* 370 */ 1, 82, 87, 113, 87, 86, 114, 88, 89, 87, + /* 380 */ 91, 1, 97, 15, 97, 16, 18, 98, 99, 97, + /* 390 */ 22, 102, 103, 108, 105, 60, 16, 16, 30, 22, + /* 400 */ 108, 112, 22, 22, 35, 36, 37, 38, 39, 40, + /* 410 */ 41, 42, 43, 44, 45, 46, 47, 48, 16, 16, + /* 420 */ 87, 16, 18, 15, 22, 22, 18, 22, 109, 110, + /* 430 */ 97, 17, 63, 64, 65, 66, 67, 68, 69, 70, + /* 440 */ 71, 72, 73, 74, 1, 82, 113, 88, 87, 86, + /* 450 */ 91, 88, 89, 17, 91, 17, 18, 16, 97, 16, + /* 460 */ 20, 98, 99, 22, 105, 102, 103, 16, 105, 108, + /* 470 */ 18, 16, 15, 22, 83, 18, 85, 22, 35, 36, + /* 480 */ 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, + /* 490 */ 47, 48, 1, 87, 87, 16, 16, 15, 58, 16, + /* 500 */ 18, 22, 22, 97, 97, 22, 63, 64, 65, 66, + /* 510 */ 67, 68, 69, 70, 71, 72, 73, 74, 16, 113, + /* 520 */ 113, 106, 15, 108, 22, 18, 35, 36, 37, 38, + /* 530 */ 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, + /* 540 */ 95, 16, 51, 16, 16, 16, 16, 22, 22, 22, + /* 550 */ 22, 22, 17, 108, 63, 64, 65, 66, 67, 68, + /* 560 */ 69, 70, 71, 72, 73, 74, 1, 82, 109, 110, + /* 570 */ 104, 86, 16, 88, 89, 87, 91, 111, 22, 49, + /* 580 */ 16, 16, 15, 98, 99, 97, 22, 102, 103, 16, + /* 590 */ 105, 16, 16, 25, 50, 22, 15, 22, 22, 18, + /* 600 */ 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + /* 610 */ 45, 46, 47, 48, 1, 104, 18, 50, 17, 60, + /* 620 */ 49, 33, 111, 51, 33, 82, 56, 95, 63, 64, + /* 630 */ 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + /* 640 */ 108, 16, 2, 17, 52, 22, 18, 34, 35, 36, + /* 650 */ 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, + /* 660 */ 47, 48, 119, 106, 87, 87, 97, 107, 20, 22, + /* 670 */ 108, 110, 2, 17, 97, 97, 63, 64, 65, 66, + /* 680 */ 67, 68, 69, 70, 71, 72, 73, 74, 1, 82, + /* 690 */ 111, 95, 106, 86, 95, 88, 89, 94, 91, 22, + /* 700 */ 95, 95, 92, 95, 108, 98, 99, 108, 96, 102, + /* 710 */ 103, 24, 105, 108, 108, 115, 108, 113, 1, 84, + /* 720 */ 108, 94, 35, 36, 37, 38, 39, 40, 41, 42, + /* 730 */ 43, 44, 45, 46, 47, 48, 95, 13, 120, 120, + /* 740 */ 120, 120, 120, 120, 120, 120, 120, 120, 120, 108, + /* 750 */ 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, + /* 760 */ 73, 74, 1, 82, 120, 120, 120, 86, 120, 88, + /* 770 */ 89, 120, 91, 120, 95, 95, 120, 16, 120, 98, + /* 780 */ 99, 120, 120, 102, 103, 120, 105, 108, 108, 120, + /* 790 */ 120, 120, 120, 120, 120, 120, 35, 36, 37, 38, + /* 800 */ 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, + /* 810 */ 1, 2, 120, 120, 120, 120, 120, 120, 120, 120, + /* 820 */ 120, 120, 120, 120, 63, 64, 65, 66, 67, 68, + /* 830 */ 69, 70, 71, 72, 73, 74, 120, 120, 120, 120, + /* 840 */ 120, 120, 120, 120, 35, 36, 37, 38, 39, 40, + /* 850 */ 41, 42, 43, 44, 45, 46, 47, 48, 1, 120, + /* 860 */ 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, + /* 870 */ 120, 120, 63, 64, 65, 66, 67, 68, 69, 70, + /* 880 */ 71, 72, 73, 74, 120, 120, 120, 120, 120, 120, + /* 890 */ 120, 120, 35, 36, 37, 38, 39, 40, 41, 42, + /* 900 */ 43, 44, 45, 46, 47, 48, 1, 120, 51, 120, + /* 910 */ 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, + /* 920 */ 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, + /* 930 */ 73, 74, 120, 120, 29, 120, 120, 120, 120, 120, + /* 940 */ 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + /* 950 */ 45, 46, 47, 48, 1, 120, 120, 120, 120, 120, + /* 960 */ 120, 120, 120, 120, 120, 120, 120, 120, 63, 64, + /* 970 */ 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + /* 980 */ 120, 120, 120, 120, 120, 120, 120, 120, 35, 36, + /* 990 */ 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, + /* 1000 */ 47, 48, 1, 120, 120, 120, 120, 120, 120, 120, + /* 1010 */ 120, 120, 120, 120, 120, 62, 63, 64, 65, 66, + /* 1020 */ 67, 68, 69, 70, 71, 72, 73, 74, 120, 120, + /* 1030 */ 120, 120, 120, 120, 120, 120, 35, 36, 37, 38, + /* 1040 */ 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, + /* 1050 */ 1, 120, 120, 120, 120, 120, 120, 120, 120, 120, + /* 1060 */ 120, 120, 120, 120, 63, 64, 65, 66, 67, 68, + /* 1070 */ 69, 70, 71, 72, 73, 74, 120, 76, 120, 120, + /* 1080 */ 120, 120, 120, 120, 35, 36, 37, 38, 39, 40, + /* 1090 */ 41, 42, 43, 44, 45, 46, 47, 48, 120, 120, + /* 1100 */ 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, + /* 1110 */ 120, 120, 63, 64, 65, 66, 67, 68, 69, 70, + /* 1120 */ 71, 72, 73, 74, 35, 36, 37, 38, 39, 40, + /* 1130 */ 41, 42, 43, 44, 45, 46, 47, 48, 120, 120, + /* 1140 */ 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, + /* 1150 */ 120, 120, 63, 64, 65, 66, 67, 68, 69, 70, + /* 1160 */ 71, 72, 73, 74, 120, 120, 120, 120, 15, 120, + /* 1170 */ 17, 18, 120, 82, 21, 120, 23, 86, 120, 88, + /* 1180 */ 120, 28, 91, 120, 31, 32, 33, 120, 120, 36, + /* 1190 */ 99, 16, 120, 102, 103, 120, 105, 22, 120, 120, + /* 1200 */ 120, 120, 120, 50, 29, 120, 53, 54, 55, 56, + /* 1210 */ 57, 120, 120, 60, 61, 62, 120, 120, 120, 15, + /* 1220 */ 120, 17, 18, 120, 49, 21, 120, 23, 75, 120, + /* 1230 */ 120, 120, 28, 120, 120, 31, 32, 33, 120, 120, + /* 1240 */ 36, 120, 120, 120, 120, 120, 82, 120, 120, 120, + /* 1250 */ 86, 120, 88, 89, 50, 91, 120, 53, 54, 55, + /* 1260 */ 56, 57, 98, 99, 60, 61, 102, 103, 120, 105, + /* 1270 */ 15, 120, 17, 18, 120, 120, 21, 120, 23, 75, + /* 1280 */ 116, 117, 120, 28, 120, 120, 31, 32, 33, 120, + /* 1290 */ 120, 36, 120, 120, 120, 120, 120, 82, 120, 120, + /* 1300 */ 120, 86, 120, 88, 89, 50, 91, 120, 53, 54, + /* 1310 */ 55, 56, 57, 98, 99, 60, 61, 102, 103, 120, + /* 1320 */ 105, 15, 120, 17, 18, 120, 120, 21, 120, 23, + /* 1330 */ 75, 120, 117, 120, 28, 120, 120, 31, 32, 33, + /* 1340 */ 120, 120, 36, 120, 120, 120, 120, 120, 82, 120, + /* 1350 */ 120, 120, 86, 120, 88, 89, 50, 91, 120, 53, + /* 1360 */ 54, 55, 56, 57, 98, 99, 60, 61, 102, 103, + /* 1370 */ 120, 105, 15, 120, 17, 18, 120, 120, 21, 120, + /* 1380 */ 23, 75, 120, 120, 120, 28, 120, 120, 31, 32, + /* 1390 */ 33, 120, 120, 36, 120, 120, 120, 120, 120, 82, + /* 1400 */ 120, 120, 120, 86, 120, 88, 89, 50, 91, 120, + /* 1410 */ 53, 54, 55, 56, 57, 98, 99, 60, 61, 102, + /* 1420 */ 103, 120, 105, 15, 120, 17, 18, 120, 120, 21, + /* 1430 */ 120, 23, 75, 120, 120, 120, 28, 120, 120, 31, + /* 1440 */ 32, 33, 120, 120, 36, 120, 120, 120, 120, 120, + /* 1450 */ 82, 120, 120, 120, 86, 120, 88, 89, 50, 91, + /* 1460 */ 120, 53, 54, 55, 56, 57, 98, 99, 60, 61, + /* 1470 */ 102, 103, 120, 105, 15, 120, 17, 18, 120, 120, + /* 1480 */ 21, 120, 23, 75, 120, 120, 120, 28, 120, 120, + /* 1490 */ 31, 32, 33, 120, 120, 36, 120, 120, 120, 120, + /* 1500 */ 120, 82, 120, 120, 120, 86, 120, 88, 89, 50, + /* 1510 */ 91, 120, 53, 54, 55, 56, 57, 98, 99, 60, + /* 1520 */ 61, 102, 103, 120, 105, 15, 120, 17, 18, 120, + /* 1530 */ 120, 21, 120, 23, 75, 120, 120, 120, 28, 120, + /* 1540 */ 120, 31, 32, 33, 120, 120, 36, 120, 120, 120, + /* 1550 */ 120, 120, 82, 120, 120, 120, 86, 120, 88, 89, + /* 1560 */ 50, 91, 120, 53, 54, 55, 56, 57, 98, 99, + /* 1570 */ 60, 61, 102, 103, 120, 105, 15, 120, 17, 18, + /* 1580 */ 120, 120, 21, 120, 23, 75, 120, 120, 120, 28, + /* 1590 */ 120, 120, 31, 32, 33, 120, 120, 36, 120, 120, + /* 1600 */ 120, 120, 120, 82, 120, 120, 120, 86, 120, 88, + /* 1610 */ 89, 50, 91, 120, 53, 54, 55, 56, 57, 98, + /* 1620 */ 99, 60, 61, 102, 103, 120, 105, 15, 120, 17, + /* 1630 */ 18, 120, 120, 21, 120, 23, 75, 120, 120, 120, + /* 1640 */ 28, 120, 120, 31, 32, 33, 120, 120, 36, 120, + /* 1650 */ 120, 120, 120, 120, 82, 120, 120, 120, 86, 120, + /* 1660 */ 88, 89, 50, 91, 120, 53, 54, 55, 56, 57, + /* 1670 */ 98, 99, 60, 61, 102, 103, 120, 105, 15, 120, + /* 1680 */ 17, 18, 120, 120, 21, 120, 23, 75, 120, 120, + /* 1690 */ 120, 28, 120, 120, 31, 32, 33, 120, 120, 36, + /* 1700 */ 120, 120, 120, 120, 120, 82, 120, 120, 120, 86, + /* 1710 */ 120, 88, 89, 50, 91, 120, 53, 54, 55, 56, + /* 1720 */ 57, 98, 99, 60, 120, 102, 103, 120, 105, 15, + /* 1730 */ 120, 17, 18, 120, 120, 21, 120, 23, 75, 120, + /* 1740 */ 120, 120, 28, 120, 120, 31, 32, 33, 16, 120, + /* 1750 */ 36, 120, 120, 120, 22, 120, 24, 120, 26, 27, + /* 1760 */ 120, 29, 87, 120, 50, 90, 34, 53, 54, 55, + /* 1770 */ 56, 57, 97, 120, 60, 100, 101, 120, 120, 120, + /* 1780 */ 120, 49, 50, 51, 120, 120, 120, 120, 113, 75, + /* 1790 */ 58, 120, 120, 87, 62, 82, 90, 120, 120, 86, + /* 1800 */ 120, 88, 89, 97, 91, 120, 100, 101, 76, 120, + /* 1810 */ 120, 98, 99, 120, 120, 102, 103, 120, 105, 113, + /* 1820 */ 82, 120, 120, 120, 86, 120, 88, 89, 120, 91, + /* 1830 */ 120, 120, 120, 120, 120, 120, 98, 99, 120, 120, + /* 1840 */ 102, 103, 82, 105, 120, 120, 86, 120, 88, 89, + /* 1850 */ 120, 91, 120, 120, 120, 120, 120, 120, 98, 99, + /* 1860 */ 120, 120, 102, 103, 82, 105, 120, 120, 86, 120, + /* 1870 */ 88, 89, 120, 91, 120, 120, 120, 120, 120, 120, + /* 1880 */ 98, 99, 82, 120, 102, 103, 86, 105, 88, 89, + /* 1890 */ 120, 91, 120, 120, 120, 120, 120, 120, 98, 99, + /* 1900 */ 120, 120, 102, 103, 120, 105, 120, 82, 120, 120, + /* 1910 */ 120, 86, 120, 88, 89, 120, 91, 120, 120, 120, + /* 1920 */ 120, 120, 120, 98, 99, 120, 120, 102, 103, 120, + /* 1930 */ 105, 120, 120, 120, 10, 120, 120, 120, 120, 15, + /* 1940 */ 120, 120, 82, 120, 120, 21, 86, 23, 88, 89, + /* 1950 */ 120, 91, 28, 120, 120, 31, 32, 120, 98, 99, + /* 1960 */ 120, 120, 102, 103, 82, 105, 120, 120, 86, 120, + /* 1970 */ 88, 89, 120, 91, 120, 120, 120, 120, 120, 120, + /* 1980 */ 98, 99, 120, 120, 102, 103, 82, 105, 120, 120, + /* 1990 */ 86, 120, 88, 89, 120, 91, 120, 120, 120, 75, + /* 2000 */ 76, 77, 98, 99, 120, 120, 102, 103, 120, 105, + /* 2010 */ 82, 120, 120, 120, 86, 120, 88, 89, 120, 91, + /* 2020 */ 120, 120, 120, 120, 120, 120, 98, 99, 82, 120, + /* 2030 */ 102, 103, 86, 105, 88, 89, 120, 91, 120, 120, + /* 2040 */ 120, 120, 120, 120, 98, 99, 82, 120, 102, 103, + /* 2050 */ 86, 105, 88, 89, 120, 91, 120, 120, 120, 120, + /* 2060 */ 120, 120, 98, 99, 82, 120, 102, 103, 86, 105, + /* 2070 */ 88, 89, 120, 91, 120, 120, 120, 120, 120, 120, + /* 2080 */ 98, 99, 82, 120, 102, 103, 86, 105, 88, 89, + /* 2090 */ 120, 91, 120, 120, 120, 120, 120, 120, 98, 99, + /* 2100 */ 82, 120, 102, 103, 86, 105, 88, 89, 120, 91, + /* 2110 */ 120, 120, 120, 120, 120, 120, 98, 99, 82, 120, + /* 2120 */ 102, 103, 86, 105, 88, 89, 120, 91, 120, 120, + /* 2130 */ 120, 10, 120, 120, 98, 99, 15, 120, 102, 103, + /* 2140 */ 120, 105, 21, 120, 23, 120, 120, 120, 120, 28, + /* 2150 */ 82, 120, 31, 32, 86, 120, 88, 89, 120, 91, + /* 2160 */ 120, 120, 120, 120, 120, 120, 98, 99, 82, 120, + /* 2170 */ 102, 103, 86, 105, 88, 89, 120, 91, 120, 120, + /* 2180 */ 120, 120, 120, 120, 98, 99, 82, 120, 102, 103, + /* 2190 */ 86, 105, 88, 89, 120, 91, 75, 76, 77, 120, + /* 2200 */ 120, 120, 98, 99, 82, 120, 102, 103, 86, 105, + /* 2210 */ 88, 89, 120, 91, 120, 120, 120, 120, 120, 120, + /* 2220 */ 98, 99, 82, 120, 102, 103, 86, 105, 88, 89, + /* 2230 */ 120, 91, 120, 120, 120, 120, 120, 120, 98, 99, + /* 2240 */ 82, 120, 102, 103, 86, 105, 88, 89, 120, 91, + /* 2250 */ 120, 120, 120, 120, 120, 120, 98, 99, 82, 120, + /* 2260 */ 102, 103, 86, 105, 88, 120, 120, 91, 82, 120, + /* 2270 */ 120, 120, 86, 120, 88, 99, 82, 91, 102, 103, + /* 2280 */ 86, 105, 88, 120, 120, 91, 82, 120, 102, 103, + /* 2290 */ 86, 105, 88, 120, 82, 91, 102, 103, 86, 105, + /* 2300 */ 88, 120, 120, 91, 82, 120, 102, 103, 86, 105, + /* 2310 */ 88, 120, 82, 91, 102, 103, 86, 105, 88, 1, + /* 2320 */ 120, 91, 82, 120, 102, 103, 86, 105, 88, 120, + /* 2330 */ 120, 91, 102, 103, 16, 105, 120, 120, 20, 120, + /* 2340 */ 22, 120, 102, 103, 87, 105, 87, 90, 120, 90, + /* 2350 */ 120, 120, 87, 120, 97, 90, 97, 100, 101, 100, + /* 2360 */ 101, 120, 97, 120, 120, 100, 101, 120, 50, 120, + /* 2370 */ 113, 120, 113, 120, 87, 120, 58, 90, 113, 120, + /* 2380 */ 120, 120, 120, 120, 97, 120, 120, 100, 101, 120, + /* 2390 */ 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, + /* 2400 */ 113, ); - const YY_SHIFT_USE_DFLT = -31; - const YY_SHIFT_MAX = 232; + const YY_SHIFT_USE_DFLT = -32; + const YY_SHIFT_MAX = 233; static public $yy_shift_ofst = array( - /* 0 */ 1, 1521, 1471, 1171, 1171, 1571, 1321, 1571, 1521, 1421, - /* 10 */ 1171, 1171, 1321, 1121, 1171, 1171, 1171, 1171, 1171, 1171, - /* 20 */ 1371, 1171, 1621, 1171, 1171, 1171, 1171, 1171, 1171, 1171, - /* 30 */ 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, - /* 40 */ 1271, 1271, 1221, 1721, 1671, 1721, 1721, 1721, 1721, 1721, - /* 50 */ 145, 72, -1, 724, 724, 797, 844, 651, 964, 1011, - /* 60 */ 458, 291, 218, 364, 604, 531, 411, 891, 1058, 1058, - /* 70 */ 1058, 1058, 1058, 1058, 1058, 1058, 1058, 1058, 1058, 1058, - /* 80 */ 1058, 1058, 1058, 1058, 1058, 1362, 177, 438, 1, 1190, - /* 90 */ 294, 359, 254, 438, 438, 418, 1240, 43, 64, 107, - /* 100 */ 148, -2, 0, 253, 186, 328, 328, 328, 358, 526, - /* 110 */ 304, 328, 328, 328, 328, 328, 328, 538, 304, 471, - /* 120 */ 471, 472, 657, 644, 657, 644, 658, 646, 661, 657, - /* 130 */ 290, 722, 252, 157, 180, 113, 185, 106, 450, 449, - /* 140 */ 285, 469, 494, 493, 448, 447, 399, 375, 285, 326, - /* 150 */ 285, 446, 285, 401, 402, 491, 445, 400, 285, 325, - /* 160 */ 196, 644, 679, 679, 646, 644, 680, 680, 661, 644, - /* 170 */ 691, -31, -31, -31, -31, 75, 217, -30, 101, 334, - /* 180 */ 111, 191, 118, 336, 302, 44, 199, 34, 351, 74, - /* 190 */ 141, 248, 336, 196, 267, 161, 353, 227, 327, 205, - /* 200 */ 640, 608, 599, 564, 548, 571, 589, 576, 575, 611, - /* 210 */ 606, 639, 596, 595, 612, 631, 587, 562, 517, 464, - /* 220 */ 499, 470, 379, 396, 413, 518, 497, 568, 378, 539, - /* 230 */ 567, 552, 545, + /* 0 */ 1, 1306, 1204, 1204, 1204, 1204, 1612, 1306, 1153, 1204, + /* 10 */ 1204, 1204, 1204, 1204, 1561, 1204, 1408, 1204, 1204, 1204, + /* 20 */ 1204, 1204, 1510, 1204, 1204, 1204, 1204, 1204, 1204, 1204, + /* 30 */ 1204, 1204, 1204, 1357, 1459, 1204, 1204, 1510, 1408, 1204, + /* 40 */ 1204, 1204, 1255, 1255, 1663, 1663, 1663, 1663, 1714, 1663, + /* 50 */ 1663, 221, 147, -1, 73, 295, 295, 295, 369, 491, + /* 60 */ 443, 613, 565, 905, 809, 857, 761, 953, 1001, 687, + /* 70 */ 1049, 1049, 1049, 1049, 1049, 1049, 1049, 1049, 1049, 1049, + /* 80 */ 1049, 1049, 1049, 1049, 1049, 1049, 1089, 1089, 2318, 59, + /* 90 */ 281, 1, 1924, 368, 294, 219, 335, 159, 380, 159, + /* 100 */ 281, 281, 281, 2121, 44, 143, 181, -2, 183, 145, + /* 110 */ 329, 261, 408, 482, 408, 576, 440, 408, 408, 438, + /* 120 */ 457, 408, 408, 408, 581, 507, 408, 408, 438, 507, + /* 130 */ 648, 648, 377, 647, 656, 217, 190, 157, 479, 483, + /* 140 */ 527, 480, 148, 525, 528, 405, 381, 39, 402, 455, + /* 150 */ 441, 451, 403, 107, 502, 148, 148, 148, 567, 148, + /* 160 */ 556, 564, 529, 575, 573, 304, 648, 670, 724, 544, + /* 170 */ 677, 677, 648, 717, 670, 648, 656, -32, -32, -32, + /* 180 */ -32, 1732, 72, 110, 1175, 116, -31, 307, 257, 48, + /* 190 */ 530, 41, 53, 220, 90, 223, 306, 200, 71, 220, + /* 200 */ 33, 623, 571, 305, 588, 591, 626, 640, 544, 598, + /* 210 */ 414, 628, 436, 568, 601, 526, 570, 535, 452, 404, + /* 220 */ 625, 592, 559, 572, 89, 28, 8, 237, 309, 179, + /* 230 */ 326, 290, 204, 225, ); - const YY_REDUCE_USE_DFLT = -80; - const YY_REDUCE_MAX = 174; + const YY_REDUCE_USE_DFLT = -81; + const YY_REDUCE_MAX = 180; static public $yy_reduce_ofst = array( - /* 0 */ 22, 1681, 66, 525, 718, 287, 645, 885, 1724, -7, - /* 10 */ 139, 452, 212, 1970, 1060, 2104, 2052, 2078, 2022, 2255, - /* 20 */ 2216, 2134, 1776, 1858, 1750, 1832, 1996, 1940, 1888, 1845, - /* 30 */ 1914, 1927, 1763, 2173, 2091, 2160, 1806, 2186, 2242, 2009, - /* 40 */ 2305, 2298, 2268, 723, 457, 144, 1206, 530, 1256, 1626, - /* 50 */ 1183, 281, 1315, 1183, 1383, -14, -14, -14, -14, -14, - /* 60 */ -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, - /* 70 */ -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, - /* 80 */ -14, -14, -14, -14, -14, 882, 63, 642, -79, -64, - /* 90 */ 1033, 169, 207, 1051, 1080, 225, 433, -54, 511, 335, - /* 100 */ 686, 686, 335, 459, -50, 523, 484, 528, 570, -50, - /* 110 */ 407, 474, 455, 649, 721, 810, 763, 455, 430, 648, - /* 120 */ 455, 455, 725, 277, 420, -50, 339, 109, 206, 151, - /* 130 */ 573, 573, 573, 588, 573, 573, 573, 577, 559, 559, - /* 140 */ 553, 559, 559, 559, 559, 559, 559, 559, 553, 559, - /* 150 */ 553, 559, 553, 559, 559, 559, 559, 559, 553, 559, - /* 160 */ 555, 593, 614, 590, 613, 593, 592, 592, 597, 593, - /* 170 */ 619, 594, 483, 88, 130, + /* 0 */ 22, 1164, 289, 68, 142, 216, -6, 1215, 2104, 1470, + /* 10 */ 1266, 607, 1904, 1738, 1368, 1782, 1760, 1713, 1800, 1825, + /* 20 */ 1882, 1860, 1623, 1572, 681, 485, 363, 1317, 1521, 1946, + /* 30 */ 1419, 1928, 2122, 2158, 2140, 1982, 2000, 2018, 2036, 1964, + /* 40 */ 2086, 2068, 2176, 1091, 2230, 2186, 2204, 2240, 2212, 2194, + /* 50 */ 2222, 1675, 2259, 2287, 1706, 2265, 1706, 2257, 137, 137, + /* 60 */ 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, + /* 70 */ 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, + /* 80 */ 137, 137, 137, 137, 137, 137, 137, 137, 184, 38, + /* 90 */ 139, -80, -65, 214, 285, 239, 359, 361, 260, 292, + /* 100 */ 407, 333, 406, 543, 391, 415, 612, 578, 415, 319, + /* 110 */ 578, 577, 605, 606, 599, 488, 319, 205, 445, 466, + /* 120 */ 596, 532, 47, 679, 599, 641, 680, 608, 511, 599, + /* 130 */ 459, 319, 287, -69, 86, 579, 562, 562, 569, 569, + /* 140 */ 569, 569, 560, 569, 569, 569, 569, 569, 569, 569, + /* 150 */ 569, 569, 569, 569, 569, 560, 560, 560, 557, 560, + /* 160 */ 569, 569, 569, 569, 569, 569, 561, 600, 635, 586, + /* 170 */ 627, 603, 561, 604, 600, 561, 610, 262, 140, 109, + /* 180 */ 101, ); static public $yyExpectedTokens = array( - /* 0 */ array(3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 15, 21, 23, 28, 31, ), - /* 1 */ array(15, 17, 18, 21, 23, 28, 31, 32, 35, 49, 52, 53, 54, 55, 56, 59, 60, 74, ), - /* 2 */ array(15, 17, 18, 21, 23, 28, 31, 32, 35, 49, 52, 53, 54, 55, 56, 59, 60, 74, ), - /* 3 */ array(15, 17, 18, 21, 23, 28, 31, 32, 35, 49, 52, 53, 54, 55, 56, 59, 60, 74, ), - /* 4 */ array(15, 17, 18, 21, 23, 28, 31, 32, 35, 49, 52, 53, 54, 55, 56, 59, 60, 74, ), - /* 5 */ array(15, 17, 18, 21, 23, 28, 31, 32, 35, 49, 52, 53, 54, 55, 56, 59, 60, 74, ), - /* 6 */ array(15, 17, 18, 21, 23, 28, 31, 32, 35, 49, 52, 53, 54, 55, 56, 59, 60, 74, ), - /* 7 */ array(15, 17, 18, 21, 23, 28, 31, 32, 35, 49, 52, 53, 54, 55, 56, 59, 60, 74, ), - /* 8 */ array(15, 17, 18, 21, 23, 28, 31, 32, 35, 49, 52, 53, 54, 55, 56, 59, 60, 74, ), - /* 9 */ array(15, 17, 18, 21, 23, 28, 31, 32, 35, 49, 52, 53, 54, 55, 56, 59, 60, 74, ), - /* 10 */ array(15, 17, 18, 21, 23, 28, 31, 32, 35, 49, 52, 53, 54, 55, 56, 59, 60, 74, ), - /* 11 */ array(15, 17, 18, 21, 23, 28, 31, 32, 35, 49, 52, 53, 54, 55, 56, 59, 60, 74, ), - /* 12 */ array(15, 17, 18, 21, 23, 28, 31, 32, 35, 49, 52, 53, 54, 55, 56, 59, 60, 74, ), - /* 13 */ array(15, 17, 18, 21, 23, 28, 31, 32, 35, 49, 52, 53, 54, 55, 56, 59, 60, 61, 74, ), - /* 14 */ array(15, 17, 18, 21, 23, 28, 31, 32, 35, 49, 52, 53, 54, 55, 56, 59, 60, 74, ), - /* 15 */ array(15, 17, 18, 21, 23, 28, 31, 32, 35, 49, 52, 53, 54, 55, 56, 59, 60, 74, ), - /* 16 */ array(15, 17, 18, 21, 23, 28, 31, 32, 35, 49, 52, 53, 54, 55, 56, 59, 60, 74, ), - /* 17 */ array(15, 17, 18, 21, 23, 28, 31, 32, 35, 49, 52, 53, 54, 55, 56, 59, 60, 74, ), - /* 18 */ array(15, 17, 18, 21, 23, 28, 31, 32, 35, 49, 52, 53, 54, 55, 56, 59, 60, 74, ), - /* 19 */ array(15, 17, 18, 21, 23, 28, 31, 32, 35, 49, 52, 53, 54, 55, 56, 59, 60, 74, ), - /* 20 */ array(15, 17, 18, 21, 23, 28, 31, 32, 35, 49, 52, 53, 54, 55, 56, 59, 60, 74, ), - /* 21 */ array(15, 17, 18, 21, 23, 28, 31, 32, 35, 49, 52, 53, 54, 55, 56, 59, 60, 74, ), - /* 22 */ array(15, 17, 18, 21, 23, 28, 31, 32, 35, 49, 52, 53, 54, 55, 56, 59, 60, 74, ), - /* 23 */ array(15, 17, 18, 21, 23, 28, 31, 32, 35, 49, 52, 53, 54, 55, 56, 59, 60, 74, ), - /* 24 */ array(15, 17, 18, 21, 23, 28, 31, 32, 35, 49, 52, 53, 54, 55, 56, 59, 60, 74, ), - /* 25 */ array(15, 17, 18, 21, 23, 28, 31, 32, 35, 49, 52, 53, 54, 55, 56, 59, 60, 74, ), - /* 26 */ array(15, 17, 18, 21, 23, 28, 31, 32, 35, 49, 52, 53, 54, 55, 56, 59, 60, 74, ), - /* 27 */ array(15, 17, 18, 21, 23, 28, 31, 32, 35, 49, 52, 53, 54, 55, 56, 59, 60, 74, ), - /* 28 */ array(15, 17, 18, 21, 23, 28, 31, 32, 35, 49, 52, 53, 54, 55, 56, 59, 60, 74, ), - /* 29 */ array(15, 17, 18, 21, 23, 28, 31, 32, 35, 49, 52, 53, 54, 55, 56, 59, 60, 74, ), - /* 30 */ array(15, 17, 18, 21, 23, 28, 31, 32, 35, 49, 52, 53, 54, 55, 56, 59, 60, 74, ), - /* 31 */ array(15, 17, 18, 21, 23, 28, 31, 32, 35, 49, 52, 53, 54, 55, 56, 59, 60, 74, ), - /* 32 */ array(15, 17, 18, 21, 23, 28, 31, 32, 35, 49, 52, 53, 54, 55, 56, 59, 60, 74, ), - /* 33 */ array(15, 17, 18, 21, 23, 28, 31, 32, 35, 49, 52, 53, 54, 55, 56, 59, 60, 74, ), - /* 34 */ array(15, 17, 18, 21, 23, 28, 31, 32, 35, 49, 52, 53, 54, 55, 56, 59, 60, 74, ), - /* 35 */ array(15, 17, 18, 21, 23, 28, 31, 32, 35, 49, 52, 53, 54, 55, 56, 59, 60, 74, ), - /* 36 */ array(15, 17, 18, 21, 23, 28, 31, 32, 35, 49, 52, 53, 54, 55, 56, 59, 60, 74, ), - /* 37 */ array(15, 17, 18, 21, 23, 28, 31, 32, 35, 49, 52, 53, 54, 55, 56, 59, 60, 74, ), - /* 38 */ array(15, 17, 18, 21, 23, 28, 31, 32, 35, 49, 52, 53, 54, 55, 56, 59, 60, 74, ), - /* 39 */ array(15, 17, 18, 21, 23, 28, 31, 32, 35, 49, 52, 53, 54, 55, 56, 59, 60, 74, ), - /* 40 */ array(15, 17, 18, 21, 23, 28, 31, 32, 35, 49, 52, 53, 54, 55, 56, 59, 60, 74, ), - /* 41 */ array(15, 17, 18, 21, 23, 28, 31, 32, 35, 49, 52, 53, 54, 55, 56, 59, 60, 74, ), - /* 42 */ array(15, 17, 18, 21, 23, 28, 31, 32, 35, 49, 52, 53, 54, 55, 56, 59, 60, 74, ), - /* 43 */ array(15, 17, 18, 21, 23, 28, 31, 32, 35, 49, 52, 53, 54, 55, 56, 59, 74, ), - /* 44 */ array(15, 17, 18, 21, 23, 28, 31, 32, 35, 49, 52, 53, 54, 55, 56, 59, 74, ), - /* 45 */ array(15, 17, 18, 21, 23, 28, 31, 32, 35, 49, 52, 53, 54, 55, 56, 59, 74, ), - /* 46 */ array(15, 17, 18, 21, 23, 28, 31, 32, 35, 49, 52, 53, 54, 55, 56, 59, 74, ), - /* 47 */ array(15, 17, 18, 21, 23, 28, 31, 32, 35, 49, 52, 53, 54, 55, 56, 59, 74, ), - /* 48 */ array(15, 17, 18, 21, 23, 28, 31, 32, 35, 49, 52, 53, 54, 55, 56, 59, 74, ), - /* 49 */ array(15, 17, 18, 21, 23, 28, 31, 32, 35, 49, 52, 53, 54, 55, 56, 59, 74, ), - /* 50 */ array(1, 16, 22, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, ), - /* 51 */ array(1, 16, 22, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, ), - /* 52 */ array(1, 22, 27, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, ), - /* 53 */ array(1, 22, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, ), - /* 54 */ array(1, 22, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, ), - /* 55 */ array(1, 16, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, ), - /* 56 */ array(1, 2, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, ), - /* 57 */ array(1, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, ), - /* 58 */ array(1, 16, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, ), - /* 59 */ array(1, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 75, ), - /* 60 */ array(1, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 50, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, ), - /* 61 */ array(1, 16, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, ), - /* 62 */ array(1, 16, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, ), - /* 63 */ array(1, 24, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, ), - /* 64 */ array(1, 16, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, ), - /* 65 */ array(1, 16, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, ), - /* 66 */ array(1, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, ), - /* 67 */ array(1, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 50, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, ), - /* 68 */ array(1, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, ), - /* 69 */ array(1, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, ), - /* 70 */ array(1, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, ), - /* 71 */ array(1, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, ), - /* 72 */ array(1, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, ), - /* 73 */ array(1, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, ), - /* 74 */ array(1, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, ), - /* 75 */ array(1, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, ), - /* 76 */ array(1, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, ), - /* 77 */ array(1, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, ), - /* 78 */ array(1, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, ), - /* 79 */ array(1, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, ), - /* 80 */ array(1, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, ), - /* 81 */ array(1, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, ), - /* 82 */ array(1, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, ), - /* 83 */ array(1, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, ), - /* 84 */ array(1, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, ), - /* 85 */ array(1, 16, 20, 22, 49, 57, ), - /* 86 */ array(1, 16, 20, 22, ), - /* 87 */ array(1, 22, ), - /* 88 */ array(3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 15, 21, 23, 28, 31, ), - /* 89 */ array(10, 15, 21, 23, 28, 31, 74, 75, 76, ), - /* 90 */ array(1, 16, 22, ), - /* 91 */ array(20, 55, 60, ), - /* 92 */ array(17, 18, 59, ), - /* 93 */ array(1, 22, ), - /* 94 */ array(1, 22, ), - /* 95 */ array(2, 22, ), - /* 96 */ array(10, 15, 21, 23, 28, 31, 74, 75, 76, ), - /* 97 */ array(4, 5, 6, 7, 8, 12, 13, 14, ), - /* 98 */ array(15, 18, 19, 25, ), - /* 99 */ array(15, 18, 19, 58, ), - /* 100 */ array(16, 22, 25, ), - /* 101 */ array(16, 22, 25, ), - /* 102 */ array(15, 18, 58, ), - /* 103 */ array(16, 22, 48, ), - /* 104 */ array(19, 20, 57, ), - /* 105 */ array(15, 18, ), - /* 106 */ array(15, 18, ), - /* 107 */ array(15, 18, ), - /* 108 */ array(15, 18, ), - /* 109 */ array(20, 57, ), - /* 110 */ array(17, 18, ), - /* 111 */ array(15, 18, ), + /* 0 */ array(3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 15, 21, 23, 28, 31, 32, ), + /* 1 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 36, 50, 53, 54, 55, 56, 57, 60, 61, 75, ), + /* 2 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 36, 50, 53, 54, 55, 56, 57, 60, 61, 75, ), + /* 3 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 36, 50, 53, 54, 55, 56, 57, 60, 61, 75, ), + /* 4 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 36, 50, 53, 54, 55, 56, 57, 60, 61, 75, ), + /* 5 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 36, 50, 53, 54, 55, 56, 57, 60, 61, 75, ), + /* 6 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 36, 50, 53, 54, 55, 56, 57, 60, 61, 75, ), + /* 7 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 36, 50, 53, 54, 55, 56, 57, 60, 61, 75, ), + /* 8 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 36, 50, 53, 54, 55, 56, 57, 60, 61, 62, 75, ), + /* 9 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 36, 50, 53, 54, 55, 56, 57, 60, 61, 75, ), + /* 10 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 36, 50, 53, 54, 55, 56, 57, 60, 61, 75, ), + /* 11 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 36, 50, 53, 54, 55, 56, 57, 60, 61, 75, ), + /* 12 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 36, 50, 53, 54, 55, 56, 57, 60, 61, 75, ), + /* 13 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 36, 50, 53, 54, 55, 56, 57, 60, 61, 75, ), + /* 14 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 36, 50, 53, 54, 55, 56, 57, 60, 61, 75, ), + /* 15 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 36, 50, 53, 54, 55, 56, 57, 60, 61, 75, ), + /* 16 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 36, 50, 53, 54, 55, 56, 57, 60, 61, 75, ), + /* 17 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 36, 50, 53, 54, 55, 56, 57, 60, 61, 75, ), + /* 18 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 36, 50, 53, 54, 55, 56, 57, 60, 61, 75, ), + /* 19 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 36, 50, 53, 54, 55, 56, 57, 60, 61, 75, ), + /* 20 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 36, 50, 53, 54, 55, 56, 57, 60, 61, 75, ), + /* 21 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 36, 50, 53, 54, 55, 56, 57, 60, 61, 75, ), + /* 22 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 36, 50, 53, 54, 55, 56, 57, 60, 61, 75, ), + /* 23 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 36, 50, 53, 54, 55, 56, 57, 60, 61, 75, ), + /* 24 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 36, 50, 53, 54, 55, 56, 57, 60, 61, 75, ), + /* 25 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 36, 50, 53, 54, 55, 56, 57, 60, 61, 75, ), + /* 26 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 36, 50, 53, 54, 55, 56, 57, 60, 61, 75, ), + /* 27 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 36, 50, 53, 54, 55, 56, 57, 60, 61, 75, ), + /* 28 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 36, 50, 53, 54, 55, 56, 57, 60, 61, 75, ), + /* 29 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 36, 50, 53, 54, 55, 56, 57, 60, 61, 75, ), + /* 30 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 36, 50, 53, 54, 55, 56, 57, 60, 61, 75, ), + /* 31 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 36, 50, 53, 54, 55, 56, 57, 60, 61, 75, ), + /* 32 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 36, 50, 53, 54, 55, 56, 57, 60, 61, 75, ), + /* 33 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 36, 50, 53, 54, 55, 56, 57, 60, 61, 75, ), + /* 34 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 36, 50, 53, 54, 55, 56, 57, 60, 61, 75, ), + /* 35 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 36, 50, 53, 54, 55, 56, 57, 60, 61, 75, ), + /* 36 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 36, 50, 53, 54, 55, 56, 57, 60, 61, 75, ), + /* 37 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 36, 50, 53, 54, 55, 56, 57, 60, 61, 75, ), + /* 38 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 36, 50, 53, 54, 55, 56, 57, 60, 61, 75, ), + /* 39 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 36, 50, 53, 54, 55, 56, 57, 60, 61, 75, ), + /* 40 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 36, 50, 53, 54, 55, 56, 57, 60, 61, 75, ), + /* 41 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 36, 50, 53, 54, 55, 56, 57, 60, 61, 75, ), + /* 42 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 36, 50, 53, 54, 55, 56, 57, 60, 61, 75, ), + /* 43 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 36, 50, 53, 54, 55, 56, 57, 60, 61, 75, ), + /* 44 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 36, 50, 53, 54, 55, 56, 57, 60, 75, ), + /* 45 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 36, 50, 53, 54, 55, 56, 57, 60, 75, ), + /* 46 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 36, 50, 53, 54, 55, 56, 57, 60, 75, ), + /* 47 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 36, 50, 53, 54, 55, 56, 57, 60, 75, ), + /* 48 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 36, 50, 53, 54, 55, 56, 57, 60, 75, ), + /* 49 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 36, 50, 53, 54, 55, 56, 57, 60, 75, ), + /* 50 */ array(15, 17, 18, 21, 23, 28, 31, 32, 33, 36, 50, 53, 54, 55, 56, 57, 60, 75, ), + /* 51 */ array(1, 22, 27, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ), + /* 52 */ array(1, 16, 22, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ), + /* 53 */ array(1, 16, 22, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ), + /* 54 */ array(1, 16, 22, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ), + /* 55 */ array(1, 22, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ), + /* 56 */ array(1, 22, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ), + /* 57 */ array(1, 22, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ), + /* 58 */ array(1, 16, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ), + /* 59 */ array(1, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 51, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ), + /* 60 */ array(1, 16, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ), + /* 61 */ array(1, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ), + /* 62 */ array(1, 16, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ), + /* 63 */ array(1, 29, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ), + /* 64 */ array(1, 2, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ), + /* 65 */ array(1, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 51, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ), + /* 66 */ array(1, 16, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ), + /* 67 */ array(1, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ), + /* 68 */ array(1, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 76, ), + /* 69 */ array(1, 24, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ), + /* 70 */ array(1, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ), + /* 71 */ array(1, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ), + /* 72 */ array(1, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ), + /* 73 */ array(1, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ), + /* 74 */ array(1, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ), + /* 75 */ array(1, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ), + /* 76 */ array(1, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ), + /* 77 */ array(1, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ), + /* 78 */ array(1, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ), + /* 79 */ array(1, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ), + /* 80 */ array(1, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ), + /* 81 */ array(1, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ), + /* 82 */ array(1, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ), + /* 83 */ array(1, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ), + /* 84 */ array(1, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ), + /* 85 */ array(1, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ), + /* 86 */ array(35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ), + /* 87 */ array(35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, ), + /* 88 */ array(1, 16, 20, 22, 50, 58, ), + /* 89 */ array(1, 16, 20, 22, ), + /* 90 */ array(1, 22, ), + /* 91 */ array(3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 15, 21, 23, 28, 31, 32, ), + /* 92 */ array(10, 15, 21, 23, 28, 31, 32, 75, 76, 77, ), + /* 93 */ array(15, 18, 22, 30, ), + /* 94 */ array(15, 18, 22, 30, ), + /* 95 */ array(20, 56, 61, ), + /* 96 */ array(17, 18, 60, ), + /* 97 */ array(15, 18, 22, ), + /* 98 */ array(1, 16, 22, ), + /* 99 */ array(15, 18, 22, ), + /* 100 */ array(1, 22, ), + /* 101 */ array(1, 22, ), + /* 102 */ array(1, 22, ), + /* 103 */ array(10, 15, 21, 23, 28, 31, 32, 75, 76, 77, ), + /* 104 */ array(4, 5, 6, 7, 8, 12, 13, 14, ), + /* 105 */ array(15, 18, 19, 59, ), + /* 106 */ array(15, 18, 19, 25, ), + /* 107 */ array(16, 22, 25, ), + /* 108 */ array(15, 18, 59, ), + /* 109 */ array(19, 20, 58, ), + /* 110 */ array(16, 22, 25, ), + /* 111 */ array(16, 22, 49, ), /* 112 */ array(15, 18, ), /* 113 */ array(15, 18, ), /* 114 */ array(15, 18, ), - /* 115 */ array(15, 18, ), - /* 116 */ array(15, 18, ), + /* 115 */ array(16, 22, ), + /* 116 */ array(20, 58, ), /* 117 */ array(15, 18, ), - /* 118 */ array(17, 18, ), - /* 119 */ array(15, 18, ), + /* 118 */ array(15, 18, ), + /* 119 */ array(17, 18, ), /* 120 */ array(15, 18, ), /* 121 */ array(15, 18, ), - /* 122 */ array(22, ), - /* 123 */ array(20, ), - /* 124 */ array(22, ), - /* 125 */ array(20, ), - /* 126 */ array(22, ), - /* 127 */ array(17, ), - /* 128 */ array(1, ), - /* 129 */ array(22, ), - /* 130 */ array(15, 16, 18, 30, ), - /* 131 */ array(15, 16, 18, 30, ), - /* 132 */ array(15, 16, 18, ), - /* 133 */ array(15, 17, 18, ), - /* 134 */ array(15, 18, 58, ), - /* 135 */ array(15, 16, 18, ), - /* 136 */ array(15, 18, 19, ), - /* 137 */ array(15, 49, ), + /* 122 */ array(15, 18, ), + /* 123 */ array(15, 18, ), + /* 124 */ array(15, 18, ), + /* 125 */ array(15, 18, ), + /* 126 */ array(15, 18, ), + /* 127 */ array(15, 18, ), + /* 128 */ array(17, 18, ), + /* 129 */ array(15, 18, ), + /* 130 */ array(20, ), + /* 131 */ array(20, ), + /* 132 */ array(22, ), + /* 133 */ array(22, ), + /* 134 */ array(17, ), + /* 135 */ array(15, 17, 18, ), + /* 136 */ array(15, 18, 59, ), + /* 137 */ array(15, 18, 19, ), /* 138 */ array(16, 22, ), /* 139 */ array(16, 22, ), - /* 140 */ array(55, 60, ), + /* 140 */ array(16, 22, ), /* 141 */ array(16, 22, ), - /* 142 */ array(16, 22, ), + /* 142 */ array(56, 61, ), /* 143 */ array(16, 22, ), /* 144 */ array(16, 22, ), /* 145 */ array(16, 22, ), /* 146 */ array(16, 22, ), /* 147 */ array(16, 22, ), - /* 148 */ array(55, 60, ), + /* 148 */ array(16, 22, ), /* 149 */ array(16, 22, ), - /* 150 */ array(55, 60, ), + /* 150 */ array(16, 22, ), /* 151 */ array(16, 22, ), - /* 152 */ array(55, 60, ), + /* 152 */ array(16, 22, ), /* 153 */ array(16, 22, ), /* 154 */ array(16, 22, ), - /* 155 */ array(16, 22, ), - /* 156 */ array(16, 22, ), - /* 157 */ array(16, 22, ), - /* 158 */ array(55, 60, ), - /* 159 */ array(16, 22, ), - /* 160 */ array(49, ), - /* 161 */ array(20, ), - /* 162 */ array(22, ), - /* 163 */ array(22, ), - /* 164 */ array(17, ), - /* 165 */ array(20, ), - /* 166 */ array(2, ), + /* 155 */ array(56, 61, ), + /* 156 */ array(56, 61, ), + /* 157 */ array(56, 61, ), + /* 158 */ array(15, 50, ), + /* 159 */ array(56, 61, ), + /* 160 */ array(16, 22, ), + /* 161 */ array(16, 22, ), + /* 162 */ array(16, 22, ), + /* 163 */ array(16, 22, ), + /* 164 */ array(16, 22, ), + /* 165 */ array(16, 22, ), + /* 166 */ array(20, ), /* 167 */ array(2, ), - /* 168 */ array(1, ), - /* 169 */ array(20, ), - /* 170 */ array(13, ), - /* 171 */ array(), - /* 172 */ array(), - /* 173 */ array(), - /* 174 */ array(), - /* 175 */ array(16, 22, 48, 49, 57, ), - /* 176 */ array(16, 22, 49, 57, ), - /* 177 */ array(49, 55, 57, 61, ), - /* 178 */ array(19, 29, 49, 57, ), - /* 179 */ array(15, 17, 18, 32, ), - /* 180 */ array(16, 22, 48, ), - /* 181 */ array(30, 49, 57, ), - /* 182 */ array(30, 48, ), - /* 183 */ array(49, 57, ), - /* 184 */ array(16, 48, ), - /* 185 */ array(33, 61, ), - /* 186 */ array(24, 33, ), - /* 187 */ array(18, 58, ), - /* 188 */ array(18, 32, ), - /* 189 */ array(2, 19, ), - /* 190 */ array(19, 55, ), - /* 191 */ array(25, 75, ), - /* 192 */ array(49, 57, ), - /* 193 */ array(49, ), - /* 194 */ array(29, ), - /* 195 */ array(16, ), - /* 196 */ array(18, ), - /* 197 */ array(50, ), - /* 198 */ array(17, ), - /* 199 */ array(17, ), - /* 200 */ array(19, ), - /* 201 */ array(16, ), - /* 202 */ array(26, ), + /* 168 */ array(13, ), + /* 169 */ array(50, ), + /* 170 */ array(22, ), + /* 171 */ array(22, ), + /* 172 */ array(20, ), + /* 173 */ array(1, ), + /* 174 */ array(2, ), + /* 175 */ array(20, ), + /* 176 */ array(17, ), + /* 177 */ array(), + /* 178 */ array(), + /* 179 */ array(), + /* 180 */ array(), + /* 181 */ array(16, 22, 24, 26, 27, 29, 34, 49, 50, 51, 58, 62, 76, ), + /* 182 */ array(16, 19, 22, 50, 58, ), + /* 183 */ array(16, 22, 50, 58, ), + /* 184 */ array(16, 22, 29, 49, ), + /* 185 */ array(15, 17, 18, 33, ), + /* 186 */ array(50, 56, 58, 62, ), + /* 187 */ array(16, 22, 49, ), + /* 188 */ array(16, 22, 49, ), + /* 189 */ array(30, 50, 58, ), + /* 190 */ array(16, 49, ), + /* 191 */ array(18, 59, ), + /* 192 */ array(24, 34, ), + /* 193 */ array(50, 58, ), + /* 194 */ array(34, 62, ), + /* 195 */ array(30, 49, ), + /* 196 */ array(2, 19, ), + /* 197 */ array(25, 76, ), + /* 198 */ array(19, 56, ), + /* 199 */ array(50, 58, ), + /* 200 */ array(51, ), + /* 201 */ array(22, ), + /* 202 */ array(49, ), /* 203 */ array(50, ), - /* 204 */ array(61, ), - /* 205 */ array(19, ), - /* 206 */ array(2, ), - /* 207 */ array(32, ), - /* 208 */ array(51, ), + /* 204 */ array(33, ), + /* 205 */ array(33, ), + /* 206 */ array(17, ), + /* 207 */ array(2, ), + /* 208 */ array(50, ), /* 209 */ array(18, ), - /* 210 */ array(50, ), + /* 210 */ array(17, ), /* 211 */ array(18, ), - /* 212 */ array(59, ), - /* 213 */ array(59, ), - /* 214 */ array(22, ), + /* 212 */ array(17, ), + /* 213 */ array(25, ), + /* 214 */ array(17, ), /* 215 */ array(22, ), - /* 216 */ array(2, ), - /* 217 */ array(25, ), + /* 216 */ array(56, ), + /* 217 */ array(17, ), /* 218 */ array(18, ), - /* 219 */ array(48, ), - /* 220 */ array(18, ), - /* 221 */ array(18, ), - /* 222 */ array(17, ), - /* 223 */ array(17, ), - /* 224 */ array(29, ), - /* 225 */ array(18, ), - /* 226 */ array(55, ), - /* 227 */ array(18, ), - /* 228 */ array(17, ), - /* 229 */ array(49, ), + /* 219 */ array(18, ), + /* 220 */ array(16, ), + /* 221 */ array(52, ), + /* 222 */ array(60, ), + /* 223 */ array(51, ), + /* 224 */ array(18, ), + /* 225 */ array(2, ), + /* 226 */ array(18, ), + /* 227 */ array(62, ), + /* 228 */ array(18, ), + /* 229 */ array(18, ), /* 230 */ array(18, ), - /* 231 */ array(32, ), - /* 232 */ array(16, ), - /* 233 */ array(), + /* 231 */ array(60, ), + /* 232 */ array(51, ), + /* 233 */ array(26, ), /* 234 */ array(), /* 235 */ array(), /* 236 */ array(), @@ -1130,52 +1132,53 @@ static public $yy_action = array( /* 371 */ array(), /* 372 */ array(), /* 373 */ array(), + /* 374 */ array(), ); static public $yy_default = array( - /* 0 */ 377, 551, 568, 522, 522, 568, 568, 568, 568, 568, - /* 10 */ 522, 522, 568, 568, 568, 568, 568, 568, 568, 568, - /* 20 */ 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, - /* 30 */ 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, - /* 40 */ 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, - /* 50 */ 568, 568, 435, 435, 435, 568, 568, 568, 568, 568, - /* 60 */ 568, 568, 568, 568, 568, 568, 521, 568, 444, 553, - /* 70 */ 452, 554, 455, 457, 464, 465, 437, 420, 461, 468, - /* 80 */ 456, 469, 441, 460, 552, 480, 568, 435, 374, 568, - /* 90 */ 451, 534, 568, 435, 435, 435, 568, 568, 568, 495, - /* 100 */ 470, 470, 495, 445, 488, 568, 568, 568, 568, 488, - /* 110 */ 568, 495, 568, 568, 568, 568, 568, 568, 568, 568, - /* 120 */ 568, 568, 435, 531, 435, 488, 435, 568, 528, 435, - /* 130 */ 568, 568, 568, 568, 496, 568, 568, 495, 568, 568, - /* 140 */ 513, 568, 568, 568, 568, 568, 568, 568, 515, 568, - /* 150 */ 514, 568, 493, 568, 568, 568, 568, 568, 512, 568, - /* 160 */ 495, 532, 567, 567, 568, 509, 524, 523, 451, 535, - /* 170 */ 392, 495, 528, 495, 528, 446, 480, 480, 440, 568, - /* 180 */ 445, 480, 445, 480, 445, 568, 568, 568, 568, 507, - /* 190 */ 476, 470, 466, 507, 568, 568, 568, 568, 568, 568, - /* 200 */ 568, 568, 442, 568, 568, 440, 507, 478, 482, 568, - /* 210 */ 568, 568, 568, 568, 568, 568, 507, 470, 568, 445, - /* 220 */ 568, 568, 568, 568, 568, 568, 476, 568, 568, 533, - /* 230 */ 568, 568, 568, 387, 454, 518, 449, 508, 529, 467, - /* 240 */ 530, 432, 516, 471, 517, 474, 483, 500, 501, 526, - /* 250 */ 434, 503, 492, 431, 525, 502, 453, 482, 491, 527, - /* 260 */ 504, 472, 481, 497, 380, 379, 423, 422, 475, 382, - /* 270 */ 381, 447, 418, 477, 376, 375, 439, 479, 485, 378, - /* 280 */ 473, 383, 494, 428, 489, 484, 427, 498, 505, 386, - /* 290 */ 385, 443, 384, 446, 566, 448, 421, 499, 520, 400, - /* 300 */ 541, 540, 542, 543, 544, 433, 401, 410, 539, 537, - /* 310 */ 412, 413, 399, 510, 538, 411, 545, 546, 406, 407, - /* 320 */ 408, 402, 562, 405, 404, 403, 419, 511, 487, 450, - /* 330 */ 547, 490, 417, 409, 424, 536, 398, 391, 550, 549, - /* 340 */ 548, 426, 458, 394, 393, 506, 507, 563, 519, 486, - /* 350 */ 389, 430, 429, 390, 395, 558, 415, 555, 556, 425, - /* 360 */ 462, 414, 463, 416, 557, 397, 561, 564, 565, 559, - /* 370 */ 459, 396, 560, 388, + /* 0 */ 378, 554, 525, 525, 525, 525, 571, 571, 571, 571, + /* 10 */ 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, + /* 20 */ 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, + /* 30 */ 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, + /* 40 */ 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, + /* 50 */ 571, 436, 571, 571, 571, 436, 436, 436, 571, 571, + /* 60 */ 571, 524, 571, 441, 571, 571, 571, 571, 571, 571, + /* 70 */ 464, 467, 458, 557, 556, 420, 463, 555, 446, 441, + /* 80 */ 468, 460, 455, 438, 443, 459, 471, 472, 483, 571, + /* 90 */ 436, 375, 571, 436, 436, 537, 571, 436, 454, 436, + /* 100 */ 436, 436, 436, 571, 571, 498, 571, 473, 498, 491, + /* 110 */ 473, 447, 571, 571, 571, 571, 491, 571, 571, 571, + /* 120 */ 571, 571, 498, 571, 571, 571, 571, 571, 571, 571, + /* 130 */ 534, 491, 436, 436, 571, 571, 499, 571, 571, 571, + /* 140 */ 571, 571, 516, 571, 571, 571, 571, 571, 571, 571, + /* 150 */ 571, 571, 571, 571, 571, 518, 496, 515, 498, 517, + /* 160 */ 571, 571, 571, 571, 571, 571, 512, 527, 393, 498, + /* 170 */ 570, 570, 535, 454, 526, 538, 571, 531, 498, 531, + /* 180 */ 498, 449, 483, 483, 447, 571, 483, 447, 447, 483, + /* 190 */ 447, 571, 571, 483, 571, 447, 510, 473, 479, 469, + /* 200 */ 571, 571, 447, 536, 481, 571, 571, 510, 510, 571, + /* 210 */ 571, 571, 571, 473, 571, 571, 479, 571, 571, 571, + /* 220 */ 571, 485, 571, 571, 571, 510, 571, 571, 571, 571, + /* 230 */ 571, 571, 571, 444, 495, 552, 421, 451, 551, 376, + /* 240 */ 422, 507, 569, 504, 553, 445, 506, 485, 423, 450, + /* 250 */ 533, 532, 522, 433, 511, 417, 418, 523, 427, 505, + /* 260 */ 520, 503, 470, 519, 521, 561, 428, 494, 550, 430, + /* 270 */ 429, 431, 432, 530, 510, 509, 419, 435, 424, 425, + /* 280 */ 426, 477, 474, 449, 448, 492, 497, 500, 488, 482, + /* 290 */ 475, 476, 478, 480, 416, 415, 386, 385, 387, 388, + /* 300 */ 389, 384, 383, 379, 377, 380, 381, 382, 390, 391, + /* 310 */ 400, 399, 401, 402, 434, 398, 397, 392, 394, 395, + /* 320 */ 396, 508, 501, 406, 566, 407, 408, 409, 405, 404, + /* 330 */ 493, 490, 514, 403, 565, 513, 410, 563, 560, 562, + /* 340 */ 564, 567, 559, 558, 411, 412, 414, 413, 453, 549, + /* 350 */ 486, 457, 487, 489, 461, 456, 529, 502, 452, 484, + /* 360 */ 528, 462, 465, 545, 544, 546, 547, 548, 543, 542, + /* 370 */ 466, 539, 540, 541, 568, ); - const YYNOCODE = 120; + const YYNOCODE = 121; const YYSTACKDEPTH = 100; - const YYNSTATE = 374; - const YYNRULE = 194; - const YYERRORSYMBOL = 77; + const YYNSTATE = 375; + const YYNRULE = 196; + const YYERRORSYMBOL = 78; const YYERRSYMDT = 'yy0'; const YYFALLBACK = 0; static public $yyFallback = array( @@ -1211,29 +1214,29 @@ static public $yy_action = array( 'RDEL', 'DOLLAR', 'ID', 'EQUAL', 'PTR', 'LDELIF', 'SPACE', 'LDELFOR', 'SEMICOLON', 'INCDEC', 'TO', 'STEP', - 'LDELFOREACH', 'AS', 'APTR', 'LDELSLASH', - 'INTEGER', 'COMMA', 'MATH', 'UNIMATH', - 'ANDSYM', 'ISIN', 'ISDIVBY', 'ISNOTDIVBY', - 'ISEVEN', 'ISNOTEVEN', 'ISEVENBY', 'ISNOTEVENBY', - 'ISODD', 'ISNOTODD', 'ISODDBY', 'ISNOTODDBY', - 'INSTANCEOF', 'OPENP', 'CLOSEP', 'QMARK', - 'NOT', 'TYPECAST', 'HEX', 'DOT', - 'SINGLEQUOTESTRING', 'DOUBLECOLON', 'AT', 'HATCH', - 'OPENB', 'CLOSEB', 'EQUALS', 'NOTEQUALS', - 'GREATERTHAN', 'LESSTHAN', 'GREATEREQUAL', 'LESSEQUAL', - 'IDENTITY', 'NONEIDENTITY', 'MOD', 'LAND', - 'LOR', 'LXOR', 'QUOTE', 'BACKTICK', - 'DOLLARID', 'error', 'start', 'template', - 'template_element', 'smartytag', 'literal', 'literal_elements', - 'literal_element', 'value', 'attributes', 'variable', - 'expr', 'modifierlist', 'ternary', 'varindexed', + 'LDELFOREACH', 'AS', 'APTR', 'SMARTYBLOCKCHILD', + 'LDELSLASH', 'INTEGER', 'COMMA', 'MATH', + 'UNIMATH', 'ANDSYM', 'ISIN', 'ISDIVBY', + 'ISNOTDIVBY', 'ISEVEN', 'ISNOTEVEN', 'ISEVENBY', + 'ISNOTEVENBY', 'ISODD', 'ISNOTODD', 'ISODDBY', + 'ISNOTODDBY', 'INSTANCEOF', 'OPENP', 'CLOSEP', + 'QMARK', 'NOT', 'TYPECAST', 'HEX', + 'DOT', 'SINGLEQUOTESTRING', 'DOUBLECOLON', 'AT', + 'HATCH', 'OPENB', 'CLOSEB', 'EQUALS', + 'NOTEQUALS', 'GREATERTHAN', 'LESSTHAN', 'GREATEREQUAL', + 'LESSEQUAL', 'IDENTITY', 'NONEIDENTITY', 'MOD', + 'LAND', 'LOR', 'LXOR', 'QUOTE', + 'BACKTICK', 'DOLLARID', 'error', 'start', + 'template', 'template_element', 'smartytag', 'literal', + 'literal_elements', 'literal_element', 'value', 'attributes', + 'variable', 'expr', 'modifierlist', 'varindexed', 'statement', 'statements', 'optspace', 'varvar', - 'foraction', 'array', 'modparameters', 'attribute', + 'foraction', 'attribute', 'ternary', 'array', 'ifcond', 'lop', 'function', 'doublequoted_with_quotes', 'static_class_access', 'object', 'arrayindex', 'indexdef', 'varvarele', 'objectchain', 'objectelement', 'method', - 'params', 'modifier', 'modparameter', 'arrayelements', - 'arrayelement', 'doublequoted', 'doublequotedcontent', + 'params', 'modifier', 'modparameters', 'modparameter', + 'arrayelements', 'arrayelement', 'doublequoted', 'doublequotedcontent', ); static public $yyRuleName = array( @@ -1268,33 +1271,33 @@ static public $yy_action = array( /* 28 */ "smartytag ::= LDEL variable attributes RDEL", /* 29 */ "smartytag ::= LDEL expr modifierlist attributes RDEL", /* 30 */ "smartytag ::= LDEL expr attributes RDEL", - /* 31 */ "smartytag ::= LDEL ternary attributes RDEL", - /* 32 */ "smartytag ::= LDEL DOLLAR ID EQUAL value RDEL", - /* 33 */ "smartytag ::= LDEL DOLLAR ID EQUAL expr RDEL", - /* 34 */ "smartytag ::= LDEL DOLLAR ID EQUAL expr attributes RDEL", - /* 35 */ "smartytag ::= LDEL DOLLAR ID EQUAL ternary attributes RDEL", - /* 36 */ "smartytag ::= LDEL varindexed EQUAL expr attributes RDEL", - /* 37 */ "smartytag ::= LDEL varindexed EQUAL ternary attributes RDEL", - /* 38 */ "smartytag ::= LDEL ID attributes RDEL", - /* 39 */ "smartytag ::= LDEL ID RDEL", - /* 40 */ "smartytag ::= LDEL ID PTR ID attributes RDEL", - /* 41 */ "smartytag ::= LDEL ID modifierlist attributes RDEL", - /* 42 */ "smartytag ::= LDEL ID PTR ID modifierlist attributes RDEL", - /* 43 */ "smartytag ::= LDELIF SPACE expr RDEL", - /* 44 */ "smartytag ::= LDELIF SPACE statement RDEL", - /* 45 */ "smartytag ::= LDELFOR SPACE statements SEMICOLON optspace expr SEMICOLON optspace DOLLAR varvar foraction RDEL", - /* 46 */ "foraction ::= EQUAL expr", - /* 47 */ "foraction ::= INCDEC", - /* 48 */ "smartytag ::= LDELFOR SPACE statement TO expr attributes RDEL", - /* 49 */ "smartytag ::= LDELFOR SPACE statement TO expr STEP expr RDEL", - /* 50 */ "smartytag ::= LDELFOREACH attributes RDEL", - /* 51 */ "smartytag ::= LDELFOREACH SPACE value AS DOLLAR varvar RDEL", - /* 52 */ "smartytag ::= LDELFOREACH SPACE value AS DOLLAR varvar APTR DOLLAR varvar RDEL", - /* 53 */ "smartytag ::= LDELFOREACH SPACE array AS DOLLAR varvar RDEL", - /* 54 */ "smartytag ::= LDELFOREACH SPACE array AS DOLLAR varvar APTR DOLLAR varvar RDEL", + /* 31 */ "smartytag ::= LDEL DOLLAR ID EQUAL value RDEL", + /* 32 */ "smartytag ::= LDEL DOLLAR ID EQUAL expr RDEL", + /* 33 */ "smartytag ::= LDEL DOLLAR ID EQUAL expr attributes RDEL", + /* 34 */ "smartytag ::= LDEL varindexed EQUAL expr attributes RDEL", + /* 35 */ "smartytag ::= LDEL ID attributes RDEL", + /* 36 */ "smartytag ::= LDEL ID RDEL", + /* 37 */ "smartytag ::= LDEL ID PTR ID attributes RDEL", + /* 38 */ "smartytag ::= LDEL ID modifierlist attributes RDEL", + /* 39 */ "smartytag ::= LDEL ID PTR ID modifierlist attributes RDEL", + /* 40 */ "smartytag ::= LDELIF SPACE expr RDEL", + /* 41 */ "smartytag ::= LDELIF SPACE expr attributes RDEL", + /* 42 */ "smartytag ::= LDELIF SPACE statement RDEL", + /* 43 */ "smartytag ::= LDELIF SPACE statement attributes RDEL", + /* 44 */ "smartytag ::= LDELFOR SPACE statements SEMICOLON optspace expr SEMICOLON optspace DOLLAR varvar foraction attributes RDEL", + /* 45 */ "foraction ::= EQUAL expr", + /* 46 */ "foraction ::= INCDEC", + /* 47 */ "smartytag ::= LDELFOR SPACE statement TO expr attributes RDEL", + /* 48 */ "smartytag ::= LDELFOR SPACE statement TO expr STEP expr attributes RDEL", + /* 49 */ "smartytag ::= LDELFOREACH attributes RDEL", + /* 50 */ "smartytag ::= LDELFOREACH SPACE value AS DOLLAR varvar attributes RDEL", + /* 51 */ "smartytag ::= LDELFOREACH SPACE value AS DOLLAR varvar APTR DOLLAR varvar attributes RDEL", + /* 52 */ "smartytag ::= LDELFOREACH SPACE expr AS DOLLAR varvar attributes RDEL", + /* 53 */ "smartytag ::= LDELFOREACH SPACE expr AS DOLLAR varvar APTR DOLLAR varvar attributes RDEL", + /* 54 */ "smartytag ::= SMARTYBLOCKCHILD", /* 55 */ "smartytag ::= LDELSLASH ID RDEL", /* 56 */ "smartytag ::= LDELSLASH ID attributes RDEL", - /* 57 */ "smartytag ::= LDELSLASH ID modifierlist modparameters attributes RDEL", + /* 57 */ "smartytag ::= LDELSLASH ID modifierlist attributes RDEL", /* 58 */ "smartytag ::= LDELSLASH ID PTR ID RDEL", /* 59 */ "attributes ::= attributes attribute", /* 60 */ "attributes ::= attribute", @@ -1302,135 +1305,137 @@ static public $yy_action = array( /* 62 */ "attribute ::= SPACE ID EQUAL ID", /* 63 */ "attribute ::= SPACE ID EQUAL expr", /* 64 */ "attribute ::= SPACE ID EQUAL value", - /* 65 */ "attribute ::= SPACE ID EQUAL ternary", - /* 66 */ "attribute ::= SPACE ID", - /* 67 */ "attribute ::= SPACE INTEGER EQUAL expr", - /* 68 */ "statements ::= statement", - /* 69 */ "statements ::= statements COMMA statement", - /* 70 */ "statement ::= DOLLAR varvar EQUAL expr", - /* 71 */ "expr ::= value", - /* 72 */ "expr ::= DOLLAR ID COLON ID", - /* 73 */ "expr ::= expr MATH value", - /* 74 */ "expr ::= expr UNIMATH value", - /* 75 */ "expr ::= expr ANDSYM value", - /* 76 */ "expr ::= array", - /* 77 */ "expr ::= expr modifierlist", - /* 78 */ "expr ::= expr ifcond expr", - /* 79 */ "expr ::= expr ISIN array", - /* 80 */ "expr ::= expr ISIN value", - /* 81 */ "expr ::= expr lop expr", - /* 82 */ "expr ::= expr ISDIVBY expr", - /* 83 */ "expr ::= expr ISNOTDIVBY expr", - /* 84 */ "expr ::= expr ISEVEN", - /* 85 */ "expr ::= expr ISNOTEVEN", - /* 86 */ "expr ::= expr ISEVENBY expr", - /* 87 */ "expr ::= expr ISNOTEVENBY expr", - /* 88 */ "expr ::= expr ISODD", - /* 89 */ "expr ::= expr ISNOTODD", - /* 90 */ "expr ::= expr ISODDBY expr", - /* 91 */ "expr ::= expr ISNOTODDBY expr", - /* 92 */ "expr ::= value INSTANCEOF ID", - /* 93 */ "expr ::= value INSTANCEOF value", - /* 94 */ "ternary ::= OPENP expr CLOSEP QMARK DOLLAR ID COLON expr", - /* 95 */ "ternary ::= OPENP expr CLOSEP QMARK expr COLON expr", - /* 96 */ "value ::= variable", - /* 97 */ "value ::= UNIMATH value", - /* 98 */ "value ::= NOT value", - /* 99 */ "value ::= TYPECAST value", - /* 100 */ "value ::= variable INCDEC", - /* 101 */ "value ::= HEX", - /* 102 */ "value ::= INTEGER", - /* 103 */ "value ::= INTEGER DOT INTEGER", - /* 104 */ "value ::= INTEGER DOT", - /* 105 */ "value ::= DOT INTEGER", - /* 106 */ "value ::= ID", - /* 107 */ "value ::= function", - /* 108 */ "value ::= OPENP expr CLOSEP", - /* 109 */ "value ::= SINGLEQUOTESTRING", - /* 110 */ "value ::= doublequoted_with_quotes", - /* 111 */ "value ::= ID DOUBLECOLON static_class_access", - /* 112 */ "value ::= varindexed DOUBLECOLON static_class_access", - /* 113 */ "value ::= smartytag", - /* 114 */ "variable ::= varindexed", - /* 115 */ "variable ::= DOLLAR varvar AT ID", - /* 116 */ "variable ::= object", - /* 117 */ "variable ::= HATCH ID HATCH", - /* 118 */ "variable ::= HATCH variable HATCH", - /* 119 */ "varindexed ::= DOLLAR varvar arrayindex", - /* 120 */ "arrayindex ::= arrayindex indexdef", - /* 121 */ "arrayindex ::=", - /* 122 */ "indexdef ::= DOT DOLLAR varvar", - /* 123 */ "indexdef ::= DOT DOLLAR varvar AT ID", - /* 124 */ "indexdef ::= DOT ID", - /* 125 */ "indexdef ::= DOT INTEGER", - /* 126 */ "indexdef ::= DOT LDEL expr RDEL", - /* 127 */ "indexdef ::= OPENB ID CLOSEB", - /* 128 */ "indexdef ::= OPENB ID DOT ID CLOSEB", - /* 129 */ "indexdef ::= OPENB expr CLOSEB", - /* 130 */ "indexdef ::= OPENB CLOSEB", - /* 131 */ "varvar ::= varvarele", - /* 132 */ "varvar ::= varvar varvarele", - /* 133 */ "varvarele ::= ID", - /* 134 */ "varvarele ::= LDEL expr RDEL", - /* 135 */ "object ::= varindexed objectchain", - /* 136 */ "objectchain ::= objectelement", - /* 137 */ "objectchain ::= objectchain objectelement", - /* 138 */ "objectelement ::= PTR ID arrayindex", - /* 139 */ "objectelement ::= PTR DOLLAR varvar arrayindex", - /* 140 */ "objectelement ::= PTR LDEL expr RDEL arrayindex", - /* 141 */ "objectelement ::= PTR ID LDEL expr RDEL arrayindex", - /* 142 */ "objectelement ::= PTR method", - /* 143 */ "function ::= ID OPENP params CLOSEP", - /* 144 */ "method ::= ID OPENP params CLOSEP", - /* 145 */ "method ::= DOLLAR ID OPENP params CLOSEP", - /* 146 */ "params ::= expr COMMA params", - /* 147 */ "params ::= expr", - /* 148 */ "params ::=", - /* 149 */ "modifierlist ::= modifierlist modifier modparameters", - /* 150 */ "modifierlist ::= modifier modparameters", - /* 151 */ "modifier ::= VERT AT ID", - /* 152 */ "modifier ::= VERT ID", - /* 153 */ "modparameters ::= modparameters modparameter", - /* 154 */ "modparameters ::=", - /* 155 */ "modparameter ::= COLON value", - /* 156 */ "modparameter ::= COLON array", - /* 157 */ "static_class_access ::= method", - /* 158 */ "static_class_access ::= method objectchain", - /* 159 */ "static_class_access ::= ID", - /* 160 */ "static_class_access ::= DOLLAR ID arrayindex", - /* 161 */ "static_class_access ::= DOLLAR ID arrayindex objectchain", - /* 162 */ "ifcond ::= EQUALS", - /* 163 */ "ifcond ::= NOTEQUALS", - /* 164 */ "ifcond ::= GREATERTHAN", - /* 165 */ "ifcond ::= LESSTHAN", - /* 166 */ "ifcond ::= GREATEREQUAL", - /* 167 */ "ifcond ::= LESSEQUAL", - /* 168 */ "ifcond ::= IDENTITY", - /* 169 */ "ifcond ::= NONEIDENTITY", - /* 170 */ "ifcond ::= MOD", - /* 171 */ "lop ::= LAND", - /* 172 */ "lop ::= LOR", - /* 173 */ "lop ::= LXOR", - /* 174 */ "array ::= OPENB arrayelements CLOSEB", - /* 175 */ "arrayelements ::= arrayelement", - /* 176 */ "arrayelements ::= arrayelements COMMA arrayelement", - /* 177 */ "arrayelements ::=", - /* 178 */ "arrayelement ::= value APTR expr", - /* 179 */ "arrayelement ::= ID APTR expr", - /* 180 */ "arrayelement ::= expr", - /* 181 */ "doublequoted_with_quotes ::= QUOTE QUOTE", - /* 182 */ "doublequoted_with_quotes ::= QUOTE doublequoted QUOTE", - /* 183 */ "doublequoted ::= doublequoted doublequotedcontent", - /* 184 */ "doublequoted ::= doublequotedcontent", - /* 185 */ "doublequotedcontent ::= BACKTICK variable BACKTICK", - /* 186 */ "doublequotedcontent ::= BACKTICK expr BACKTICK", - /* 187 */ "doublequotedcontent ::= DOLLARID", - /* 188 */ "doublequotedcontent ::= LDEL variable RDEL", - /* 189 */ "doublequotedcontent ::= LDEL expr RDEL", - /* 190 */ "doublequotedcontent ::= smartytag", - /* 191 */ "doublequotedcontent ::= OTHER", - /* 192 */ "optspace ::= SPACE", - /* 193 */ "optspace ::=", + /* 65 */ "attribute ::= SPACE ID", + /* 66 */ "attribute ::= SPACE expr", + /* 67 */ "attribute ::= SPACE value", + /* 68 */ "attribute ::= SPACE INTEGER EQUAL expr", + /* 69 */ "statements ::= statement", + /* 70 */ "statements ::= statements COMMA statement", + /* 71 */ "statement ::= DOLLAR varvar EQUAL expr", + /* 72 */ "expr ::= value", + /* 73 */ "expr ::= ternary", + /* 74 */ "expr ::= DOLLAR ID COLON ID", + /* 75 */ "expr ::= expr MATH value", + /* 76 */ "expr ::= expr UNIMATH value", + /* 77 */ "expr ::= expr ANDSYM value", + /* 78 */ "expr ::= array", + /* 79 */ "expr ::= expr modifierlist", + /* 80 */ "expr ::= expr ifcond expr", + /* 81 */ "expr ::= expr ISIN array", + /* 82 */ "expr ::= expr ISIN value", + /* 83 */ "expr ::= expr lop expr", + /* 84 */ "expr ::= expr ISDIVBY expr", + /* 85 */ "expr ::= expr ISNOTDIVBY expr", + /* 86 */ "expr ::= expr ISEVEN", + /* 87 */ "expr ::= expr ISNOTEVEN", + /* 88 */ "expr ::= expr ISEVENBY expr", + /* 89 */ "expr ::= expr ISNOTEVENBY expr", + /* 90 */ "expr ::= expr ISODD", + /* 91 */ "expr ::= expr ISNOTODD", + /* 92 */ "expr ::= expr ISODDBY expr", + /* 93 */ "expr ::= expr ISNOTODDBY expr", + /* 94 */ "expr ::= value INSTANCEOF ID", + /* 95 */ "expr ::= value INSTANCEOF value", + /* 96 */ "ternary ::= OPENP expr CLOSEP QMARK DOLLAR ID COLON expr", + /* 97 */ "ternary ::= OPENP expr CLOSEP QMARK expr COLON expr", + /* 98 */ "value ::= variable", + /* 99 */ "value ::= UNIMATH value", + /* 100 */ "value ::= NOT value", + /* 101 */ "value ::= TYPECAST value", + /* 102 */ "value ::= variable INCDEC", + /* 103 */ "value ::= HEX", + /* 104 */ "value ::= INTEGER", + /* 105 */ "value ::= INTEGER DOT INTEGER", + /* 106 */ "value ::= INTEGER DOT", + /* 107 */ "value ::= DOT INTEGER", + /* 108 */ "value ::= ID", + /* 109 */ "value ::= function", + /* 110 */ "value ::= OPENP expr CLOSEP", + /* 111 */ "value ::= SINGLEQUOTESTRING", + /* 112 */ "value ::= doublequoted_with_quotes", + /* 113 */ "value ::= ID DOUBLECOLON static_class_access", + /* 114 */ "value ::= varindexed DOUBLECOLON static_class_access", + /* 115 */ "value ::= smartytag", + /* 116 */ "variable ::= varindexed", + /* 117 */ "variable ::= DOLLAR varvar AT ID", + /* 118 */ "variable ::= object", + /* 119 */ "variable ::= HATCH ID HATCH", + /* 120 */ "variable ::= HATCH variable HATCH", + /* 121 */ "varindexed ::= DOLLAR varvar arrayindex", + /* 122 */ "arrayindex ::= arrayindex indexdef", + /* 123 */ "arrayindex ::=", + /* 124 */ "indexdef ::= DOT DOLLAR varvar", + /* 125 */ "indexdef ::= DOT DOLLAR varvar AT ID", + /* 126 */ "indexdef ::= DOT ID", + /* 127 */ "indexdef ::= DOT INTEGER", + /* 128 */ "indexdef ::= DOT LDEL expr RDEL", + /* 129 */ "indexdef ::= OPENB ID CLOSEB", + /* 130 */ "indexdef ::= OPENB ID DOT ID CLOSEB", + /* 131 */ "indexdef ::= OPENB expr CLOSEB", + /* 132 */ "indexdef ::= OPENB CLOSEB", + /* 133 */ "varvar ::= varvarele", + /* 134 */ "varvar ::= varvar varvarele", + /* 135 */ "varvarele ::= ID", + /* 136 */ "varvarele ::= LDEL expr RDEL", + /* 137 */ "object ::= varindexed objectchain", + /* 138 */ "objectchain ::= objectelement", + /* 139 */ "objectchain ::= objectchain objectelement", + /* 140 */ "objectelement ::= PTR ID arrayindex", + /* 141 */ "objectelement ::= PTR DOLLAR varvar arrayindex", + /* 142 */ "objectelement ::= PTR LDEL expr RDEL arrayindex", + /* 143 */ "objectelement ::= PTR ID LDEL expr RDEL arrayindex", + /* 144 */ "objectelement ::= PTR method", + /* 145 */ "function ::= ID OPENP params CLOSEP", + /* 146 */ "method ::= ID OPENP params CLOSEP", + /* 147 */ "method ::= DOLLAR ID OPENP params CLOSEP", + /* 148 */ "params ::= expr COMMA params", + /* 149 */ "params ::= expr", + /* 150 */ "params ::=", + /* 151 */ "modifierlist ::= modifierlist modifier modparameters", + /* 152 */ "modifierlist ::= modifier modparameters", + /* 153 */ "modifier ::= VERT AT ID", + /* 154 */ "modifier ::= VERT ID", + /* 155 */ "modparameters ::= modparameters modparameter", + /* 156 */ "modparameters ::=", + /* 157 */ "modparameter ::= COLON value", + /* 158 */ "modparameter ::= COLON array", + /* 159 */ "static_class_access ::= method", + /* 160 */ "static_class_access ::= method objectchain", + /* 161 */ "static_class_access ::= ID", + /* 162 */ "static_class_access ::= DOLLAR ID arrayindex", + /* 163 */ "static_class_access ::= DOLLAR ID arrayindex objectchain", + /* 164 */ "ifcond ::= EQUALS", + /* 165 */ "ifcond ::= NOTEQUALS", + /* 166 */ "ifcond ::= GREATERTHAN", + /* 167 */ "ifcond ::= LESSTHAN", + /* 168 */ "ifcond ::= GREATEREQUAL", + /* 169 */ "ifcond ::= LESSEQUAL", + /* 170 */ "ifcond ::= IDENTITY", + /* 171 */ "ifcond ::= NONEIDENTITY", + /* 172 */ "ifcond ::= MOD", + /* 173 */ "lop ::= LAND", + /* 174 */ "lop ::= LOR", + /* 175 */ "lop ::= LXOR", + /* 176 */ "array ::= OPENB arrayelements CLOSEB", + /* 177 */ "arrayelements ::= arrayelement", + /* 178 */ "arrayelements ::= arrayelements COMMA arrayelement", + /* 179 */ "arrayelements ::=", + /* 180 */ "arrayelement ::= value APTR expr", + /* 181 */ "arrayelement ::= ID APTR expr", + /* 182 */ "arrayelement ::= expr", + /* 183 */ "doublequoted_with_quotes ::= QUOTE QUOTE", + /* 184 */ "doublequoted_with_quotes ::= QUOTE doublequoted QUOTE", + /* 185 */ "doublequoted ::= doublequoted doublequotedcontent", + /* 186 */ "doublequoted ::= doublequotedcontent", + /* 187 */ "doublequotedcontent ::= BACKTICK variable BACKTICK", + /* 188 */ "doublequotedcontent ::= BACKTICK expr BACKTICK", + /* 189 */ "doublequotedcontent ::= DOLLARID", + /* 190 */ "doublequotedcontent ::= LDEL variable RDEL", + /* 191 */ "doublequotedcontent ::= LDEL expr RDEL", + /* 192 */ "doublequotedcontent ::= smartytag", + /* 193 */ "doublequotedcontent ::= OTHER", + /* 194 */ "optspace ::= SPACE", + /* 195 */ "optspace ::=", ); function tokenName($tokenType) @@ -1686,11 +1691,11 @@ static public $yy_action = array( while ($this->yyidx >= 0) { $this->yy_pop_parser_stack(); } -#line 82 "smarty_internal_templateparser.y" +#line 84 "smarty_internal_templateparser.y" $this->internalError = true; $this->compiler->trigger_template_error("Stack overflow in template parser"); -#line 1689 "smarty_internal_templateparser.php" +#line 1694 "smarty_internal_templateparser.php" return; } $yytos = new TP_yyStackEntry; @@ -1711,125 +1716,127 @@ static public $yy_action = array( } static public $yyRuleInfo = array( - array( 'lhs' => 78, 'rhs' => 1 ), array( 'lhs' => 79, 'rhs' => 1 ), - array( 'lhs' => 79, 'rhs' => 2 ), - array( 'lhs' => 79, 'rhs' => 0 ), array( 'lhs' => 80, 'rhs' => 1 ), - array( 'lhs' => 80, 'rhs' => 1 ), - array( 'lhs' => 80, 'rhs' => 1 ), - array( 'lhs' => 80, 'rhs' => 1 ), - array( 'lhs' => 80, 'rhs' => 1 ), - array( 'lhs' => 80, 'rhs' => 1 ), - array( 'lhs' => 80, 'rhs' => 1 ), - array( 'lhs' => 80, 'rhs' => 1 ), - array( 'lhs' => 80, 'rhs' => 1 ), - array( 'lhs' => 80, 'rhs' => 1 ), - array( 'lhs' => 80, 'rhs' => 1 ), - array( 'lhs' => 82, 'rhs' => 2 ), - array( 'lhs' => 82, 'rhs' => 3 ), + array( 'lhs' => 80, 'rhs' => 2 ), + array( 'lhs' => 80, 'rhs' => 0 ), + array( 'lhs' => 81, 'rhs' => 1 ), + array( 'lhs' => 81, 'rhs' => 1 ), + array( 'lhs' => 81, 'rhs' => 1 ), + array( 'lhs' => 81, 'rhs' => 1 ), + array( 'lhs' => 81, 'rhs' => 1 ), + array( 'lhs' => 81, 'rhs' => 1 ), + array( 'lhs' => 81, 'rhs' => 1 ), + array( 'lhs' => 81, 'rhs' => 1 ), + array( 'lhs' => 81, 'rhs' => 1 ), + array( 'lhs' => 81, 'rhs' => 1 ), + array( 'lhs' => 81, 'rhs' => 1 ), array( 'lhs' => 83, 'rhs' => 2 ), - array( 'lhs' => 83, 'rhs' => 0 ), - array( 'lhs' => 84, 'rhs' => 1 ), - array( 'lhs' => 84, 'rhs' => 1 ), - array( 'lhs' => 84, 'rhs' => 1 ), - array( 'lhs' => 84, 'rhs' => 1 ), - array( 'lhs' => 84, 'rhs' => 1 ), - array( 'lhs' => 84, 'rhs' => 1 ), - array( 'lhs' => 84, 'rhs' => 1 ), - array( 'lhs' => 81, 'rhs' => 3 ), - array( 'lhs' => 81, 'rhs' => 4 ), - array( 'lhs' => 81, 'rhs' => 4 ), - array( 'lhs' => 81, 'rhs' => 5 ), - array( 'lhs' => 81, 'rhs' => 4 ), - array( 'lhs' => 81, 'rhs' => 4 ), - array( 'lhs' => 81, 'rhs' => 6 ), - array( 'lhs' => 81, 'rhs' => 6 ), - array( 'lhs' => 81, 'rhs' => 7 ), - array( 'lhs' => 81, 'rhs' => 7 ), - array( 'lhs' => 81, 'rhs' => 6 ), - array( 'lhs' => 81, 'rhs' => 6 ), - array( 'lhs' => 81, 'rhs' => 4 ), - array( 'lhs' => 81, 'rhs' => 3 ), - array( 'lhs' => 81, 'rhs' => 6 ), - array( 'lhs' => 81, 'rhs' => 5 ), - array( 'lhs' => 81, 'rhs' => 7 ), - array( 'lhs' => 81, 'rhs' => 4 ), - array( 'lhs' => 81, 'rhs' => 4 ), - array( 'lhs' => 81, 'rhs' => 12 ), + array( 'lhs' => 83, 'rhs' => 3 ), + array( 'lhs' => 84, 'rhs' => 2 ), + array( 'lhs' => 84, 'rhs' => 0 ), + array( 'lhs' => 85, 'rhs' => 1 ), + array( 'lhs' => 85, 'rhs' => 1 ), + array( 'lhs' => 85, 'rhs' => 1 ), + array( 'lhs' => 85, 'rhs' => 1 ), + array( 'lhs' => 85, 'rhs' => 1 ), + array( 'lhs' => 85, 'rhs' => 1 ), + array( 'lhs' => 85, 'rhs' => 1 ), + array( 'lhs' => 82, 'rhs' => 3 ), + array( 'lhs' => 82, 'rhs' => 4 ), + array( 'lhs' => 82, 'rhs' => 4 ), + array( 'lhs' => 82, 'rhs' => 5 ), + array( 'lhs' => 82, 'rhs' => 4 ), + array( 'lhs' => 82, 'rhs' => 6 ), + array( 'lhs' => 82, 'rhs' => 6 ), + array( 'lhs' => 82, 'rhs' => 7 ), + array( 'lhs' => 82, 'rhs' => 6 ), + array( 'lhs' => 82, 'rhs' => 4 ), + array( 'lhs' => 82, 'rhs' => 3 ), + array( 'lhs' => 82, 'rhs' => 6 ), + array( 'lhs' => 82, 'rhs' => 5 ), + array( 'lhs' => 82, 'rhs' => 7 ), + array( 'lhs' => 82, 'rhs' => 4 ), + array( 'lhs' => 82, 'rhs' => 5 ), + array( 'lhs' => 82, 'rhs' => 4 ), + array( 'lhs' => 82, 'rhs' => 5 ), + array( 'lhs' => 82, 'rhs' => 13 ), array( 'lhs' => 96, 'rhs' => 2 ), array( 'lhs' => 96, 'rhs' => 1 ), - array( 'lhs' => 81, 'rhs' => 7 ), - array( 'lhs' => 81, 'rhs' => 8 ), - array( 'lhs' => 81, 'rhs' => 3 ), - array( 'lhs' => 81, 'rhs' => 7 ), - array( 'lhs' => 81, 'rhs' => 10 ), - array( 'lhs' => 81, 'rhs' => 7 ), - array( 'lhs' => 81, 'rhs' => 10 ), - array( 'lhs' => 81, 'rhs' => 3 ), - array( 'lhs' => 81, 'rhs' => 4 ), - array( 'lhs' => 81, 'rhs' => 6 ), - array( 'lhs' => 81, 'rhs' => 5 ), - array( 'lhs' => 86, 'rhs' => 2 ), - array( 'lhs' => 86, 'rhs' => 1 ), - array( 'lhs' => 86, 'rhs' => 0 ), - array( 'lhs' => 99, 'rhs' => 4 ), - array( 'lhs' => 99, 'rhs' => 4 ), - array( 'lhs' => 99, 'rhs' => 4 ), - array( 'lhs' => 99, 'rhs' => 4 ), - array( 'lhs' => 99, 'rhs' => 2 ), - array( 'lhs' => 99, 'rhs' => 4 ), + array( 'lhs' => 82, 'rhs' => 7 ), + array( 'lhs' => 82, 'rhs' => 9 ), + array( 'lhs' => 82, 'rhs' => 3 ), + array( 'lhs' => 82, 'rhs' => 8 ), + array( 'lhs' => 82, 'rhs' => 11 ), + array( 'lhs' => 82, 'rhs' => 8 ), + array( 'lhs' => 82, 'rhs' => 11 ), + array( 'lhs' => 82, 'rhs' => 1 ), + array( 'lhs' => 82, 'rhs' => 3 ), + array( 'lhs' => 82, 'rhs' => 4 ), + array( 'lhs' => 82, 'rhs' => 5 ), + array( 'lhs' => 82, 'rhs' => 5 ), + array( 'lhs' => 87, 'rhs' => 2 ), + array( 'lhs' => 87, 'rhs' => 1 ), + array( 'lhs' => 87, 'rhs' => 0 ), + array( 'lhs' => 97, 'rhs' => 4 ), + array( 'lhs' => 97, 'rhs' => 4 ), + array( 'lhs' => 97, 'rhs' => 4 ), + array( 'lhs' => 97, 'rhs' => 2 ), + array( 'lhs' => 97, 'rhs' => 2 ), + array( 'lhs' => 97, 'rhs' => 2 ), + array( 'lhs' => 97, 'rhs' => 4 ), array( 'lhs' => 93, 'rhs' => 1 ), array( 'lhs' => 93, 'rhs' => 3 ), array( 'lhs' => 92, 'rhs' => 4 ), + array( 'lhs' => 89, 'rhs' => 1 ), + array( 'lhs' => 89, 'rhs' => 1 ), + array( 'lhs' => 89, 'rhs' => 4 ), + array( 'lhs' => 89, 'rhs' => 3 ), + array( 'lhs' => 89, 'rhs' => 3 ), + array( 'lhs' => 89, 'rhs' => 3 ), + array( 'lhs' => 89, 'rhs' => 1 ), + array( 'lhs' => 89, 'rhs' => 2 ), + array( 'lhs' => 89, 'rhs' => 3 ), + array( 'lhs' => 89, 'rhs' => 3 ), + array( 'lhs' => 89, 'rhs' => 3 ), + array( 'lhs' => 89, 'rhs' => 3 ), + array( 'lhs' => 89, 'rhs' => 3 ), + array( 'lhs' => 89, 'rhs' => 3 ), + array( 'lhs' => 89, 'rhs' => 2 ), + array( 'lhs' => 89, 'rhs' => 2 ), + array( 'lhs' => 89, 'rhs' => 3 ), + array( 'lhs' => 89, 'rhs' => 3 ), + array( 'lhs' => 89, 'rhs' => 2 ), + array( 'lhs' => 89, 'rhs' => 2 ), + array( 'lhs' => 89, 'rhs' => 3 ), + array( 'lhs' => 89, 'rhs' => 3 ), + array( 'lhs' => 89, 'rhs' => 3 ), + array( 'lhs' => 89, 'rhs' => 3 ), + array( 'lhs' => 98, 'rhs' => 8 ), + array( 'lhs' => 98, 'rhs' => 7 ), + array( 'lhs' => 86, 'rhs' => 1 ), + array( 'lhs' => 86, 'rhs' => 2 ), + array( 'lhs' => 86, 'rhs' => 2 ), + array( 'lhs' => 86, 'rhs' => 2 ), + array( 'lhs' => 86, 'rhs' => 2 ), + array( 'lhs' => 86, 'rhs' => 1 ), + array( 'lhs' => 86, 'rhs' => 1 ), + array( 'lhs' => 86, 'rhs' => 3 ), + array( 'lhs' => 86, 'rhs' => 2 ), + array( 'lhs' => 86, 'rhs' => 2 ), + array( 'lhs' => 86, 'rhs' => 1 ), + array( 'lhs' => 86, 'rhs' => 1 ), + array( 'lhs' => 86, 'rhs' => 3 ), + array( 'lhs' => 86, 'rhs' => 1 ), + array( 'lhs' => 86, 'rhs' => 1 ), + array( 'lhs' => 86, 'rhs' => 3 ), + array( 'lhs' => 86, 'rhs' => 3 ), + array( 'lhs' => 86, 'rhs' => 1 ), array( 'lhs' => 88, 'rhs' => 1 ), array( 'lhs' => 88, 'rhs' => 4 ), - array( 'lhs' => 88, 'rhs' => 3 ), - array( 'lhs' => 88, 'rhs' => 3 ), - array( 'lhs' => 88, 'rhs' => 3 ), array( 'lhs' => 88, 'rhs' => 1 ), - array( 'lhs' => 88, 'rhs' => 2 ), array( 'lhs' => 88, 'rhs' => 3 ), array( 'lhs' => 88, 'rhs' => 3 ), - array( 'lhs' => 88, 'rhs' => 3 ), - array( 'lhs' => 88, 'rhs' => 3 ), - array( 'lhs' => 88, 'rhs' => 3 ), - array( 'lhs' => 88, 'rhs' => 3 ), - array( 'lhs' => 88, 'rhs' => 2 ), - array( 'lhs' => 88, 'rhs' => 2 ), - array( 'lhs' => 88, 'rhs' => 3 ), - array( 'lhs' => 88, 'rhs' => 3 ), - array( 'lhs' => 88, 'rhs' => 2 ), - array( 'lhs' => 88, 'rhs' => 2 ), - array( 'lhs' => 88, 'rhs' => 3 ), - array( 'lhs' => 88, 'rhs' => 3 ), - array( 'lhs' => 88, 'rhs' => 3 ), - array( 'lhs' => 88, 'rhs' => 3 ), - array( 'lhs' => 90, 'rhs' => 8 ), - array( 'lhs' => 90, 'rhs' => 7 ), - array( 'lhs' => 85, 'rhs' => 1 ), - array( 'lhs' => 85, 'rhs' => 2 ), - array( 'lhs' => 85, 'rhs' => 2 ), - array( 'lhs' => 85, 'rhs' => 2 ), - array( 'lhs' => 85, 'rhs' => 2 ), - array( 'lhs' => 85, 'rhs' => 1 ), - array( 'lhs' => 85, 'rhs' => 1 ), - array( 'lhs' => 85, 'rhs' => 3 ), - array( 'lhs' => 85, 'rhs' => 2 ), - array( 'lhs' => 85, 'rhs' => 2 ), - array( 'lhs' => 85, 'rhs' => 1 ), - array( 'lhs' => 85, 'rhs' => 1 ), - array( 'lhs' => 85, 'rhs' => 3 ), - array( 'lhs' => 85, 'rhs' => 1 ), - array( 'lhs' => 85, 'rhs' => 1 ), - array( 'lhs' => 85, 'rhs' => 3 ), - array( 'lhs' => 85, 'rhs' => 3 ), - array( 'lhs' => 85, 'rhs' => 1 ), - array( 'lhs' => 87, 'rhs' => 1 ), - array( 'lhs' => 87, 'rhs' => 4 ), - array( 'lhs' => 87, 'rhs' => 1 ), - array( 'lhs' => 87, 'rhs' => 3 ), - array( 'lhs' => 87, 'rhs' => 3 ), array( 'lhs' => 91, 'rhs' => 3 ), array( 'lhs' => 106, 'rhs' => 2 ), array( 'lhs' => 106, 'rhs' => 0 ), @@ -1860,14 +1867,14 @@ static public $yy_action = array( array( 'lhs' => 112, 'rhs' => 3 ), array( 'lhs' => 112, 'rhs' => 1 ), array( 'lhs' => 112, 'rhs' => 0 ), - array( 'lhs' => 89, 'rhs' => 3 ), - array( 'lhs' => 89, 'rhs' => 2 ), + array( 'lhs' => 90, 'rhs' => 3 ), + array( 'lhs' => 90, 'rhs' => 2 ), array( 'lhs' => 113, 'rhs' => 3 ), array( 'lhs' => 113, 'rhs' => 2 ), - array( 'lhs' => 98, 'rhs' => 2 ), - array( 'lhs' => 98, 'rhs' => 0 ), - array( 'lhs' => 114, 'rhs' => 2 ), array( 'lhs' => 114, 'rhs' => 2 ), + array( 'lhs' => 114, 'rhs' => 0 ), + array( 'lhs' => 115, 'rhs' => 2 ), + array( 'lhs' => 115, 'rhs' => 2 ), array( 'lhs' => 104, 'rhs' => 1 ), array( 'lhs' => 104, 'rhs' => 2 ), array( 'lhs' => 104, 'rhs' => 1 ), @@ -1885,24 +1892,24 @@ static public $yy_action = array( array( 'lhs' => 101, 'rhs' => 1 ), array( 'lhs' => 101, 'rhs' => 1 ), array( 'lhs' => 101, 'rhs' => 1 ), - array( 'lhs' => 97, 'rhs' => 3 ), - array( 'lhs' => 115, 'rhs' => 1 ), - array( 'lhs' => 115, 'rhs' => 3 ), - array( 'lhs' => 115, 'rhs' => 0 ), - array( 'lhs' => 116, 'rhs' => 3 ), - array( 'lhs' => 116, 'rhs' => 3 ), + array( 'lhs' => 99, 'rhs' => 3 ), array( 'lhs' => 116, 'rhs' => 1 ), + array( 'lhs' => 116, 'rhs' => 3 ), + array( 'lhs' => 116, 'rhs' => 0 ), + array( 'lhs' => 117, 'rhs' => 3 ), + array( 'lhs' => 117, 'rhs' => 3 ), + array( 'lhs' => 117, 'rhs' => 1 ), array( 'lhs' => 103, 'rhs' => 2 ), array( 'lhs' => 103, 'rhs' => 3 ), - array( 'lhs' => 117, 'rhs' => 2 ), - array( 'lhs' => 117, 'rhs' => 1 ), - array( 'lhs' => 118, 'rhs' => 3 ), - array( 'lhs' => 118, 'rhs' => 3 ), - array( 'lhs' => 118, 'rhs' => 1 ), - array( 'lhs' => 118, 'rhs' => 3 ), - array( 'lhs' => 118, 'rhs' => 3 ), - array( 'lhs' => 118, 'rhs' => 1 ), + array( 'lhs' => 118, 'rhs' => 2 ), array( 'lhs' => 118, 'rhs' => 1 ), + array( 'lhs' => 119, 'rhs' => 3 ), + array( 'lhs' => 119, 'rhs' => 3 ), + array( 'lhs' => 119, 'rhs' => 1 ), + array( 'lhs' => 119, 'rhs' => 3 ), + array( 'lhs' => 119, 'rhs' => 3 ), + array( 'lhs' => 119, 'rhs' => 1 ), + array( 'lhs' => 119, 'rhs' => 1 ), array( 'lhs' => 94, 'rhs' => 1 ), array( 'lhs' => 94, 'rhs' => 0 ), ); @@ -1926,22 +1933,23 @@ static public $yy_action = array( 18 => 15, 16 => 16, 17 => 17, - 97 => 17, 99 => 17, - 100 => 17, - 158 => 17, + 101 => 17, + 102 => 17, + 160 => 17, 19 => 19, 20 => 19, - 71 => 19, - 96 => 19, - 101 => 19, - 102 => 19, - 107 => 19, + 72 => 19, + 73 => 19, + 98 => 19, + 103 => 19, + 104 => 19, 109 => 19, - 110 => 19, - 116 => 19, - 157 => 19, - 175 => 19, + 111 => 19, + 112 => 19, + 118 => 19, + 159 => 19, + 177 => 19, 21 => 21, 22 => 21, 23 => 23, @@ -1951,28 +1959,29 @@ static public $yy_action = array( 27 => 27, 28 => 27, 30 => 27, - 31 => 27, 29 => 29, - 32 => 32, - 33 => 32, + 31 => 31, + 32 => 31, + 33 => 33, 34 => 34, - 35 => 34, + 35 => 35, 36 => 36, - 37 => 36, + 37 => 37, 38 => 38, 39 => 39, 40 => 40, + 42 => 40, 41 => 41, - 42 => 42, - 43 => 43, - 44 => 43, + 43 => 41, + 44 => 44, 45 => 45, 46 => 46, + 66 => 46, + 67 => 46, + 149 => 46, + 161 => 46, + 182 => 46, 47 => 47, - 60 => 47, - 147 => 47, - 159 => 47, - 180 => 47, 48 => 48, 49 => 49, 50 => 50, @@ -1985,56 +1994,54 @@ static public $yy_action = array( 57 => 57, 58 => 58, 59 => 59, + 60 => 60, + 69 => 60, + 153 => 60, 61 => 61, 62 => 62, 63 => 63, 64 => 63, - 65 => 63, - 66 => 66, - 67 => 67, + 65 => 65, 68 => 68, - 151 => 68, - 69 => 69, 70 => 70, - 72 => 72, - 73 => 73, - 74 => 73, - 75 => 73, - 76 => 76, - 131 => 76, - 192 => 76, - 77 => 77, + 71 => 71, + 74 => 74, + 75 => 75, + 76 => 75, + 77 => 75, 78 => 78, - 81 => 78, - 92 => 78, + 133 => 78, + 194 => 78, 79 => 79, 80 => 80, + 83 => 80, + 94 => 80, + 81 => 81, 82 => 82, - 83 => 83, 84 => 84, - 89 => 84, 85 => 85, - 88 => 85, 86 => 86, 91 => 86, 87 => 87, 90 => 87, - 93 => 93, - 94 => 94, + 88 => 88, + 93 => 88, + 89 => 89, + 92 => 89, 95 => 95, - 98 => 98, - 103 => 103, - 104 => 104, + 96 => 96, + 97 => 97, + 100 => 100, 105 => 105, 106 => 106, + 107 => 107, 108 => 108, - 111 => 111, - 112 => 112, + 110 => 110, 113 => 113, 114 => 114, 115 => 115, + 116 => 116, 117 => 117, - 118 => 118, 119 => 119, 120 => 120, 121 => 121, @@ -2043,12 +2050,12 @@ static public $yy_action = array( 124 => 124, 125 => 125, 126 => 126, - 129 => 126, 127 => 127, 128 => 128, + 131 => 128, + 129 => 129, 130 => 130, 132 => 132, - 133 => 133, 134 => 134, 135 => 135, 136 => 136, @@ -2062,16 +2069,16 @@ static public $yy_action = array( 144 => 144, 145 => 145, 146 => 146, + 147 => 147, 148 => 148, - 149 => 149, 150 => 150, + 151 => 151, 152 => 152, - 153 => 153, 154 => 154, 155 => 155, - 156 => 155, - 160 => 160, - 161 => 161, + 156 => 156, + 157 => 157, + 158 => 157, 162 => 162, 163 => 163, 164 => 164, @@ -2085,30 +2092,32 @@ static public $yy_action = array( 172 => 172, 173 => 173, 174 => 174, + 175 => 175, 176 => 176, - 177 => 177, 178 => 178, 179 => 179, + 180 => 180, 181 => 181, - 182 => 182, 183 => 183, 184 => 184, 185 => 185, - 186 => 185, - 188 => 185, + 186 => 186, 187 => 187, + 188 => 187, + 190 => 187, 189 => 189, - 190 => 190, 191 => 191, + 192 => 192, 193 => 193, + 195 => 195, ); -#line 93 "smarty_internal_templateparser.y" +#line 95 "smarty_internal_templateparser.y" function yy_r0(){ $this->_retvalue = $this->root_buffer->to_smarty_php(); } -#line 2103 "smarty_internal_templateparser.php" -#line 99 "smarty_internal_templateparser.y" +#line 2112 "smarty_internal_templateparser.php" +#line 101 "smarty_internal_templateparser.y" function yy_r1(){ $this->current_buffer->append_subtree($this->yystack[$this->yyidx + 0]->minor); } -#line 2106 "smarty_internal_templateparser.php" -#line 111 "smarty_internal_templateparser.y" +#line 2115 "smarty_internal_templateparser.php" +#line 113 "smarty_internal_templateparser.y" function yy_r4(){ if ($this->compiler->has_code) { $tmp =''; foreach ($this->compiler->prefix_code as $code) {$tmp.=$code;} $this->compiler->prefix_code=array(); @@ -2119,55 +2128,55 @@ static public $yy_action = array( $this->compiler->has_variable_string = false; $this->block_nesting_level = count($this->compiler->_tag_stack); } -#line 2118 "smarty_internal_templateparser.php" -#line 123 "smarty_internal_templateparser.y" +#line 2127 "smarty_internal_templateparser.php" +#line 125 "smarty_internal_templateparser.y" function yy_r5(){ $this->_retvalue = new _smarty_tag($this, ''); } -#line 2121 "smarty_internal_templateparser.php" -#line 126 "smarty_internal_templateparser.y" +#line 2130 "smarty_internal_templateparser.php" +#line 128 "smarty_internal_templateparser.y" function yy_r6(){ $this->_retvalue = new _smarty_text($this, $this->yystack[$this->yyidx + 0]->minor); } -#line 2124 "smarty_internal_templateparser.php" -#line 129 "smarty_internal_templateparser.y" +#line 2133 "smarty_internal_templateparser.php" +#line 131 "smarty_internal_templateparser.y" function yy_r7(){ - if ($this->sec_obj->php_handling == SMARTY_PHP_PASSTHRU) { + if ($this->php_handling == Smarty::PHP_PASSTHRU) { $this->_retvalue = new _smarty_text($this, self::escape_start_tag($this->yystack[$this->yyidx + 0]->minor)); - } elseif ($this->sec_obj->php_handling == SMARTY_PHP_QUOTE) { + } elseif ($this->php_handling == Smarty::PHP_QUOTE) { $this->_retvalue = new _smarty_text($this, htmlspecialchars($this->yystack[$this->yyidx + 0]->minor, ENT_QUOTES)); - }elseif ($this->sec_obj->php_handling == SMARTY_PHP_ALLOW) { + }elseif ($this->php_handling == Smarty::PHP_ALLOW) { $this->_retvalue = new _smarty_text($this, $this->compiler->processNocacheCode('sec_obj->php_handling == SMARTY_PHP_REMOVE) { + }elseif ($this->php_handling == Smarty::PHP_REMOVE) { $this->_retvalue = new _smarty_text($this, ''); } } -#line 2137 "smarty_internal_templateparser.php" -#line 141 "smarty_internal_templateparser.y" +#line 2146 "smarty_internal_templateparser.php" +#line 143 "smarty_internal_templateparser.y" function yy_r8(){if ($this->is_xml) { $this->compiler->tag_nocache = true; $this->is_xml = true; $this->_retvalue = new _smarty_text($this, $this->compiler->processNocacheCode("';?>", $this->compiler, true)); - }elseif ($this->sec_obj->php_handling == SMARTY_PHP_PASSTHRU) { + }elseif ($this->php_handling == Smarty::PHP_PASSTHRU) { $this->_retvalue = new _smarty_text($this, '?>'); - } elseif ($this->sec_obj->php_handling == SMARTY_PHP_QUOTE) { + } elseif ($this->php_handling == Smarty::PHP_QUOTE) { $this->_retvalue = new _smarty_text($this, htmlspecialchars('?>', ENT_QUOTES)); - }elseif ($this->sec_obj->php_handling == SMARTY_PHP_ALLOW) { + }elseif ($this->php_handling == Smarty::PHP_ALLOW) { $this->_retvalue = new _smarty_text($this, $this->compiler->processNocacheCode('?>', true)); - }elseif ($this->sec_obj->php_handling == SMARTY_PHP_REMOVE) { + }elseif ($this->php_handling == Smarty::PHP_REMOVE) { $this->_retvalue = new _smarty_text($this, ''); } } -#line 2153 "smarty_internal_templateparser.php" -#line 157 "smarty_internal_templateparser.y" +#line 2162 "smarty_internal_templateparser.php" +#line 159 "smarty_internal_templateparser.y" function yy_r9(){ - if ($this->sec_obj->php_handling == SMARTY_PHP_PASSTHRU) { + if ($this->php_handling == Smarty::PHP_PASSTHRU) { $this->_retvalue = new _smarty_text($this, '<%'); - } elseif ($this->sec_obj->php_handling == SMARTY_PHP_QUOTE) { + } elseif ($this->php_handling == Smarty::PHP_QUOTE) { $this->_retvalue = new _smarty_text($this, htmlspecialchars($this->yystack[$this->yyidx + 0]->minor, ENT_QUOTES)); - }elseif ($this->sec_obj->php_handling == SMARTY_PHP_ALLOW) { + }elseif ($this->php_handling == Smarty::PHP_ALLOW) { if ($this->asp_tags) { $this->_retvalue = new _smarty_text($this, $this->compiler->processNocacheCode('<%', true)); } else { $this->_retvalue = new _smarty_text($this, '<%'); } - }elseif ($this->sec_obj->php_handling == SMARTY_PHP_REMOVE) { + }elseif ($this->php_handling == Smarty::PHP_REMOVE) { if ($this->asp_tags) { $this->_retvalue = new _smarty_text($this, ''); } else { @@ -2175,20 +2184,20 @@ static public $yy_action = array( } } } -#line 2174 "smarty_internal_templateparser.php" -#line 178 "smarty_internal_templateparser.y" +#line 2183 "smarty_internal_templateparser.php" +#line 180 "smarty_internal_templateparser.y" function yy_r10(){ - if ($this->sec_obj->php_handling == SMARTY_PHP_PASSTHRU) { + if ($this->php_handling == Smarty::PHP_PASSTHRU) { $this->_retvalue = new _smarty_text($this, '%>'); - } elseif ($this->sec_obj->php_handling == SMARTY_PHP_QUOTE) { + } elseif ($this->php_handling == Smarty::PHP_QUOTE) { $this->_retvalue = new _smarty_text($this, htmlspecialchars('%>', ENT_QUOTES)); - }elseif ($this->sec_obj->php_handling == SMARTY_PHP_ALLOW) { + }elseif ($this->php_handling == Smarty::PHP_ALLOW) { if ($this->asp_tags) { $this->_retvalue = new _smarty_text($this, $this->compiler->processNocacheCode('%>', true)); } else { $this->_retvalue = new _smarty_text($this, '%>'); } - }elseif ($this->sec_obj->php_handling == SMARTY_PHP_REMOVE) { + }elseif ($this->php_handling == Smarty::PHP_REMOVE) { if ($this->asp_tags) { $this->_retvalue = new _smarty_text($this, ''); } else { @@ -2196,151 +2205,160 @@ static public $yy_action = array( } } } -#line 2195 "smarty_internal_templateparser.php" -#line 198 "smarty_internal_templateparser.y" +#line 2204 "smarty_internal_templateparser.php" +#line 200 "smarty_internal_templateparser.y" function yy_r11(){if ($this->lex->strip) { $this->_retvalue = new _smarty_text($this, preg_replace('![\$this->yystack[$this->yyidx + 0]->minor ]*[\r\n]+[\$this->yystack[$this->yyidx + 0]->minor ]*!', '', self::escape_start_tag($this->yystack[$this->yyidx + 0]->minor))); } else { $this->_retvalue = new _smarty_text($this, self::escape_start_tag($this->yystack[$this->yyidx + 0]->minor)); } } -#line 2203 "smarty_internal_templateparser.php" -#line 206 "smarty_internal_templateparser.y" +#line 2212 "smarty_internal_templateparser.php" +#line 208 "smarty_internal_templateparser.y" function yy_r12(){ $this->compiler->tag_nocache = true; $this->is_xml = true; $this->_retvalue = new _smarty_text($this, $this->compiler->processNocacheCode("", $this->compiler, true)); } -#line 2206 "smarty_internal_templateparser.php" -#line 209 "smarty_internal_templateparser.y" +#line 2215 "smarty_internal_templateparser.php" +#line 211 "smarty_internal_templateparser.y" function yy_r13(){if ($this->lex->strip) { $this->_retvalue = new _smarty_text($this, preg_replace('![\t ]*[\r\n]+[\t ]*!', '', $this->yystack[$this->yyidx + 0]->minor)); } else { $this->_retvalue = new _smarty_text($this, $this->yystack[$this->yyidx + 0]->minor); } } -#line 2214 "smarty_internal_templateparser.php" -#line 215 "smarty_internal_templateparser.y" +#line 2223 "smarty_internal_templateparser.php" +#line 217 "smarty_internal_templateparser.y" function yy_r14(){ $this->_retvalue = new _smarty_linebreak($this, $this->yystack[$this->yyidx + 0]->minor); } -#line 2219 "smarty_internal_templateparser.php" -#line 220 "smarty_internal_templateparser.y" - function yy_r15(){ $this->_retvalue = ''; } -#line 2222 "smarty_internal_templateparser.php" -#line 221 "smarty_internal_templateparser.y" - function yy_r16(){ $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor; } -#line 2225 "smarty_internal_templateparser.php" -#line 223 "smarty_internal_templateparser.y" - function yy_r17(){ $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor; } #line 2228 "smarty_internal_templateparser.php" -#line 226 "smarty_internal_templateparser.y" - function yy_r19(){ $this->_retvalue = $this->yystack[$this->yyidx + 0]->minor; } +#line 222 "smarty_internal_templateparser.y" + function yy_r15(){ $this->_retvalue = ''; } #line 2231 "smarty_internal_templateparser.php" -#line 228 "smarty_internal_templateparser.y" - function yy_r21(){ $this->_retvalue = self::escape_start_tag($this->yystack[$this->yyidx + 0]->minor); } +#line 223 "smarty_internal_templateparser.y" + function yy_r16(){ $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor; } #line 2234 "smarty_internal_templateparser.php" -#line 230 "smarty_internal_templateparser.y" - function yy_r23(){ $this->_retvalue = self::escape_end_tag($this->yystack[$this->yyidx + 0]->minor); } +#line 225 "smarty_internal_templateparser.y" + function yy_r17(){ $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor; } #line 2237 "smarty_internal_templateparser.php" -#line 231 "smarty_internal_templateparser.y" - function yy_r24(){ $this->_retvalue = '<%'; } +#line 228 "smarty_internal_templateparser.y" + function yy_r19(){ $this->_retvalue = $this->yystack[$this->yyidx + 0]->minor; } #line 2240 "smarty_internal_templateparser.php" -#line 232 "smarty_internal_templateparser.y" - function yy_r25(){ $this->_retvalue = '%>'; } +#line 230 "smarty_internal_templateparser.y" + function yy_r21(){ $this->_retvalue = self::escape_start_tag($this->yystack[$this->yyidx + 0]->minor); } #line 2243 "smarty_internal_templateparser.php" -#line 240 "smarty_internal_templateparser.y" - function yy_r26(){ $this->_retvalue = $this->compiler->compileTag('private_print_expression',array('value'=>$this->yystack[$this->yyidx + -1]->minor)); } +#line 232 "smarty_internal_templateparser.y" + function yy_r23(){ $this->_retvalue = self::escape_end_tag($this->yystack[$this->yyidx + 0]->minor); } #line 2246 "smarty_internal_templateparser.php" -#line 241 "smarty_internal_templateparser.y" - function yy_r27(){ $this->_retvalue = $this->compiler->compileTag('private_print_expression',array_merge(array('value'=>$this->yystack[$this->yyidx + -2]->minor),$this->yystack[$this->yyidx + -1]->minor)); } +#line 233 "smarty_internal_templateparser.y" + function yy_r24(){ $this->_retvalue = '<%'; } #line 2249 "smarty_internal_templateparser.php" -#line 243 "smarty_internal_templateparser.y" - function yy_r29(){ $this->_retvalue = $this->compiler->compileTag('private_print_expression',array_merge(array('value'=>$this->yystack[$this->yyidx + -3]->minor,'modifierlist'=>$this->yystack[$this->yyidx + -2]->minor),$this->yystack[$this->yyidx + -1]->minor)); } +#line 234 "smarty_internal_templateparser.y" + function yy_r25(){ $this->_retvalue = '%>'; } #line 2252 "smarty_internal_templateparser.php" -#line 253 "smarty_internal_templateparser.y" - function yy_r32(){ $this->_retvalue = $this->compiler->compileTag('assign',array('value'=>$this->yystack[$this->yyidx + -1]->minor,'var'=>"'".$this->yystack[$this->yyidx + -3]->minor."'")); } +#line 242 "smarty_internal_templateparser.y" + function yy_r26(){ $this->_retvalue = $this->compiler->compileTag('private_print_expression',array(),array('value'=>$this->yystack[$this->yyidx + -1]->minor)); } #line 2255 "smarty_internal_templateparser.php" -#line 255 "smarty_internal_templateparser.y" - function yy_r34(){ $this->_retvalue = $this->compiler->compileTag('assign',array_merge(array('value'=>$this->yystack[$this->yyidx + -2]->minor,'var'=>"'".$this->yystack[$this->yyidx + -4]->minor."'"),$this->yystack[$this->yyidx + -1]->minor)); } +#line 243 "smarty_internal_templateparser.y" + function yy_r27(){ $this->_retvalue = $this->compiler->compileTag('private_print_expression',$this->yystack[$this->yyidx + -1]->minor,array('value'=>$this->yystack[$this->yyidx + -2]->minor)); } #line 2258 "smarty_internal_templateparser.php" -#line 257 "smarty_internal_templateparser.y" - function yy_r36(){ $this->_retvalue = $this->compiler->compileTag('assign',array_merge(array('value'=>$this->yystack[$this->yyidx + -2]->minor),$this->yystack[$this->yyidx + -4]->minor,$this->yystack[$this->yyidx + -1]->minor)); } +#line 245 "smarty_internal_templateparser.y" + function yy_r29(){ $this->_retvalue = $this->compiler->compileTag('private_print_expression',$this->yystack[$this->yyidx + -1]->minor,array('value'=>$this->yystack[$this->yyidx + -3]->minor,'modifierlist'=>$this->yystack[$this->yyidx + -2]->minor)); } #line 2261 "smarty_internal_templateparser.php" -#line 260 "smarty_internal_templateparser.y" - function yy_r38(){ $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -2]->minor,$this->yystack[$this->yyidx + -1]->minor); } +#line 253 "smarty_internal_templateparser.y" + function yy_r31(){ $this->_retvalue = $this->compiler->compileTag('assign',array(array('value'=>$this->yystack[$this->yyidx + -1]->minor),array('var'=>"'".$this->yystack[$this->yyidx + -3]->minor."'"))); } #line 2264 "smarty_internal_templateparser.php" -#line 261 "smarty_internal_templateparser.y" - function yy_r39(){ $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -1]->minor,array()); } +#line 255 "smarty_internal_templateparser.y" + function yy_r33(){ $this->_retvalue = $this->compiler->compileTag('assign',array_merge(array(array('value'=>$this->yystack[$this->yyidx + -2]->minor),array('var'=>"'".$this->yystack[$this->yyidx + -4]->minor."'")),$this->yystack[$this->yyidx + -1]->minor)); } #line 2267 "smarty_internal_templateparser.php" -#line 263 "smarty_internal_templateparser.y" - function yy_r40(){ $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -4]->minor,array_merge(array('object_methode'=>$this->yystack[$this->yyidx + -2]->minor),$this->yystack[$this->yyidx + -1]->minor)); } +#line 256 "smarty_internal_templateparser.y" + function yy_r34(){ $this->_retvalue = $this->compiler->compileTag('assign',array_merge(array(array('value'=>$this->yystack[$this->yyidx + -2]->minor),array('var'=>$this->yystack[$this->yyidx + -4]->minor['var'])),$this->yystack[$this->yyidx + -1]->minor),array('smarty_internal_index'=>$this->yystack[$this->yyidx + -4]->minor['smarty_internal_index'])); } #line 2270 "smarty_internal_templateparser.php" -#line 265 "smarty_internal_templateparser.y" - function yy_r41(){ $this->_retvalue = ''.$this->compiler->compileTag($this->yystack[$this->yyidx + -3]->minor,$this->yystack[$this->yyidx + -1]->minor).'_retvalue .= $this->compiler->compileTag('private_modifier',array('modifierlist'=>$this->yystack[$this->yyidx + -2]->minor,'value'=>'ob_get_clean()')).'?>'; +#line 258 "smarty_internal_templateparser.y" + function yy_r35(){ $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -2]->minor,$this->yystack[$this->yyidx + -1]->minor); } +#line 2273 "smarty_internal_templateparser.php" +#line 259 "smarty_internal_templateparser.y" + function yy_r36(){ $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -1]->minor,array()); } +#line 2276 "smarty_internal_templateparser.php" +#line 261 "smarty_internal_templateparser.y" + function yy_r37(){ $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -4]->minor,$this->yystack[$this->yyidx + -1]->minor,array('object_methode'=>$this->yystack[$this->yyidx + -2]->minor)); } +#line 2279 "smarty_internal_templateparser.php" +#line 263 "smarty_internal_templateparser.y" + function yy_r38(){ $this->_retvalue = ''.$this->compiler->compileTag($this->yystack[$this->yyidx + -3]->minor,$this->yystack[$this->yyidx + -1]->minor).'_retvalue .= $this->compiler->compileTag('private_modifier',array(),array('modifierlist'=>$this->yystack[$this->yyidx + -2]->minor,'value'=>'ob_get_clean()')).'?>'; } -#line 2275 "smarty_internal_templateparser.php" -#line 269 "smarty_internal_templateparser.y" - function yy_r42(){ $this->_retvalue = ''.$this->compiler->compileTag($this->yystack[$this->yyidx + -5]->minor,array_merge(array('object_methode'=>$this->yystack[$this->yyidx + -3]->minor),$this->yystack[$this->yyidx + -1]->minor)).'_retvalue .= $this->compiler->compileTag('private_modifier',array('modifierlist'=>$this->yystack[$this->yyidx + -2]->minor,'value'=>'ob_get_clean()')).'?>'; +#line 2284 "smarty_internal_templateparser.php" +#line 267 "smarty_internal_templateparser.y" + function yy_r39(){ $this->_retvalue = ''.$this->compiler->compileTag($this->yystack[$this->yyidx + -5]->minor,$this->yystack[$this->yyidx + -1]->minor,array('object_methode'=>$this->yystack[$this->yyidx + -3]->minor)).'_retvalue .= $this->compiler->compileTag('private_modifier',array(),array('modifierlist'=>$this->yystack[$this->yyidx + -2]->minor,'value'=>'ob_get_clean()')).'?>'; } -#line 2280 "smarty_internal_templateparser.php" -#line 273 "smarty_internal_templateparser.y" - function yy_r43(){ $tag = trim(substr($this->yystack[$this->yyidx + -3]->minor,$this->lex->ldel_length)); $this->_retvalue = $this->compiler->compileTag(($tag == 'else if')? 'elseif' : $tag,array('if condition'=>$this->yystack[$this->yyidx + -1]->minor)); } -#line 2283 "smarty_internal_templateparser.php" +#line 2289 "smarty_internal_templateparser.php" +#line 271 "smarty_internal_templateparser.y" + function yy_r40(){ $tag = trim(substr($this->yystack[$this->yyidx + -3]->minor,$this->lex->ldel_length)); $this->_retvalue = $this->compiler->compileTag(($tag == 'else if')? 'elseif' : $tag,array(),array('if condition'=>$this->yystack[$this->yyidx + -1]->minor)); } +#line 2292 "smarty_internal_templateparser.php" +#line 272 "smarty_internal_templateparser.y" + function yy_r41(){ $tag = trim(substr($this->yystack[$this->yyidx + -4]->minor,$this->lex->ldel_length)); $this->_retvalue = $this->compiler->compileTag(($tag == 'else if')? 'elseif' : $tag,$this->yystack[$this->yyidx + -1]->minor,array('if condition'=>$this->yystack[$this->yyidx + -2]->minor)); } +#line 2295 "smarty_internal_templateparser.php" #line 276 "smarty_internal_templateparser.y" - function yy_r45(){ - $this->_retvalue = $this->compiler->compileTag('for',array('start'=>$this->yystack[$this->yyidx + -9]->minor,'ifexp'=>$this->yystack[$this->yyidx + -6]->minor,'varloop'=>$this->yystack[$this->yyidx + -2]->minor,'loop'=>$this->yystack[$this->yyidx + -1]->minor)); } -#line 2287 "smarty_internal_templateparser.php" -#line 279 "smarty_internal_templateparser.y" - function yy_r46(){ $this->_retvalue = '='.$this->yystack[$this->yyidx + 0]->minor; } -#line 2290 "smarty_internal_templateparser.php" -#line 280 "smarty_internal_templateparser.y" - function yy_r47(){ $this->_retvalue = $this->yystack[$this->yyidx + 0]->minor; } -#line 2293 "smarty_internal_templateparser.php" -#line 281 "smarty_internal_templateparser.y" - function yy_r48(){ $this->_retvalue = $this->compiler->compileTag('for',array_merge(array('start'=>$this->yystack[$this->yyidx + -4]->minor,'to'=>$this->yystack[$this->yyidx + -2]->minor),$this->yystack[$this->yyidx + -1]->minor)); } -#line 2296 "smarty_internal_templateparser.php" -#line 282 "smarty_internal_templateparser.y" - function yy_r49(){ $this->_retvalue = $this->compiler->compileTag('for',array('start'=>$this->yystack[$this->yyidx + -5]->minor,'to'=>$this->yystack[$this->yyidx + -3]->minor,'step'=>$this->yystack[$this->yyidx + -1]->minor)); } + function yy_r44(){ + $this->_retvalue = $this->compiler->compileTag('for',array_merge($this->yystack[$this->yyidx + -1]->minor,array(array('start'=>$this->yystack[$this->yyidx + -10]->minor),array('ifexp'=>$this->yystack[$this->yyidx + -7]->minor),array('var'=>$this->yystack[$this->yyidx + -3]->minor),array('step'=>$this->yystack[$this->yyidx + -2]->minor))),1); } #line 2299 "smarty_internal_templateparser.php" -#line 284 "smarty_internal_templateparser.y" - function yy_r50(){ $this->_retvalue = $this->compiler->compileTag('foreach',$this->yystack[$this->yyidx + -1]->minor); } +#line 279 "smarty_internal_templateparser.y" + function yy_r45(){ $this->_retvalue = '='.$this->yystack[$this->yyidx + 0]->minor; } #line 2302 "smarty_internal_templateparser.php" -#line 286 "smarty_internal_templateparser.y" - function yy_r51(){ - $this->_retvalue = $this->compiler->compileTag('foreach',array('from'=>$this->yystack[$this->yyidx + -4]->minor,'item'=>$this->yystack[$this->yyidx + -1]->minor)); } -#line 2306 "smarty_internal_templateparser.php" -#line 288 "smarty_internal_templateparser.y" - function yy_r52(){ - $this->_retvalue = $this->compiler->compileTag('foreach',array('from'=>$this->yystack[$this->yyidx + -7]->minor,'item'=>$this->yystack[$this->yyidx + -1]->minor,'key'=>$this->yystack[$this->yyidx + -4]->minor)); } -#line 2310 "smarty_internal_templateparser.php" -#line 290 "smarty_internal_templateparser.y" - function yy_r53(){ - $this->_retvalue = $this->compiler->compileTag('foreach',array('from'=>$this->yystack[$this->yyidx + -4]->minor,'item'=>$this->yystack[$this->yyidx + -1]->minor)); } +#line 280 "smarty_internal_templateparser.y" + function yy_r46(){ $this->_retvalue = $this->yystack[$this->yyidx + 0]->minor; } +#line 2305 "smarty_internal_templateparser.php" +#line 281 "smarty_internal_templateparser.y" + function yy_r47(){ $this->_retvalue = $this->compiler->compileTag('for',array_merge($this->yystack[$this->yyidx + -1]->minor,array(array('start'=>$this->yystack[$this->yyidx + -4]->minor),array('to'=>$this->yystack[$this->yyidx + -2]->minor))),0); } +#line 2308 "smarty_internal_templateparser.php" +#line 282 "smarty_internal_templateparser.y" + function yy_r48(){ $this->_retvalue = $this->compiler->compileTag('for',array_merge($this->yystack[$this->yyidx + -1]->minor,array(array('start'=>$this->yystack[$this->yyidx + -6]->minor),array('to'=>$this->yystack[$this->yyidx + -4]->minor),array('step'=>$this->yystack[$this->yyidx + -2]->minor))),0); } +#line 2311 "smarty_internal_templateparser.php" +#line 284 "smarty_internal_templateparser.y" + function yy_r49(){ $this->_retvalue = $this->compiler->compileTag('foreach',$this->yystack[$this->yyidx + -1]->minor); } #line 2314 "smarty_internal_templateparser.php" -#line 292 "smarty_internal_templateparser.y" - function yy_r54(){ - $this->_retvalue = $this->compiler->compileTag('foreach',array('from'=>$this->yystack[$this->yyidx + -7]->minor,'item'=>$this->yystack[$this->yyidx + -1]->minor,'key'=>$this->yystack[$this->yyidx + -4]->minor)); } +#line 286 "smarty_internal_templateparser.y" + function yy_r50(){ + $this->_retvalue = $this->compiler->compileTag('foreach',array_merge($this->yystack[$this->yyidx + -1]->minor,array(array('from'=>$this->yystack[$this->yyidx + -5]->minor),array('item'=>$this->yystack[$this->yyidx + -2]->minor)))); } #line 2318 "smarty_internal_templateparser.php" +#line 288 "smarty_internal_templateparser.y" + function yy_r51(){ + $this->_retvalue = $this->compiler->compileTag('foreach',array_merge($this->yystack[$this->yyidx + -1]->minor,array(array('from'=>$this->yystack[$this->yyidx + -8]->minor),array('item'=>$this->yystack[$this->yyidx + -2]->minor),array('key'=>$this->yystack[$this->yyidx + -5]->minor)))); } +#line 2322 "smarty_internal_templateparser.php" +#line 290 "smarty_internal_templateparser.y" + function yy_r52(){ + $this->_retvalue = $this->compiler->compileTag('foreach',array_merge($this->yystack[$this->yyidx + -1]->minor,array(array('from'=>$this->yystack[$this->yyidx + -5]->minor),array('item'=>$this->yystack[$this->yyidx + -2]->minor)))); } +#line 2326 "smarty_internal_templateparser.php" +#line 292 "smarty_internal_templateparser.y" + function yy_r53(){ + $this->_retvalue = $this->compiler->compileTag('foreach',array_merge($this->yystack[$this->yyidx + -1]->minor,array(array('from'=>$this->yystack[$this->yyidx + -8]->minor),array('item'=>$this->yystack[$this->yyidx + -2]->minor),array('key'=>$this->yystack[$this->yyidx + -5]->minor)))); } +#line 2330 "smarty_internal_templateparser.php" #line 296 "smarty_internal_templateparser.y" + function yy_r54(){ $this->_retvalue = SMARTY_INTERNAL_COMPILE_BLOCK::compileChildBlock($this->compiler); } +#line 2333 "smarty_internal_templateparser.php" +#line 300 "smarty_internal_templateparser.y" function yy_r55(){ $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -1]->minor.'close',array()); } -#line 2321 "smarty_internal_templateparser.php" -#line 297 "smarty_internal_templateparser.y" +#line 2336 "smarty_internal_templateparser.php" +#line 301 "smarty_internal_templateparser.y" function yy_r56(){ $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -2]->minor.'close',$this->yystack[$this->yyidx + -1]->minor); } -#line 2324 "smarty_internal_templateparser.php" -#line 298 "smarty_internal_templateparser.y" - function yy_r57(){ $this->_retvalue = ''.$this->compiler->compileTag($this->yystack[$this->yyidx + -4]->minor.'close',$this->yystack[$this->yyidx + -1]->minor).'_retvalue .= $this->compiler->compileTag('private_modifier',array('modifierlist'=>$this->yystack[$this->yyidx + -3]->minor,'params'=>'ob_get_clean()'.$this->yystack[$this->yyidx + -2]->minor)).'?>'; - } -#line 2329 "smarty_internal_templateparser.php" +#line 2339 "smarty_internal_templateparser.php" #line 302 "smarty_internal_templateparser.y" - function yy_r58(){ $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -3]->minor.'close',array('object_methode'=>$this->yystack[$this->yyidx + -1]->minor)); } -#line 2332 "smarty_internal_templateparser.php" -#line 308 "smarty_internal_templateparser.y" - function yy_r59(){ $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor; $this->_retvalue[key($this->yystack[$this->yyidx + 0]->minor)] = $this->yystack[$this->yyidx + 0]->minor[key($this->yystack[$this->yyidx + 0]->minor)]; } -#line 2335 "smarty_internal_templateparser.php" + function yy_r57(){ $this->_retvalue = ''.$this->compiler->compileTag($this->yystack[$this->yyidx + -3]->minor.'close',$this->yystack[$this->yyidx + -1]->minor).'_retvalue .= $this->compiler->compileTag('private_modifier',array(),array('modifierlist'=>$this->yystack[$this->yyidx + -2]->minor,'value'=>'ob_get_clean()')).'?>'; + } +#line 2344 "smarty_internal_templateparser.php" +#line 306 "smarty_internal_templateparser.y" + function yy_r58(){ $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -3]->minor.'close',array(),array('object_methode'=>$this->yystack[$this->yyidx + -1]->minor)); } +#line 2347 "smarty_internal_templateparser.php" #line 312 "smarty_internal_templateparser.y" + function yy_r59(){ $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor; $this->_retvalue[] = $this->yystack[$this->yyidx + 0]->minor; } +#line 2350 "smarty_internal_templateparser.php" +#line 314 "smarty_internal_templateparser.y" + function yy_r60(){ $this->_retvalue = array($this->yystack[$this->yyidx + 0]->minor); } +#line 2353 "smarty_internal_templateparser.php" +#line 316 "smarty_internal_templateparser.y" function yy_r61(){ $this->_retvalue = array(); } -#line 2338 "smarty_internal_templateparser.php" -#line 315 "smarty_internal_templateparser.y" +#line 2356 "smarty_internal_templateparser.php" +#line 319 "smarty_internal_templateparser.y" function yy_r62(){ if (preg_match('~^true$~i', $this->yystack[$this->yyidx + 0]->minor)) { $this->_retvalue = array($this->yystack[$this->yyidx + -2]->minor=>'true'); } elseif (preg_match('~^false$~i', $this->yystack[$this->yyidx + 0]->minor)) { @@ -2349,87 +2367,84 @@ static public $yy_action = array( $this->_retvalue = array($this->yystack[$this->yyidx + -2]->minor=>'null'); } else $this->_retvalue = array($this->yystack[$this->yyidx + -2]->minor=>"'".$this->yystack[$this->yyidx + 0]->minor."'"); } -#line 2348 "smarty_internal_templateparser.php" -#line 323 "smarty_internal_templateparser.y" - function yy_r63(){ $this->_retvalue = array($this->yystack[$this->yyidx + -2]->minor=>$this->yystack[$this->yyidx + 0]->minor); } -#line 2351 "smarty_internal_templateparser.php" -#line 326 "smarty_internal_templateparser.y" - function yy_r66(){ $this->_retvalue = array($this->yystack[$this->yyidx + 0]->minor=>'true'); } -#line 2354 "smarty_internal_templateparser.php" -#line 327 "smarty_internal_templateparser.y" - function yy_r67(){$this->_retvalue = array($this->yystack[$this->yyidx + -2]->minor=>$this->yystack[$this->yyidx + 0]->minor); } -#line 2357 "smarty_internal_templateparser.php" -#line 333 "smarty_internal_templateparser.y" - function yy_r68(){ $this->_retvalue = array($this->yystack[$this->yyidx + 0]->minor); } -#line 2360 "smarty_internal_templateparser.php" -#line 334 "smarty_internal_templateparser.y" - function yy_r69(){ $this->yystack[$this->yyidx + -2]->minor[]=$this->yystack[$this->yyidx + 0]->minor; $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor; } -#line 2363 "smarty_internal_templateparser.php" -#line 336 "smarty_internal_templateparser.y" - function yy_r70(){ $this->_retvalue = array('var' => $this->yystack[$this->yyidx + -2]->minor, 'value'=>$this->yystack[$this->yyidx + 0]->minor); } #line 2366 "smarty_internal_templateparser.php" -#line 345 "smarty_internal_templateparser.y" - function yy_r72(){$this->_retvalue = '$_smarty_tpl->getStreamVariable(\''. $this->yystack[$this->yyidx + -2]->minor .'://'. $this->yystack[$this->yyidx + 0]->minor . '\')'; } +#line 327 "smarty_internal_templateparser.y" + function yy_r63(){ $this->_retvalue = array($this->yystack[$this->yyidx + -2]->minor=>$this->yystack[$this->yyidx + 0]->minor); } #line 2369 "smarty_internal_templateparser.php" -#line 347 "smarty_internal_templateparser.y" - function yy_r73(){ $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor . trim($this->yystack[$this->yyidx + -1]->minor) . $this->yystack[$this->yyidx + 0]->minor; } +#line 329 "smarty_internal_templateparser.y" + function yy_r65(){ $this->_retvalue = "'".$this->yystack[$this->yyidx + 0]->minor."'"; } #line 2372 "smarty_internal_templateparser.php" -#line 353 "smarty_internal_templateparser.y" - function yy_r76(){$this->_retvalue = $this->yystack[$this->yyidx + 0]->minor; } +#line 332 "smarty_internal_templateparser.y" + function yy_r68(){$this->_retvalue = array($this->yystack[$this->yyidx + -2]->minor=>$this->yystack[$this->yyidx + 0]->minor); } #line 2375 "smarty_internal_templateparser.php" -#line 356 "smarty_internal_templateparser.y" - function yy_r77(){ $this->_retvalue = $this->compiler->compileTag('private_modifier',array('value'=>$this->yystack[$this->yyidx + -1]->minor,'modifierlist'=>$this->yystack[$this->yyidx + 0]->minor)); } +#line 339 "smarty_internal_templateparser.y" + function yy_r70(){ $this->yystack[$this->yyidx + -2]->minor[]=$this->yystack[$this->yyidx + 0]->minor; $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor; } #line 2378 "smarty_internal_templateparser.php" -#line 360 "smarty_internal_templateparser.y" - function yy_r78(){$this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.$this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor; } +#line 341 "smarty_internal_templateparser.y" + function yy_r71(){ $this->_retvalue = array('var' => $this->yystack[$this->yyidx + -2]->minor, 'value'=>$this->yystack[$this->yyidx + 0]->minor); } #line 2381 "smarty_internal_templateparser.php" -#line 361 "smarty_internal_templateparser.y" - function yy_r79(){$this->_retvalue = 'in_array('.$this->yystack[$this->yyidx + -2]->minor.','.$this->yystack[$this->yyidx + 0]->minor.')'; } +#line 352 "smarty_internal_templateparser.y" + function yy_r74(){$this->_retvalue = '$_smarty_tpl->getStreamVariable(\''. $this->yystack[$this->yyidx + -2]->minor .'://'. $this->yystack[$this->yyidx + 0]->minor . '\')'; } #line 2384 "smarty_internal_templateparser.php" -#line 362 "smarty_internal_templateparser.y" - function yy_r80(){$this->_retvalue = 'in_array('.$this->yystack[$this->yyidx + -2]->minor.',(array)'.$this->yystack[$this->yyidx + 0]->minor.')'; } +#line 354 "smarty_internal_templateparser.y" + function yy_r75(){ $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor . trim($this->yystack[$this->yyidx + -1]->minor) . $this->yystack[$this->yyidx + 0]->minor; } #line 2387 "smarty_internal_templateparser.php" -#line 364 "smarty_internal_templateparser.y" - function yy_r82(){$this->_retvalue = '!('.$this->yystack[$this->yyidx + -2]->minor.' % '.$this->yystack[$this->yyidx + 0]->minor.')'; } +#line 360 "smarty_internal_templateparser.y" + function yy_r78(){$this->_retvalue = $this->yystack[$this->yyidx + 0]->minor; } #line 2390 "smarty_internal_templateparser.php" -#line 365 "smarty_internal_templateparser.y" - function yy_r83(){$this->_retvalue = '('.$this->yystack[$this->yyidx + -2]->minor.' % '.$this->yystack[$this->yyidx + 0]->minor.')'; } +#line 363 "smarty_internal_templateparser.y" + function yy_r79(){ $this->_retvalue = $this->compiler->compileTag('private_modifier',array(),array('value'=>$this->yystack[$this->yyidx + -1]->minor,'modifierlist'=>$this->yystack[$this->yyidx + 0]->minor)); } #line 2393 "smarty_internal_templateparser.php" -#line 366 "smarty_internal_templateparser.y" - function yy_r84(){$this->_retvalue = '!(1 & '.$this->yystack[$this->yyidx + -1]->minor.')'; } -#line 2396 "smarty_internal_templateparser.php" #line 367 "smarty_internal_templateparser.y" - function yy_r85(){$this->_retvalue = '(1 & '.$this->yystack[$this->yyidx + -1]->minor.')'; } -#line 2399 "smarty_internal_templateparser.php" + function yy_r80(){$this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.$this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor; } +#line 2396 "smarty_internal_templateparser.php" #line 368 "smarty_internal_templateparser.y" - function yy_r86(){$this->_retvalue = '!(1 & '.$this->yystack[$this->yyidx + -2]->minor.' / '.$this->yystack[$this->yyidx + 0]->minor.')'; } -#line 2402 "smarty_internal_templateparser.php" + function yy_r81(){$this->_retvalue = 'in_array('.$this->yystack[$this->yyidx + -2]->minor.','.$this->yystack[$this->yyidx + 0]->minor.')'; } +#line 2399 "smarty_internal_templateparser.php" #line 369 "smarty_internal_templateparser.y" - function yy_r87(){$this->_retvalue = '(1 & '.$this->yystack[$this->yyidx + -2]->minor.' / '.$this->yystack[$this->yyidx + 0]->minor.')'; } + function yy_r82(){$this->_retvalue = 'in_array('.$this->yystack[$this->yyidx + -2]->minor.',(array)'.$this->yystack[$this->yyidx + 0]->minor.')'; } +#line 2402 "smarty_internal_templateparser.php" +#line 371 "smarty_internal_templateparser.y" + function yy_r84(){$this->_retvalue = '!('.$this->yystack[$this->yyidx + -2]->minor.' % '.$this->yystack[$this->yyidx + 0]->minor.')'; } #line 2405 "smarty_internal_templateparser.php" -#line 375 "smarty_internal_templateparser.y" - function yy_r93(){$this->prefix_number++; $this->compiler->prefix_code[] = 'prefix_number.'='.$this->yystack[$this->yyidx + 0]->minor.';?>'; $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.$this->yystack[$this->yyidx + -1]->minor.'$_tmp'.$this->prefix_number; } +#line 372 "smarty_internal_templateparser.y" + function yy_r85(){$this->_retvalue = '('.$this->yystack[$this->yyidx + -2]->minor.' % '.$this->yystack[$this->yyidx + 0]->minor.')'; } #line 2408 "smarty_internal_templateparser.php" -#line 381 "smarty_internal_templateparser.y" - function yy_r94(){ $this->_retvalue = $this->yystack[$this->yyidx + -6]->minor.' ? $_smarty_tpl->getVariable(\''. $this->yystack[$this->yyidx + -2]->minor .'\')->value : '.$this->yystack[$this->yyidx + 0]->minor; $this->compiler->tag_nocache=$this->compiler->tag_nocache|$this->template->getVariable('$this->yystack[$this->yyidx + -2]->minor', null, true, false)->nocache; } +#line 373 "smarty_internal_templateparser.y" + function yy_r86(){$this->_retvalue = '!(1 & '.$this->yystack[$this->yyidx + -1]->minor.')'; } #line 2411 "smarty_internal_templateparser.php" -#line 382 "smarty_internal_templateparser.y" - function yy_r95(){ $this->_retvalue = $this->yystack[$this->yyidx + -5]->minor.' ? '.$this->yystack[$this->yyidx + -2]->minor.' : '.$this->yystack[$this->yyidx + 0]->minor; } +#line 374 "smarty_internal_templateparser.y" + function yy_r87(){$this->_retvalue = '(1 & '.$this->yystack[$this->yyidx + -1]->minor.')'; } #line 2414 "smarty_internal_templateparser.php" -#line 389 "smarty_internal_templateparser.y" - function yy_r98(){ $this->_retvalue = '!'.$this->yystack[$this->yyidx + 0]->minor; } +#line 375 "smarty_internal_templateparser.y" + function yy_r88(){$this->_retvalue = '!(1 & '.$this->yystack[$this->yyidx + -2]->minor.' / '.$this->yystack[$this->yyidx + 0]->minor.')'; } #line 2417 "smarty_internal_templateparser.php" -#line 395 "smarty_internal_templateparser.y" - function yy_r103(){ $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.'.'.$this->yystack[$this->yyidx + 0]->minor; } +#line 376 "smarty_internal_templateparser.y" + function yy_r89(){$this->_retvalue = '(1 & '.$this->yystack[$this->yyidx + -2]->minor.' / '.$this->yystack[$this->yyidx + 0]->minor.')'; } #line 2420 "smarty_internal_templateparser.php" -#line 396 "smarty_internal_templateparser.y" - function yy_r104(){ $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor.'.'; } +#line 382 "smarty_internal_templateparser.y" + function yy_r95(){$this->prefix_number++; $this->compiler->prefix_code[] = 'prefix_number.'='.$this->yystack[$this->yyidx + 0]->minor.';?>'; $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.$this->yystack[$this->yyidx + -1]->minor.'$_tmp'.$this->prefix_number; } #line 2423 "smarty_internal_templateparser.php" -#line 397 "smarty_internal_templateparser.y" - function yy_r105(){ $this->_retvalue = '.'.$this->yystack[$this->yyidx + 0]->minor; } +#line 388 "smarty_internal_templateparser.y" + function yy_r96(){ $this->_retvalue = $this->yystack[$this->yyidx + -6]->minor.' ? $_smarty_tpl->getVariable(\''. $this->yystack[$this->yyidx + -2]->minor .'\')->value : '.$this->yystack[$this->yyidx + 0]->minor; $this->compiler->tag_nocache=$this->compiler->tag_nocache|$this->template->getVariable('$this->yystack[$this->yyidx + -2]->minor', null, true, false)->nocache; } #line 2426 "smarty_internal_templateparser.php" -#line 399 "smarty_internal_templateparser.y" - function yy_r106(){ if (preg_match('~^true$~i', $this->yystack[$this->yyidx + 0]->minor)) { +#line 389 "smarty_internal_templateparser.y" + function yy_r97(){ $this->_retvalue = $this->yystack[$this->yyidx + -5]->minor.' ? '.$this->yystack[$this->yyidx + -2]->minor.' : '.$this->yystack[$this->yyidx + 0]->minor; } +#line 2429 "smarty_internal_templateparser.php" +#line 396 "smarty_internal_templateparser.y" + function yy_r100(){ $this->_retvalue = '!'.$this->yystack[$this->yyidx + 0]->minor; } +#line 2432 "smarty_internal_templateparser.php" +#line 402 "smarty_internal_templateparser.y" + function yy_r105(){ $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.'.'.$this->yystack[$this->yyidx + 0]->minor; } +#line 2435 "smarty_internal_templateparser.php" +#line 403 "smarty_internal_templateparser.y" + function yy_r106(){ $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor.'.'; } +#line 2438 "smarty_internal_templateparser.php" +#line 404 "smarty_internal_templateparser.y" + function yy_r107(){ $this->_retvalue = '.'.$this->yystack[$this->yyidx + 0]->minor; } +#line 2441 "smarty_internal_templateparser.php" +#line 406 "smarty_internal_templateparser.y" + function yy_r108(){ if (preg_match('~^true$~i', $this->yystack[$this->yyidx + 0]->minor)) { $this->_retvalue = 'true'; } elseif (preg_match('~^false$~i', $this->yystack[$this->yyidx + 0]->minor)) { $this->_retvalue = 'false'; @@ -2437,12 +2452,12 @@ static public $yy_action = array( $this->_retvalue = 'null'; } else $this->_retvalue = "'".$this->yystack[$this->yyidx + 0]->minor."'"; } -#line 2436 "smarty_internal_templateparser.php" -#line 410 "smarty_internal_templateparser.y" - function yy_r108(){ $this->_retvalue = "(". $this->yystack[$this->yyidx + -1]->minor .")"; } -#line 2439 "smarty_internal_templateparser.php" -#line 416 "smarty_internal_templateparser.y" - function yy_r111(){if ((!$this->template->security || $this->smarty->security_handler->isTrustedStaticClass($this->yystack[$this->yyidx + -2]->minor, $this->compiler)) || isset($this->smarty->registered_classes[$this->yystack[$this->yyidx + -2]->minor])) { +#line 2451 "smarty_internal_templateparser.php" +#line 417 "smarty_internal_templateparser.y" + function yy_r110(){ $this->_retvalue = "(". $this->yystack[$this->yyidx + -1]->minor .")"; } +#line 2454 "smarty_internal_templateparser.php" +#line 423 "smarty_internal_templateparser.y" + function yy_r113(){if (!$this->security || isset($this->smarty->registered_classes[$this->yystack[$this->yyidx + -2]->minor]) || $this->smarty->security_policy->isTrustedStaticClass($this->yystack[$this->yyidx + -2]->minor, $this->compiler)) { if (isset($this->smarty->registered_classes[$this->yystack[$this->yyidx + -2]->minor])) { $this->_retvalue = $this->smarty->registered_classes[$this->yystack[$this->yyidx + -2]->minor].'::'.$this->yystack[$this->yyidx + 0]->minor; } else { @@ -2452,16 +2467,16 @@ static public $yy_action = array( $this->compiler->trigger_template_error ("static class '".$this->yystack[$this->yyidx + -2]->minor."' is undefined or not allowed by security setting"); } } -#line 2451 "smarty_internal_templateparser.php" -#line 426 "smarty_internal_templateparser.y" - function yy_r112(){ if ($this->yystack[$this->yyidx + -2]->minor['var'] == '\'smarty\'') { $this->_retvalue = $this->compiler->compileTag('private_special_variable',$this->yystack[$this->yyidx + -2]->minor['smarty_internal_index']).'::'.$this->yystack[$this->yyidx + 0]->minor;} else { +#line 2466 "smarty_internal_templateparser.php" +#line 433 "smarty_internal_templateparser.y" + function yy_r114(){ if ($this->yystack[$this->yyidx + -2]->minor['var'] == '\'smarty\'') { $this->_retvalue = $this->compiler->compileTag('private_special_variable',array(),$this->yystack[$this->yyidx + -2]->minor['smarty_internal_index']).'::'.$this->yystack[$this->yyidx + 0]->minor;} else { $this->_retvalue = '$_smarty_tpl->getVariable('. $this->yystack[$this->yyidx + -2]->minor['var'] .')->value'.$this->yystack[$this->yyidx + -2]->minor['smarty_internal_index'].'::'.$this->yystack[$this->yyidx + 0]->minor; $this->compiler->tag_nocache=$this->compiler->tag_nocache|$this->template->getVariable(trim($this->yystack[$this->yyidx + -2]->minor['var'],"'"), null, true, false)->nocache;} } -#line 2455 "smarty_internal_templateparser.php" -#line 429 "smarty_internal_templateparser.y" - function yy_r113(){ $this->prefix_number++; $this->compiler->prefix_code[] = ''.$this->yystack[$this->yyidx + 0]->minor.'prefix_number.'=ob_get_clean();?>'; $this->_retvalue = '$_tmp'.$this->prefix_number; } -#line 2458 "smarty_internal_templateparser.php" -#line 438 "smarty_internal_templateparser.y" - function yy_r114(){if ($this->yystack[$this->yyidx + 0]->minor['var'] == '\'smarty\'') { $this->_retvalue = $this->compiler->compileTag('private_special_variable',$this->yystack[$this->yyidx + 0]->minor['smarty_internal_index']); +#line 2470 "smarty_internal_templateparser.php" +#line 436 "smarty_internal_templateparser.y" + function yy_r115(){ $this->prefix_number++; $this->compiler->prefix_code[] = ''.$this->yystack[$this->yyidx + 0]->minor.'prefix_number.'=ob_get_clean();?>'; $this->_retvalue = '$_tmp'.$this->prefix_number; } +#line 2473 "smarty_internal_templateparser.php" +#line 445 "smarty_internal_templateparser.y" + function yy_r116(){if ($this->yystack[$this->yyidx + 0]->minor['var'] == '\'smarty\'') { $this->_retvalue = $this->compiler->compileTag('private_special_variable',array(),$this->yystack[$this->yyidx + 0]->minor['smarty_internal_index']); } else { if (isset($this->compiler->local_var[$this->yystack[$this->yyidx + 0]->minor['var']])) { $this->_retvalue = '(isset($_smarty_tpl->tpl_vars['. $this->yystack[$this->yyidx + 0]->minor['var'] .']->value'.$this->yystack[$this->yyidx + 0]->minor['smarty_internal_index'].') ? $_smarty_tpl->tpl_vars['. $this->yystack[$this->yyidx + 0]->minor['var'] .']->value'.$this->yystack[$this->yyidx + 0]->minor['smarty_internal_index'].' : null)'; @@ -2473,106 +2488,106 @@ static public $yy_action = array( } } $this->compiler->tag_nocache=$this->compiler->tag_nocache|$this->template->getVariable(trim($this->yystack[$this->yyidx + 0]->minor['var'],"'"), null, true, false)->nocache;} } -#line 2472 "smarty_internal_templateparser.php" -#line 451 "smarty_internal_templateparser.y" - function yy_r115(){if (isset($this->compiler->local_var[$this->yystack[$this->yyidx + -2]->minor])) { +#line 2487 "smarty_internal_templateparser.php" +#line 458 "smarty_internal_templateparser.y" + function yy_r117(){if (isset($this->compiler->local_var[$this->yystack[$this->yyidx + -2]->minor])) { $this->_retvalue = '$_smarty_tpl->tpl_vars['. $this->yystack[$this->yyidx + -2]->minor .']->'.$this->yystack[$this->yyidx + 0]->minor; } else { $this->_retvalue = '$_smarty_tpl->getVariable('. $this->yystack[$this->yyidx + -2]->minor .')->'.$this->yystack[$this->yyidx + 0]->minor; } $this->compiler->tag_nocache=$this->compiler->tag_nocache|$this->template->getVariable(trim($this->yystack[$this->yyidx + -2]->minor,"'"), null, true, false)->nocache; } -#line 2480 "smarty_internal_templateparser.php" -#line 460 "smarty_internal_templateparser.y" - function yy_r117(){$this->_retvalue = '$_smarty_tpl->getConfigVariable(\''. $this->yystack[$this->yyidx + -1]->minor .'\')'; } -#line 2483 "smarty_internal_templateparser.php" -#line 461 "smarty_internal_templateparser.y" - function yy_r118(){$this->_retvalue = '$_smarty_tpl->getConfigVariable('. $this->yystack[$this->yyidx + -1]->minor .')'; } -#line 2486 "smarty_internal_templateparser.php" -#line 464 "smarty_internal_templateparser.y" - function yy_r119(){$this->_retvalue = array('var'=>$this->yystack[$this->yyidx + -1]->minor, 'smarty_internal_index'=>$this->yystack[$this->yyidx + 0]->minor); } -#line 2489 "smarty_internal_templateparser.php" -#line 470 "smarty_internal_templateparser.y" - function yy_r120(){$this->_retvalue = $this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor; } -#line 2492 "smarty_internal_templateparser.php" -#line 472 "smarty_internal_templateparser.y" - function yy_r121(){return; } #line 2495 "smarty_internal_templateparser.php" -#line 476 "smarty_internal_templateparser.y" - function yy_r122(){ $this->_retvalue = '[$_smarty_tpl->getVariable('. $this->yystack[$this->yyidx + 0]->minor .')->value]'; $this->compiler->tag_nocache=$this->compiler->tag_nocache|$this->template->getVariable('$this->yystack[$this->yyidx + 0]->minor', null, true, false)->nocache; } +#line 467 "smarty_internal_templateparser.y" + function yy_r119(){$this->_retvalue = '$_smarty_tpl->getConfigVariable(\''. $this->yystack[$this->yyidx + -1]->minor .'\')'; } #line 2498 "smarty_internal_templateparser.php" -#line 477 "smarty_internal_templateparser.y" - function yy_r123(){ $this->_retvalue = '[$_smarty_tpl->getVariable('. $this->yystack[$this->yyidx + -2]->minor .')->'.$this->yystack[$this->yyidx + 0]->minor.']'; $this->compiler->tag_nocache=$this->compiler->tag_nocache|$this->template->getVariable(trim($this->yystack[$this->yyidx + -2]->minor,"'"), null, true, false)->nocache; } +#line 468 "smarty_internal_templateparser.y" + function yy_r120(){$this->_retvalue = '$_smarty_tpl->getConfigVariable('. $this->yystack[$this->yyidx + -1]->minor .')'; } #line 2501 "smarty_internal_templateparser.php" -#line 478 "smarty_internal_templateparser.y" - function yy_r124(){ $this->_retvalue = "['". $this->yystack[$this->yyidx + 0]->minor ."']"; } +#line 471 "smarty_internal_templateparser.y" + function yy_r121(){$this->_retvalue = array('var'=>$this->yystack[$this->yyidx + -1]->minor, 'smarty_internal_index'=>$this->yystack[$this->yyidx + 0]->minor); } #line 2504 "smarty_internal_templateparser.php" -#line 479 "smarty_internal_templateparser.y" - function yy_r125(){ $this->_retvalue = "[". $this->yystack[$this->yyidx + 0]->minor ."]"; } +#line 477 "smarty_internal_templateparser.y" + function yy_r122(){$this->_retvalue = $this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor; } #line 2507 "smarty_internal_templateparser.php" -#line 480 "smarty_internal_templateparser.y" - function yy_r126(){ $this->_retvalue = "[". $this->yystack[$this->yyidx + -1]->minor ."]"; } +#line 479 "smarty_internal_templateparser.y" + function yy_r123(){return; } #line 2510 "smarty_internal_templateparser.php" -#line 482 "smarty_internal_templateparser.y" - function yy_r127(){ $this->_retvalue = '['.$this->compiler->compileTag('private_special_variable','[\'section\'][\''.$this->yystack[$this->yyidx + -1]->minor.'\'][\'index\']').']'; } -#line 2513 "smarty_internal_templateparser.php" #line 483 "smarty_internal_templateparser.y" - function yy_r128(){ $this->_retvalue = '['.$this->compiler->compileTag('private_special_variable','[\'section\'][\''.$this->yystack[$this->yyidx + -3]->minor.'\'][\''.$this->yystack[$this->yyidx + -1]->minor.'\']').']'; } + function yy_r124(){ $this->_retvalue = '[$_smarty_tpl->getVariable('. $this->yystack[$this->yyidx + 0]->minor .')->value]'; $this->compiler->tag_nocache=$this->compiler->tag_nocache|$this->template->getVariable('$this->yystack[$this->yyidx + 0]->minor', null, true, false)->nocache; } +#line 2513 "smarty_internal_templateparser.php" +#line 484 "smarty_internal_templateparser.y" + function yy_r125(){ $this->_retvalue = '[$_smarty_tpl->getVariable('. $this->yystack[$this->yyidx + -2]->minor .')->'.$this->yystack[$this->yyidx + 0]->minor.']'; $this->compiler->tag_nocache=$this->compiler->tag_nocache|$this->template->getVariable(trim($this->yystack[$this->yyidx + -2]->minor,"'"), null, true, false)->nocache; } #line 2516 "smarty_internal_templateparser.php" -#line 487 "smarty_internal_templateparser.y" - function yy_r130(){$this->_retvalue = '[]'; } +#line 485 "smarty_internal_templateparser.y" + function yy_r126(){ $this->_retvalue = "['". $this->yystack[$this->yyidx + 0]->minor ."']"; } #line 2519 "smarty_internal_templateparser.php" -#line 495 "smarty_internal_templateparser.y" - function yy_r132(){$this->_retvalue = $this->yystack[$this->yyidx + -1]->minor.'.'.$this->yystack[$this->yyidx + 0]->minor; } +#line 486 "smarty_internal_templateparser.y" + function yy_r127(){ $this->_retvalue = "[". $this->yystack[$this->yyidx + 0]->minor ."]"; } #line 2522 "smarty_internal_templateparser.php" -#line 497 "smarty_internal_templateparser.y" - function yy_r133(){$this->_retvalue = '\''.$this->yystack[$this->yyidx + 0]->minor.'\''; } +#line 487 "smarty_internal_templateparser.y" + function yy_r128(){ $this->_retvalue = "[". $this->yystack[$this->yyidx + -1]->minor ."]"; } #line 2525 "smarty_internal_templateparser.php" -#line 499 "smarty_internal_templateparser.y" - function yy_r134(){$this->_retvalue = '('.$this->yystack[$this->yyidx + -1]->minor.')'; } +#line 489 "smarty_internal_templateparser.y" + function yy_r129(){ $this->_retvalue = '['.$this->compiler->compileTag('private_special_variable',array(),'[\'section\'][\''.$this->yystack[$this->yyidx + -1]->minor.'\'][\'index\']').']'; } #line 2528 "smarty_internal_templateparser.php" +#line 490 "smarty_internal_templateparser.y" + function yy_r130(){ $this->_retvalue = '['.$this->compiler->compileTag('private_special_variable',array(),'[\'section\'][\''.$this->yystack[$this->yyidx + -3]->minor.'\'][\''.$this->yystack[$this->yyidx + -1]->minor.'\']').']'; } +#line 2531 "smarty_internal_templateparser.php" +#line 494 "smarty_internal_templateparser.y" + function yy_r132(){$this->_retvalue = '[]'; } +#line 2534 "smarty_internal_templateparser.php" +#line 502 "smarty_internal_templateparser.y" + function yy_r134(){$this->_retvalue = $this->yystack[$this->yyidx + -1]->minor.'.'.$this->yystack[$this->yyidx + 0]->minor; } +#line 2537 "smarty_internal_templateparser.php" #line 504 "smarty_internal_templateparser.y" - function yy_r135(){ if ($this->yystack[$this->yyidx + -1]->minor['var'] == '\'smarty\'') { $this->_retvalue = $this->compiler->compileTag('private_special_variable',$this->yystack[$this->yyidx + -1]->minor['smarty_internal_index']).$this->yystack[$this->yyidx + 0]->minor;} else { - $this->_retvalue = '$_smarty_tpl->getVariable('. $this->yystack[$this->yyidx + -1]->minor['var'] .')->value'.$this->yystack[$this->yyidx + -1]->minor['smarty_internal_index'].$this->yystack[$this->yyidx + 0]->minor; $this->compiler->tag_nocache=$this->compiler->tag_nocache|$this->template->getVariable(trim($this->yystack[$this->yyidx + -1]->minor['var'],"'"), null, true, false)->nocache;} } -#line 2532 "smarty_internal_templateparser.php" -#line 507 "smarty_internal_templateparser.y" - function yy_r136(){$this->_retvalue = $this->yystack[$this->yyidx + 0]->minor; } -#line 2535 "smarty_internal_templateparser.php" -#line 509 "smarty_internal_templateparser.y" - function yy_r137(){$this->_retvalue = $this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor; } -#line 2538 "smarty_internal_templateparser.php" + function yy_r135(){$this->_retvalue = '\''.$this->yystack[$this->yyidx + 0]->minor.'\''; } +#line 2540 "smarty_internal_templateparser.php" +#line 506 "smarty_internal_templateparser.y" + function yy_r136(){$this->_retvalue = '('.$this->yystack[$this->yyidx + -1]->minor.')'; } +#line 2543 "smarty_internal_templateparser.php" #line 511 "smarty_internal_templateparser.y" - function yy_r138(){if ($this->template->security && substr($this->yystack[$this->yyidx + -1]->minor,0,1) == '_') { - $this->compiler->trigger_template_error ("Security error: Call to private object member not allowed"); + function yy_r137(){ if ($this->yystack[$this->yyidx + -1]->minor['var'] == '\'smarty\'') { $this->_retvalue = $this->compiler->compileTag('private_special_variable',array(),$this->yystack[$this->yyidx + -1]->minor['smarty_internal_index']).$this->yystack[$this->yyidx + 0]->minor;} else { + $this->_retvalue = '$_smarty_tpl->getVariable('. $this->yystack[$this->yyidx + -1]->minor['var'] .')->value'.$this->yystack[$this->yyidx + -1]->minor['smarty_internal_index'].$this->yystack[$this->yyidx + 0]->minor; $this->compiler->tag_nocache=$this->compiler->tag_nocache|$this->template->getVariable(trim($this->yystack[$this->yyidx + -1]->minor['var'],"'"), null, true, false)->nocache;} } +#line 2547 "smarty_internal_templateparser.php" +#line 514 "smarty_internal_templateparser.y" + function yy_r138(){$this->_retvalue = $this->yystack[$this->yyidx + 0]->minor; } +#line 2550 "smarty_internal_templateparser.php" +#line 516 "smarty_internal_templateparser.y" + function yy_r139(){$this->_retvalue = $this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor; } +#line 2553 "smarty_internal_templateparser.php" +#line 518 "smarty_internal_templateparser.y" + function yy_r140(){if ($this->security && substr($this->yystack[$this->yyidx + -1]->minor,0,1) == '_') { + $this->compiler->trigger_template_error (self::Err1); } $this->_retvalue = '->'.$this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor; } -#line 2545 "smarty_internal_templateparser.php" -#line 516 "smarty_internal_templateparser.y" - function yy_r139(){if ($this->template->security) { - $this->compiler->trigger_template_error ("Security error: Call to dynamic object member not allowed"); +#line 2560 "smarty_internal_templateparser.php" +#line 523 "smarty_internal_templateparser.y" + function yy_r141(){if ($this->security) { + $this->compiler->trigger_template_error (self::Err2); } $this->_retvalue = '->{$_smarty_tpl->getVariable('. $this->yystack[$this->yyidx + -1]->minor .')->value'.$this->yystack[$this->yyidx + 0]->minor.'}'; $this->compiler->tag_nocache=$this->compiler->tag_nocache|$this->template->getVariable(trim($this->yystack[$this->yyidx + -1]->minor,"'"), null, true, false)->nocache; } -#line 2552 "smarty_internal_templateparser.php" -#line 521 "smarty_internal_templateparser.y" - function yy_r140(){if ($this->template->security) { - $this->compiler->trigger_template_error ("Security error: Call to dynamic object member not allowed"); +#line 2567 "smarty_internal_templateparser.php" +#line 528 "smarty_internal_templateparser.y" + function yy_r142(){if ($this->security) { + $this->compiler->trigger_template_error (self::Err2); } $this->_retvalue = '->{'.$this->yystack[$this->yyidx + -2]->minor.$this->yystack[$this->yyidx + 0]->minor.'}'; } -#line 2559 "smarty_internal_templateparser.php" -#line 526 "smarty_internal_templateparser.y" - function yy_r141(){if ($this->template->security) { - $this->compiler->trigger_template_error ("Security error: Call to dynamic object member not allowed"); +#line 2574 "smarty_internal_templateparser.php" +#line 533 "smarty_internal_templateparser.y" + function yy_r143(){if ($this->security) { + $this->compiler->trigger_template_error (self::Err2); } $this->_retvalue = '->{\''.$this->yystack[$this->yyidx + -4]->minor.'\'.'.$this->yystack[$this->yyidx + -2]->minor.$this->yystack[$this->yyidx + 0]->minor.'}'; } -#line 2566 "smarty_internal_templateparser.php" -#line 532 "smarty_internal_templateparser.y" - function yy_r142(){ $this->_retvalue = '->'.$this->yystack[$this->yyidx + 0]->minor; } -#line 2569 "smarty_internal_templateparser.php" -#line 538 "smarty_internal_templateparser.y" - function yy_r143(){if (!$this->template->security || $this->smarty->security_handler->isTrustedPhpFunction($this->yystack[$this->yyidx + -3]->minor, $this->compiler)) { +#line 2581 "smarty_internal_templateparser.php" +#line 539 "smarty_internal_templateparser.y" + function yy_r144(){ $this->_retvalue = '->'.$this->yystack[$this->yyidx + 0]->minor; } +#line 2584 "smarty_internal_templateparser.php" +#line 545 "smarty_internal_templateparser.y" + function yy_r145(){if (!$this->security || $this->smarty->security_policy->isTrustedPhpFunction($this->yystack[$this->yyidx + -3]->minor, $this->compiler)) { if (strcasecmp($this->yystack[$this->yyidx + -3]->minor,'isset') === 0 || strcasecmp($this->yystack[$this->yyidx + -3]->minor,'empty') === 0 || strcasecmp($this->yystack[$this->yyidx + -3]->minor,'array') === 0 || is_callable($this->yystack[$this->yyidx + -3]->minor)) { if (strcasecmp($this->yystack[$this->yyidx + -3]->minor,'isset') === 0) { $this->_retvalue = '('. $this->yystack[$this->yyidx + -1]->minor .' !== null)'; @@ -2586,140 +2601,140 @@ static public $yy_action = array( $this->compiler->trigger_template_error ("unknown function \"" . $this->yystack[$this->yyidx + -3]->minor . "\""); } } } -#line 2585 "smarty_internal_templateparser.php" -#line 556 "smarty_internal_templateparser.y" - function yy_r144(){if ($this->template->security && substr($this->yystack[$this->yyidx + -3]->minor,0,1) == '_') { - $this->compiler->trigger_template_error ("Security error: Call to private object member not allowed"); +#line 2600 "smarty_internal_templateparser.php" +#line 563 "smarty_internal_templateparser.y" + function yy_r146(){if ($this->security && substr($this->yystack[$this->yyidx + -3]->minor,0,1) == '_') { + $this->compiler->trigger_template_error (self::Err1); } $this->_retvalue = $this->yystack[$this->yyidx + -3]->minor . "(". $this->yystack[$this->yyidx + -1]->minor .")"; } -#line 2592 "smarty_internal_templateparser.php" -#line 561 "smarty_internal_templateparser.y" - function yy_r145(){if ($this->template->security) { - $this->compiler->trigger_template_error ("Security error: Call to dynamic object member not allowed"); +#line 2607 "smarty_internal_templateparser.php" +#line 568 "smarty_internal_templateparser.y" + function yy_r147(){if ($this->security) { + $this->compiler->trigger_template_error (self::Err2); } $this->prefix_number++; $this->compiler->prefix_code[] = 'prefix_number.'=$_smarty_tpl->getVariable(\''. $this->yystack[$this->yyidx + -3]->minor .'\')->value;?>'; $this->_retvalue = '$_tmp'.$this->prefix_number.'('. $this->yystack[$this->yyidx + -1]->minor .')'; } -#line 2599 "smarty_internal_templateparser.php" -#line 569 "smarty_internal_templateparser.y" - function yy_r146(){ $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.",".$this->yystack[$this->yyidx + 0]->minor; } -#line 2602 "smarty_internal_templateparser.php" -#line 573 "smarty_internal_templateparser.y" - function yy_r148(){ return; } -#line 2605 "smarty_internal_templateparser.php" -#line 578 "smarty_internal_templateparser.y" - function yy_r149(){$this->_retvalue = array_merge($this->yystack[$this->yyidx + -2]->minor,array(array_merge($this->yystack[$this->yyidx + -1]->minor,$this->yystack[$this->yyidx + 0]->minor))); } -#line 2608 "smarty_internal_templateparser.php" -#line 579 "smarty_internal_templateparser.y" - function yy_r150(){$this->_retvalue = array(array_merge($this->yystack[$this->yyidx + -1]->minor,$this->yystack[$this->yyidx + 0]->minor)); } -#line 2611 "smarty_internal_templateparser.php" -#line 582 "smarty_internal_templateparser.y" - function yy_r152(){ $this->_retvalue = array($this->yystack[$this->yyidx + 0]->minor); } #line 2614 "smarty_internal_templateparser.php" -#line 587 "smarty_internal_templateparser.y" - function yy_r153(){ $this->_retvalue = array_merge($this->yystack[$this->yyidx + -1]->minor,$this->yystack[$this->yyidx + 0]->minor); } +#line 576 "smarty_internal_templateparser.y" + function yy_r148(){ $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.",".$this->yystack[$this->yyidx + 0]->minor; } #line 2617 "smarty_internal_templateparser.php" -#line 589 "smarty_internal_templateparser.y" - function yy_r154(){$this->_retvalue = array(); } +#line 580 "smarty_internal_templateparser.y" + function yy_r150(){ return; } #line 2620 "smarty_internal_templateparser.php" -#line 591 "smarty_internal_templateparser.y" - function yy_r155(){$this->_retvalue = array($this->yystack[$this->yyidx + 0]->minor); } +#line 585 "smarty_internal_templateparser.y" + function yy_r151(){$this->_retvalue = array_merge($this->yystack[$this->yyidx + -2]->minor,array(array_merge($this->yystack[$this->yyidx + -1]->minor,$this->yystack[$this->yyidx + 0]->minor))); } #line 2623 "smarty_internal_templateparser.php" -#line 601 "smarty_internal_templateparser.y" - function yy_r160(){ $this->_retvalue = '$'.$this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor; } +#line 586 "smarty_internal_templateparser.y" + function yy_r152(){$this->_retvalue = array(array_merge($this->yystack[$this->yyidx + -1]->minor,$this->yystack[$this->yyidx + 0]->minor)); } #line 2626 "smarty_internal_templateparser.php" -#line 603 "smarty_internal_templateparser.y" - function yy_r161(){ $this->_retvalue = '$'.$this->yystack[$this->yyidx + -2]->minor.$this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor; } +#line 589 "smarty_internal_templateparser.y" + function yy_r154(){ $this->_retvalue = array($this->yystack[$this->yyidx + 0]->minor); } #line 2629 "smarty_internal_templateparser.php" -#line 612 "smarty_internal_templateparser.y" - function yy_r162(){$this->_retvalue = '=='; } +#line 594 "smarty_internal_templateparser.y" + function yy_r155(){ $this->_retvalue = array_merge($this->yystack[$this->yyidx + -1]->minor,$this->yystack[$this->yyidx + 0]->minor); } #line 2632 "smarty_internal_templateparser.php" -#line 613 "smarty_internal_templateparser.y" - function yy_r163(){$this->_retvalue = '!='; } +#line 596 "smarty_internal_templateparser.y" + function yy_r156(){$this->_retvalue = array(); } #line 2635 "smarty_internal_templateparser.php" -#line 614 "smarty_internal_templateparser.y" - function yy_r164(){$this->_retvalue = '>'; } +#line 598 "smarty_internal_templateparser.y" + function yy_r157(){$this->_retvalue = array($this->yystack[$this->yyidx + 0]->minor); } #line 2638 "smarty_internal_templateparser.php" -#line 615 "smarty_internal_templateparser.y" - function yy_r165(){$this->_retvalue = '<'; } +#line 608 "smarty_internal_templateparser.y" + function yy_r162(){ $this->_retvalue = '$'.$this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor; } #line 2641 "smarty_internal_templateparser.php" -#line 616 "smarty_internal_templateparser.y" - function yy_r166(){$this->_retvalue = '>='; } +#line 610 "smarty_internal_templateparser.y" + function yy_r163(){ $this->_retvalue = '$'.$this->yystack[$this->yyidx + -2]->minor.$this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor; } #line 2644 "smarty_internal_templateparser.php" -#line 617 "smarty_internal_templateparser.y" - function yy_r167(){$this->_retvalue = '<='; } -#line 2647 "smarty_internal_templateparser.php" -#line 618 "smarty_internal_templateparser.y" - function yy_r168(){$this->_retvalue = '==='; } -#line 2650 "smarty_internal_templateparser.php" #line 619 "smarty_internal_templateparser.y" - function yy_r169(){$this->_retvalue = '!=='; } -#line 2653 "smarty_internal_templateparser.php" + function yy_r164(){$this->_retvalue = '=='; } +#line 2647 "smarty_internal_templateparser.php" #line 620 "smarty_internal_templateparser.y" - function yy_r170(){$this->_retvalue = '%'; } -#line 2656 "smarty_internal_templateparser.php" + function yy_r165(){$this->_retvalue = '!='; } +#line 2650 "smarty_internal_templateparser.php" +#line 621 "smarty_internal_templateparser.y" + function yy_r166(){$this->_retvalue = '>'; } +#line 2653 "smarty_internal_templateparser.php" #line 622 "smarty_internal_templateparser.y" - function yy_r171(){$this->_retvalue = '&&'; } -#line 2659 "smarty_internal_templateparser.php" + function yy_r167(){$this->_retvalue = '<'; } +#line 2656 "smarty_internal_templateparser.php" #line 623 "smarty_internal_templateparser.y" - function yy_r172(){$this->_retvalue = '||'; } -#line 2662 "smarty_internal_templateparser.php" + function yy_r168(){$this->_retvalue = '>='; } +#line 2659 "smarty_internal_templateparser.php" #line 624 "smarty_internal_templateparser.y" - function yy_r173(){$this->_retvalue = ' XOR '; } + function yy_r169(){$this->_retvalue = '<='; } +#line 2662 "smarty_internal_templateparser.php" +#line 625 "smarty_internal_templateparser.y" + function yy_r170(){$this->_retvalue = '==='; } #line 2665 "smarty_internal_templateparser.php" -#line 629 "smarty_internal_templateparser.y" - function yy_r174(){ $this->_retvalue = 'array('.$this->yystack[$this->yyidx + -1]->minor.')'; } +#line 626 "smarty_internal_templateparser.y" + function yy_r171(){$this->_retvalue = '!=='; } #line 2668 "smarty_internal_templateparser.php" -#line 631 "smarty_internal_templateparser.y" - function yy_r176(){ $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.','.$this->yystack[$this->yyidx + 0]->minor; } +#line 627 "smarty_internal_templateparser.y" + function yy_r172(){$this->_retvalue = '%'; } #line 2671 "smarty_internal_templateparser.php" -#line 632 "smarty_internal_templateparser.y" - function yy_r177(){ return; } +#line 629 "smarty_internal_templateparser.y" + function yy_r173(){$this->_retvalue = '&&'; } #line 2674 "smarty_internal_templateparser.php" -#line 633 "smarty_internal_templateparser.y" - function yy_r178(){ $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.'=>'.$this->yystack[$this->yyidx + 0]->minor; } +#line 630 "smarty_internal_templateparser.y" + function yy_r174(){$this->_retvalue = '||'; } #line 2677 "smarty_internal_templateparser.php" -#line 634 "smarty_internal_templateparser.y" - function yy_r179(){ $this->_retvalue = '\''.$this->yystack[$this->yyidx + -2]->minor.'\'=>'.$this->yystack[$this->yyidx + 0]->minor; } +#line 631 "smarty_internal_templateparser.y" + function yy_r175(){$this->_retvalue = ' XOR '; } #line 2680 "smarty_internal_templateparser.php" -#line 641 "smarty_internal_templateparser.y" - function yy_r181(){ $this->_retvalue = "''"; } +#line 636 "smarty_internal_templateparser.y" + function yy_r176(){ $this->_retvalue = 'array('.$this->yystack[$this->yyidx + -1]->minor.')'; } #line 2683 "smarty_internal_templateparser.php" -#line 642 "smarty_internal_templateparser.y" - function yy_r182(){ $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor->to_smarty_php(); } +#line 638 "smarty_internal_templateparser.y" + function yy_r178(){ $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.','.$this->yystack[$this->yyidx + 0]->minor; } #line 2686 "smarty_internal_templateparser.php" -#line 644 "smarty_internal_templateparser.y" - function yy_r183(){ $this->yystack[$this->yyidx + -1]->minor->append_subtree($this->yystack[$this->yyidx + 0]->minor); $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor; } +#line 639 "smarty_internal_templateparser.y" + function yy_r179(){ return; } #line 2689 "smarty_internal_templateparser.php" -#line 645 "smarty_internal_templateparser.y" - function yy_r184(){ $this->_retvalue = new _smarty_doublequoted($this, $this->yystack[$this->yyidx + 0]->minor); } +#line 640 "smarty_internal_templateparser.y" + function yy_r180(){ $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.'=>'.$this->yystack[$this->yyidx + 0]->minor; } #line 2692 "smarty_internal_templateparser.php" -#line 647 "smarty_internal_templateparser.y" - function yy_r185(){ $this->_retvalue = new _smarty_code($this, $this->yystack[$this->yyidx + -1]->minor); } +#line 641 "smarty_internal_templateparser.y" + function yy_r181(){ $this->_retvalue = '\''.$this->yystack[$this->yyidx + -2]->minor.'\'=>'.$this->yystack[$this->yyidx + 0]->minor; } #line 2695 "smarty_internal_templateparser.php" +#line 648 "smarty_internal_templateparser.y" + function yy_r183(){ $this->_retvalue = "''"; } +#line 2698 "smarty_internal_templateparser.php" #line 649 "smarty_internal_templateparser.y" - function yy_r187(){if (isset($this->compiler->local_var["'".substr($this->yystack[$this->yyidx + 0]->minor,1)."'"])) { + function yy_r184(){ $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor->to_smarty_php(); } +#line 2701 "smarty_internal_templateparser.php" +#line 651 "smarty_internal_templateparser.y" + function yy_r185(){ $this->yystack[$this->yyidx + -1]->minor->append_subtree($this->yystack[$this->yyidx + 0]->minor); $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor; } +#line 2704 "smarty_internal_templateparser.php" +#line 652 "smarty_internal_templateparser.y" + function yy_r186(){ $this->_retvalue = new _smarty_doublequoted($this, $this->yystack[$this->yyidx + 0]->minor); } +#line 2707 "smarty_internal_templateparser.php" +#line 654 "smarty_internal_templateparser.y" + function yy_r187(){ $this->_retvalue = new _smarty_code($this, $this->yystack[$this->yyidx + -1]->minor); } +#line 2710 "smarty_internal_templateparser.php" +#line 656 "smarty_internal_templateparser.y" + function yy_r189(){if (isset($this->compiler->local_var["'".substr($this->yystack[$this->yyidx + 0]->minor,1)."'"])) { $this->_retvalue = new _smarty_code($this, '$_smarty_tpl->tpl_vars[\''. substr($this->yystack[$this->yyidx + 0]->minor,1) .'\']->value'); } else { $this->_retvalue = new _smarty_code($this, '$_smarty_tpl->getVariable(\''. substr($this->yystack[$this->yyidx + 0]->minor,1) .'\')->value'); } $this->compiler->tag_nocache = $this->compiler->tag_nocache | $this->template->getVariable(trim($this->yystack[$this->yyidx + 0]->minor,"'"), null, true, false)->nocache; } -#line 2704 "smarty_internal_templateparser.php" -#line 657 "smarty_internal_templateparser.y" - function yy_r189(){ $this->_retvalue = new _smarty_code($this, '('.$this->yystack[$this->yyidx + -1]->minor.')'); } -#line 2707 "smarty_internal_templateparser.php" -#line 658 "smarty_internal_templateparser.y" - function yy_r190(){ +#line 2719 "smarty_internal_templateparser.php" +#line 664 "smarty_internal_templateparser.y" + function yy_r191(){ $this->_retvalue = new _smarty_code($this, '('.$this->yystack[$this->yyidx + -1]->minor.')'); } +#line 2722 "smarty_internal_templateparser.php" +#line 665 "smarty_internal_templateparser.y" + function yy_r192(){ $this->_retvalue = new _smarty_tag($this, $this->yystack[$this->yyidx + 0]->minor); } -#line 2712 "smarty_internal_templateparser.php" -#line 661 "smarty_internal_templateparser.y" - function yy_r191(){ $this->_retvalue = new _smarty_dq_content($this, $this->yystack[$this->yyidx + 0]->minor); } -#line 2715 "smarty_internal_templateparser.php" +#line 2727 "smarty_internal_templateparser.php" #line 668 "smarty_internal_templateparser.y" - function yy_r193(){$this->_retvalue = ''; } -#line 2718 "smarty_internal_templateparser.php" + function yy_r193(){ $this->_retvalue = new _smarty_dq_content($this, $this->yystack[$this->yyidx + 0]->minor); } +#line 2730 "smarty_internal_templateparser.php" +#line 675 "smarty_internal_templateparser.y" + function yy_r195(){$this->_retvalue = ''; } +#line 2733 "smarty_internal_templateparser.php" private $_retvalue; @@ -2776,12 +2791,12 @@ static public $yy_action = array( function yy_syntax_error($yymajor, $TOKEN) { -#line 75 "smarty_internal_templateparser.y" +#line 77 "smarty_internal_templateparser.y" $this->internalError = true; $this->yymajor = $yymajor; $this->compiler->trigger_template_error(); -#line 2781 "smarty_internal_templateparser.php" +#line 2796 "smarty_internal_templateparser.php" } function yy_accept() @@ -2792,13 +2807,13 @@ static public $yy_action = array( while ($this->yyidx >= 0) { $stack = $this->yy_pop_parser_stack(); } -#line 67 "smarty_internal_templateparser.y" +#line 69 "smarty_internal_templateparser.y" $this->successful = !$this->internalError; $this->internalError = false; $this->retvalue = $this->_retvalue; //echo $this->retvalue."\n\n"; -#line 2799 "smarty_internal_templateparser.php" +#line 2814 "smarty_internal_templateparser.php" } function doParse($yymajor, $yytokenvalue) diff --git a/libs/sysplugins/smarty_internal_unregister.php b/libs/sysplugins/smarty_internal_unregister.php deleted file mode 100644 index 75cb6b05..00000000 --- a/libs/sysplugins/smarty_internal_unregister.php +++ /dev/null @@ -1,162 +0,0 @@ - - * @author Uwe Tews - * @package Smarty - * @subpackage PluginsInternal - * @version 3-SVN$Rev: 3286 $ - */ - -class Smarty_Internal_Unregister { - - protected $smarty; - - function __construct($smarty) { - $this->smarty = $smarty; - } - - /** - * Unregisters block function - * - * @param string $block_tag name of template function - */ - function block($block_tag) - { - if (isset($this->smarty->registered_plugins['block'][$block_tag])) { - unset($this->smarty->registered_plugins['block'][$block_tag]); - } - } - - /** - * Unregisters compiler function - * - * @param string $compiler_tag name of template function - */ - function compilerFunction($compiler_tag) - { - if (isset($this->smarty->registered_plugins['compiler'][$compiler_tag])) { - unset($this->smarty->registered_plugins['compiler'][$compiler_tag]); - } - } - - /** - * Unregisters custom function - * - * @param string $function_tag name of template function - */ - function templateFunction($function_tag) - { - if (isset($this->smarty->registered_plugins['function'][$function_tag])) { - unset($this->smarty->registered_plugins['function'][$function_tag]); - } - } - - /** - * Unregisters modifier - * - * @param string $modifier name of template modifier - */ - function modifier($modifier) - { - if (isset($this->smarty->registered_plugins['modifier'][$modifier])) { - unset($this->smarty->registered_plugins['modifier'][$modifier]); - } - } - - /** - * Unregisters template object - * - * @param string $object_name name of template object - */ - function templateObject($object_name) - { - unset($this->smarty->registered_objects[$object_name]); - } - - /** - * Unregisters template class - * - * @param string $object_name name of template object - */ - function templateClass($class_name) - { - unset($this->smarty->registered_classes[$class_name]); - } - - /** - * Unregisters an output filter - * - * @param callback $function_name - */ - function outputFilter($function_name) - { - unset($this->smarty->registered_filters['output'][$this->smarty->_get_filter_name($function_name)]); - } - - /** - * Unregisters a postfilter function - * - * @param callback $function_name - */ - function postFilter($function_name) - { - unset($this->smarty->registered_filters['post'][$this->smarty->_get_filter_name($function_name)]); - } - - /** - * Unregisters a prefilter function - * - * @param callback $function_name - */ - function preFilter($function_name) - { - unset($this->smarty->registered_filters['pre'][$this->smarty->_get_filter_name($function_name)]); - } - - /** - * Unregisters a resource - * - * @param string $resource_name name of resource - */ - function resource($resource_name) - { - unset($this->smarty->plugins['resource'][$resource_name]); - } - - /** - * Unregisters a variablefilter function - * - * @param callback $function_name - */ - function variableFilter($function_name) - { - unset($this->smarty->registered_filters['variable'][$this->smarty->_get_filter_name($function_name)]); - } - -} -?> \ No newline at end of file diff --git a/libs/sysplugins/smarty_internal_utility.php b/libs/sysplugins/smarty_internal_utility.php index 01e5b224..3c64e58a 100644 --- a/libs/sysplugins/smarty_internal_utility.php +++ b/libs/sysplugins/smarty_internal_utility.php @@ -60,6 +60,9 @@ class Smarty_Internal_Utility { $_error_count = 0; // loop over array of template directories foreach((array)$this->smarty->template_dir as $_dir) { + if (strpos('/\\', substr($_dir, -1)) === false) { + $_dir .= DS; + } $_compileDirs = new RecursiveDirectoryIterator($_dir); $_compile = new RecursiveIteratorIterator($_compileDirs); foreach ($_compile as $_fileinfo) { @@ -69,7 +72,7 @@ class Smarty_Internal_Utility { if ($_fileinfo->getPath() == substr($_dir, 0, -1)) { $_template_file = $_file; } else { - $_template_file = substr(substr($_fileinfo->getPath(), strlen($_dir)) . DS . $_file,1); + $_template_file = substr($_fileinfo->getPath(), strlen($_dir)) . DS . $_file; } echo '
', $_dir, '---', $_template_file; flush(); @@ -118,6 +121,9 @@ class Smarty_Internal_Utility { $_error_count = 0; // loop over array of template directories foreach((array)$this->smarty->config_dir as $_dir) { + if (strpos('/\\', substr($_dir, -1)) === false) { + $_dir .= DS; + } $_compileDirs = new RecursiveDirectoryIterator($_dir); $_compile = new RecursiveIteratorIterator($_compileDirs); foreach ($_compile as $_fileinfo) { @@ -127,7 +133,7 @@ class Smarty_Internal_Utility { if ($_fileinfo->getPath() == substr($_dir, 0, -1)) { $_config_file = $_file; } else { - $_config_file = substr(substr($_fileinfo->getPath(), strlen($_dir)) . DS . $_file,1); + $_config_file = substr($_fileinfo->getPath(), strlen($_dir)) . DS . $_file; } echo '
', $_dir, '---', $_config_file; flush(); @@ -208,6 +214,19 @@ class Smarty_Internal_Utility { return $_count; } + /** + * Return array of tag/attributes of all tags used by an template + * + * @param object $templae template object + * @return array of tag/attributes + */ + function getTags(Smarty_Internal_Template $template) + { + $template->smarty->get_used_tags = true; + $template->compileTemplateSource(); + return $template->compiler_object->used_tags; + } + function testInstall() { echo "
\n";
diff --git a/libs/sysplugins/smarty_internal_wrapper.php b/libs/sysplugins/smarty_internal_wrapper.php
index 6301f92f..2895e8ae 100644
--- a/libs/sysplugins/smarty_internal_wrapper.php
+++ b/libs/sysplugins/smarty_internal_wrapper.php
@@ -60,68 +60,67 @@ class Smarty_Internal_Wrapper {
        switch($name_parts[0]) {
          case 'register':
          case 'unregister':
-           $myobj = $name_parts[0] == 'register' ? $this->smarty->register : $this->smarty->unregister;
            switch($name_parts[1]) {
-              case 'function':
-                 return call_user_func_array(array($myobj,'templateFunction'),$args);
-                 break;
               case 'object':
-                 return call_user_func_array(array($myobj,'templateObject'),$args);
-                 break;
+                 return call_user_func_array(array($this->smarty,"{$name_parts[0]}Object"),$args);
               case 'compiler_function':
-                 return call_user_func_array(array($myobj,'compilerFunction'),$args);
-                 break;
+                 return call_user_func_array(array($this->smarty,"{$name_parts[0]}Plugin"),array_merge(array('compiler'),$args));
+              case 'prefilter':
+                 return call_user_func_array(array($this->smarty,"{$name_parts[0]}Filter"),array_merge(array('pre'),$args));
+              case 'postfilter':
+                 return call_user_func_array(array($this->smarty,"{$name_parts[0]}Filter"),array_merge(array('post'),$args));
+              case 'outputfilter':
+                 return call_user_func_array(array($this->smarty,"{$name_parts[0]}Filter"),array_merge(array('output'),$args));
+             case 'resource':
+                 return call_user_func_array(array($this->smarty,"{$name_parts[0]}Resource"),$args);
               default:
-                 return call_user_func_array(array($myobj,$name_parts[1]),$args);
-                 break;
+                 return call_user_func_array(array($this->smarty,"{$name_parts[0]}Plugin"),array_merge(array($name_parts[1]),$args));
            }
-           break;
            case 'get':
            switch($name_parts[1]) {
               case 'template_vars':
                  return call_user_func_array(array($this->smarty,'getTemplateVars'),$args);
-                 break;
               case 'config_vars':
                  return call_user_func_array(array($this->smarty,'getConfigVars'),$args);
-                 break;
               default:
                  return call_user_func_array(array($myobj,$name_parts[1]),$args);
-                 break;
            }
-           break;
            case 'clear':
            switch($name_parts[1]) {
               case 'all_assign':
                  return call_user_func_array(array($this->smarty,'clearAllAssign'),$args);
-                 break;
+              case 'assign':
+                 return call_user_func_array(array($this->smarty,'clearAssign'),$args);
+              case 'all_cache':
+                 return call_user_func_array(array($this->smarty,'clearAllCache'),$args);
+              case 'cache':
+                 return call_user_func_array(array($this->smarty,'clearCache'),$args);
+              case 'compiled_template':
+                 return call_user_func_array(array($this->smarty,'clearCompiledTemplate'),$args);
            }
-           break;
            case 'config':
            switch($name_parts[1]) {
               case 'load':
                  return call_user_func_array(array($this->smarty,'configLoad'),$args);
-                 break;
            }
-           break;
-           default:
-             // convert foo_bar_baz to fooBarBaz style names
-             $name_parts = explode('_',$name);
-             foreach($name_parts as $idx=>$part) {
-                if($idx==0)
-                  $name_parts[$idx] = strtolower($part);
-                else
-                  $name_parts[$idx] = ucfirst($part);
-             }
-             $func_name = implode('',$name_parts);
-             if(!method_exists($this->smarty,$func_name)) {
-                throw new SmartyException("unknown method '$name'");
-                return false;
-             }
-             return call_user_func_array(array($this->smarty,$func_name),$args);
-           break;
+           case 'trigger':
+           switch($name_parts[1]) {
+              case 'error':
+                 return call_user_func_array(array($this,'trigger_error'),$args);
+           }
        }
-       return false;
+       throw new SmartyException("unknown method '$name'");
+    }
+
+    /**
+     * trigger Smarty error
+     *
+     * @param string $error_msg
+     * @param integer $error_type
+     */
+    function trigger_error($error_msg, $error_type = E_USER_WARNING)
+    {
+        trigger_error("Smarty error: $error_msg", $error_type);
     }
 }
-
 ?>
\ No newline at end of file
diff --git a/libs/sysplugins/smarty_security.php b/libs/sysplugins/smarty_security.php
index 0a0a0bb9..cd066fb4 100644
--- a/libs/sysplugins/smarty_security.php
+++ b/libs/sysplugins/smarty_security.php
@@ -15,19 +15,18 @@ class Smarty_Security {
      * This determines how Smarty handles "" tags in templates.
      * possible values:
      * 
    - *
  • SMARTY_PHP_PASSTHRU -> echo PHP tags as they are
  • - *
  • SMARTY_PHP_QUOTE -> escape tags as entities
  • - *
  • SMARTY_PHP_REMOVE -> remove php tags
  • - *
  • SMARTY_PHP_ALLOW -> execute php tags
  • + *
  • Smarty::PHP_PASSTHRU -> echo PHP tags as they are
  • + *
  • Smarty::PHP_QUOTE -> escape tags as entities
  • + *
  • Smarty::PHP_REMOVE -> remove php tags
  • + *
  • Smarty::PHP_ALLOW -> execute php tags
  • *
* * @var integer */ - public $php_handling = SMARTY_PHP_PASSTHRU; + public $php_handling = Smarty::PHP_PASSTHRU; /** * This is the list of template directories that are considered secure. - * One directory per array element. * $template_dir is in this list implicitly. * * @var array @@ -57,26 +56,26 @@ class Smarty_Security { * This is an array of trusted PHP functions. * * If empty all functions are allowed. - * If set to 'none' none is allowed. + * To disable all PHP functions set $php_functions = null. * @var array */ public $php_functions = array('isset', 'empty', 'count', 'sizeof','in_array', 'is_array','time','nl2br'); /** - * This is an array of trusted modifers. + * This is an array of trusted PHP modifers. * * If empty all modifiers are allowed. - * If set to 'none' none is allowed. + * To disable all modifier set $modifiers = null. * @var array */ - public $modifiers = array('escape','count'); + public $php_modifiers = array('escape','count'); /** * This is an array of trusted streams. * * If empty all streams are allowed. - * If set to 'none' none is allowed. + * To disable all streams set $streams = null. * @var array */ public $streams = array('file'); @@ -89,9 +88,142 @@ class Smarty_Security { */ public $allow_super_globals = true; /** - * + flag if {php} tag can be executed + * + flag if the {php} and {include_php} tag can be executed */ public $allow_php_tag = false; + + public function __construct($smarty) + { + $this->smarty = $smarty; + } + /** + * Check if PHP function is trusted. + * + * @param string $function_name + * @param object $compiler compiler object + * @return boolean true if function is trusted + */ + function isTrustedPhpFunction($function_name, $compiler) + { + if (isset($this->php_functions) && (empty($this->php_functions) || in_array($function_name, $this->php_functions))) { + return true; + } else { + $compiler->trigger_template_error ("PHP function '{$function_name}' not allowed by security setting"); + return false; + } + } + + /** + * Check if static class is trusted. + * + * @param string $class_name + * @param object $compiler compiler object + * @return boolean true if class is trusted + */ + function isTrustedStaticClass($class_name, $compiler) + { + if (isset($this->static_classes) && (empty($this->static_classes) || in_array($class_name, $this->static_classes))) { + return true; + } else { + $compiler->trigger_template_error ("access to static class '{$class_name}' not allowed by security setting"); + return false; + } + } + /** + * Check if modifier is trusted. + * + * @param string $modifier_name + * @param object $compiler compiler object + * @return boolean true if modifier is trusted + */ + function isTrustedModifier($modifier_name, $compiler) + { + if (isset($this->php_modifiers) && (empty($this->php_modifiers) || in_array($modifier_name, $this->php_modifiers))) { + return true; + } else { + $compiler->trigger_template_error ("modifier '{$modifier_name}' not allowed by security setting"); + return false; + } + } + /** + * Check if stream is trusted. + * + * @param string $stream_name + * @param object $compiler compiler object + * @return boolean true if stream is trusted + */ + function isTrustedStream($stream_name) + { + if (isset($this->streams) && (empty($this->streams) || in_array($stream_name, $this->streams))) { + return true; + } else { + throw new SmartyException ("stream '{$stream_name}' not allowed by security setting"); + return false; + } + } + + /** + * Check if directory of file resource is trusted. + * + * @param string $filepath + * @param object $compiler compiler object + * @return boolean true if directory is trusted + */ + function isTrustedResourceDir($filepath) + { + $_rp = realpath($filepath); + if (isset($this->smarty->template_dir)) { + foreach ((array)$this->smarty->template_dir as $curr_dir) { + if (($_cd = realpath($curr_dir)) !== false && + strncmp($_rp, $_cd, strlen($_cd)) == 0 && + (strlen($_rp) == strlen($_cd) || substr($_rp, strlen($_cd), 1) == DS)) { + return true; + } + } + } + if (!empty($this->smarty->security_policy->secure_dir)) { + foreach ((array)$this->smarty->security_policy->secure_dir as $curr_dir) { + if (($_cd = realpath($curr_dir)) !== false) { + if ($_cd == $_rp) { + return true; + } elseif (strncmp($_rp, $_cd, strlen($_cd)) == 0 && + (strlen($_rp) == strlen($_cd) || substr($_rp, strlen($_cd), 1) == DS)) { + return true; + } + } + } + } + + throw new SmartyException ("directory '{$_rp}' not allowed by security setting"); + return false; + } + + /** + * Check if directory of file resource is trusted. + * + * @param string $filepath + * @param object $compiler compiler object + * @return boolean true if directory is trusted + */ + function isTrustedPHPDir($filepath) + { + $_rp = realpath($filepath); + if (!empty($this->trusted_dir)) { + foreach ((array)$this->trusted_dir as $curr_dir) { + if (($_cd = realpath($curr_dir)) !== false) { + if ($_cd == $_rp) { + return true; + } elseif (strncmp($_rp, $_cd, strlen($_cd)) == 0 && + substr($_rp, strlen($_cd), 1) == DS) { + return true; + } + } + } + } + + throw new SmartyException ("directory '{$_rp}' not allowed by security setting"); + return false; + } } ?> \ No newline at end of file