summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 97aeb01)
raw | patch | inline | side by side (parent: 97aeb01)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 12 Apr 2011 06:57:02 +0000 (06:57 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 12 Apr 2011 06:57:02 +0000 (06:57 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20702 594d385d-05f5-0310-b6e9-bd551577e9d8
27 files changed:
diff --git a/gosa-core/Changelog b/gosa-core/Changelog
index b4db44f8676b4d9e15d32a9865cf2f249d0801c1..616ade6939ed04fb8a00d84f9c3715ae1d5a9a3f 100644 (file)
--- a/gosa-core/Changelog
+++ b/gosa-core/Changelog
- Updated account expiration checks.
- Fixed acl resolution to be case insensitive.
- Fixed mail address check for user templates.
+ - Updated integrated smarty to 3.0.7
* gosa 2.7
- Updated design. CSS3, mostly w3c conform.
index 75c90ffc7e9210d009ad44d1ddebd92a8f8b3794..feb88171e19ea09bbc41f6dc1c60faca87ab57a6 100644 (file)
/**
* Project: Smarty: the PHP compiling template engine
* File: Smarty.class.php
- * SVN: $Id: Smarty.class.php 3845 2010-12-05 17:21:02Z uwe.tews@googlemail.com $
+ * SVN: $Id: Smarty.class.php 3895 2010-12-31 13:47:12Z uwe.tews@googlemail.com $
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* @author Monte Ohrt <monte at ohrt dot com>
* @author Uwe Tews
* @package Smarty
- * @version 3.0.6
+ * @version 3.0.7
*/
/**
* constant definitions
*/
// smarty version
- const SMARTY_VERSION = 'Smarty-3.0.6';
+ const SMARTY_VERSION = 'Smarty-3.0.7';
//define variable scopes
const SCOPE_LOCAL = 0;
const SCOPE_PARENT = 1;
// config var settings
public $config_overwrite = true; //Controls whether variables with the same name overwrite each other.
public $config_booleanize = true; //Controls whether config values of on/true/yes and off/false/no get converted to boolean
- public $config_read_hidden = true; //Controls whether hidden config sections/vars are read from the file.
+ public $config_read_hidden = false; //Controls whether hidden config sections/vars are read from the file.
// config vars
public $config_vars = array();
// assigned tpl vars
$this->cache_dir = '.' . DS . 'cache' . DS;
$this->config_dir = '.' . DS . 'configs' . DS;
$this->debug_tpl = SMARTY_DIR . 'debug.tpl';
- if (!$this->debugging && $this->debugging_ctrl == 'URL') {
- if (isset($_SERVER['QUERY_STRING'])) {
- $_query_string = $_SERVER['QUERY_STRING'];
- } else {
- $_query_string = '';
- }
- if (false !== strpos($_query_string, $this->smarty_debug_id)) {
- if (false !== strpos($_query_string, $this->smarty_debug_id . '=on')) {
- // enable debugging for this browser session
- setcookie('SMARTY_DEBUG', true);
- $this->debugging = true;
- } elseif (false !== strpos($_query_string, $this->smarty_debug_id . '=off')) {
- // disable debugging for this browser session
- setcookie('SMARTY_DEBUG', false);
- $this->debugging = false;
- } else {
- // enable debugging for this page
- $this->debugging = true;
- }
- } else {
- if (isset($_COOKIE['SMARTY_DEBUG'])) {
- $this->debugging = true;
- }
- }
- }
if (isset($_SERVER['SCRIPT_NAME'])) {
$this->assignGlobal('SCRIPT_NAME', $_SERVER['SCRIPT_NAME']);
}
}
// create template object if necessary
($template instanceof $this->template_class)? $_template = $template :
- $_template = $this->createTemplate ($template, $cache_id, $compile_id, $parent);
+ $_template = $this->createTemplate ($template, $cache_id, $compile_id, $parent, false);
if (isset($this->error_reporting)) {
$_smarty_old_error_level = error_reporting($this->error_reporting);
}
+ // check URL debugging control
+ if (!$this->debugging && $this->debugging_ctrl == 'URL') {
+ if (isset($_SERVER['QUERY_STRING'])) {
+ $_query_string = $_SERVER['QUERY_STRING'];
+ } else {
+ $_query_string = '';
+ }
+ if (false !== strpos($_query_string, $this->smarty_debug_id)) {
+ if (false !== strpos($_query_string, $this->smarty_debug_id . '=on')) {
+ // enable debugging for this browser session
+ setcookie('SMARTY_DEBUG', true);
+ $this->debugging = true;
+ } elseif (false !== strpos($_query_string, $this->smarty_debug_id . '=off')) {
+ // disable debugging for this browser session
+ setcookie('SMARTY_DEBUG', false);
+ $this->debugging = false;
+ } else {
+ // enable debugging for this page
+ $this->debugging = true;
+ }
+ } else {
+ if (isset($_COOKIE['SMARTY_DEBUG'])) {
+ $this->debugging = true;
+ }
+ }
+ }
// obtain data for cache modified check
if ($this->cache_modified_check && $this->caching && $display) {
$_isCached = $_template->isCached() && !$_template->has_nocache_code;
$_gmt_mtime = '';
}
}
- // return redered template
+ // return rendered template
if ((!$this->caching || $_template->resource_object->isEvaluated) && (isset($this->autoload_filters['output']) || isset($this->registered_filters['output']))) {
$_output = Smarty_Internal_Filter_Handler::runFilter('output', $_template->getRenderedTemplate(), $_template);
} else {
$parent = $this;
}
if (!($template instanceof $this->template_class)) {
- $template = $this->createTemplate ($template, $cache_id, $compile_id, $parent);
+ $template = $this->createTemplate ($template, $cache_id, $compile_id, $parent, false);
}
// return cache status of template
return $template->isCached();
* creates a template object
*
* @param string $template the resource handle of the template file
- * @param object $parent next higher level of Smarty variables
* @param mixed $cache_id cache id to be used with this template
* @param mixed $compile_id compile id to be used with this template
+ * @param object $parent next higher level of Smarty variables
+ * @param boolean $do_clone flag is Smarty object shall be cloned
* @returns object template object
*/
- public function createTemplate($template, $cache_id = null, $compile_id = null, $parent = null)
+ public function createTemplate($template, $cache_id = null, $compile_id = null, $parent = null, $do_clone = true)
{
if (!empty($cache_id) && (is_object($cache_id) || is_array($cache_id))) {
$parent = $cache_id;
$tpl = $this->template_objects[$_templateId];
} else {
// create new template object
- $tpl = new $this->template_class($template, clone $this, $parent, $cache_id, $compile_id);
+ if ($do_clone) {
+ $tpl = new $this->template_class($template, clone $this, $parent, $cache_id, $compile_id);
+ } else {
+ $tpl = new $this->template_class($template, $this, $parent, $cache_id, $compile_id);
+ }
}
} else {
// just return a copy of template class
diff --git a/gosa-core/include/smarty/plugins/function.html_options.php b/gosa-core/include/smarty/plugins/function.html_options.php
index 65c77c659f3eff1a5d8a334be0aa2d4260dce46e..7ac039028942509ce45e4dc2cb43c5ae38da047a 100644 (file)
$options = null;
$selected = array();
$output = null;
+ $id = null;
+ $class = null;
$extra = '';
+ $options_extra = '';
foreach($params as $_key => $_val) {
switch ($_key) {
case 'name':
+ case 'class':
+ case 'id':
$$_key = (string)$_val;
break;
/* raise error here? */
$_html_result = '';
+ $_idx = 0;
if (isset($options)) {
- foreach ($options as $_key => $_val)
- $_html_result .= smarty_function_html_options_optoutput($_key, $_val, $selected);
+ foreach ($options as $_key => $_val) {
+ $_html_result .= smarty_function_html_options_optoutput($_key, $_val, $selected, $id, $class, $_idx);
+ }
} else {
foreach ($values as $_i => $_key) {
$_val = isset($output[$_i]) ? $output[$_i] : '';
- $_html_result .= smarty_function_html_options_optoutput($_key, $_val, $selected);
+ $_html_result .= smarty_function_html_options_optoutput($_key, $_val, $selected, $id, $class, $_idx);
}
}
if (!empty($name)) {
- $_html_result = '<select name="' . $name . '"' . $extra . '>' . "\n" . $_html_result . '</select>' . "\n";
+ $_html_class = !empty($class) ? ' class="'.$class.'"' : '';
+ $_html_id = !empty($id) ? ' id="'.$id.'"' : '';
+ $_html_result = '<select name="' . $name . '"' . $_html_class . $_html_id . $extra . '>' . "\n" . $_html_result . '</select>' . "\n";
}
return $_html_result;
}
-function smarty_function_html_options_optoutput($key, $value, $selected)
+function smarty_function_html_options_optoutput($key, $value, $selected, $id, $class, &$idx)
{
if (!is_array($value)) {
$_html_result = '<option value="' .
smarty_function_escape_special_chars($key) . '"';
if (in_array((string)$key, $selected))
$_html_result .= ' selected="selected"';
- $_html_result .= '>' . smarty_function_escape_special_chars($value) . '</option>' . "\n";
+ $_html_class = !empty($class) ? ' class="'.$class.' option"' : '';
+ $_html_id = !empty($id) ? ' id="'.$id.'-'.$idx.'"' : '';
+ $_html_result .= $_html_class . $_html_id . '>' . smarty_function_escape_special_chars($value) . '</option>' . "\n";
+ $idx++;
} else {
- $_html_result = smarty_function_html_options_optgroup($key, $value, $selected);
- }
+ $_idx = 0;
+ $_html_result = smarty_function_html_options_optgroup($key, $value, $selected, $id.'-'.$idx, $class, $_idx);
+ $idx++;
+ }
return $_html_result;
}
-function smarty_function_html_options_optgroup($key, $values, $selected)
+function smarty_function_html_options_optgroup($key, $values, $selected, $id, $class, &$idx)
{
$optgroup_html = '<optgroup label="' . smarty_function_escape_special_chars($key) . '">' . "\n";
foreach ($values as $key => $value) {
- $optgroup_html .= smarty_function_html_options_optoutput($key, $value, $selected);
+ $optgroup_html .= smarty_function_html_options_optoutput($key, $value, $selected, $id, $class, $idx);
}
$optgroup_html .= "</optgroup>\n";
return $optgroup_html;
diff --git a/gosa-core/include/smarty/plugins/modifier.escape.php b/gosa-core/include/smarty/plugins/modifier.escape.php
index dae5926891a663a5bd36feb1d95acd9173880868..37bc0e30e9e186eea810bf781bd0dcb95f317354 100644 (file)
*/
function smarty_modifier_escape($string, $esc_type = 'html', $char_set = SMARTY_RESOURCE_CHAR_SET)
{
- if (!function_exists('mb_str_replace')) {
- // simulate the missing PHP mb_str_replace function
- function mb_str_replace($needles, $replacements, $haystack)
- {
- $rep = (array)$replacements;
- foreach ((array)$needles as $key => $needle) {
- $replacement = $rep[$key];
- $needle_len = mb_strlen($needle);
- $replacement_len = mb_strlen($replacement);
- $pos = mb_strpos($haystack, $needle, 0);
- while ($pos !== false) {
- $haystack = mb_substr($haystack, 0, $pos) . $replacement
- . mb_substr($haystack, $pos + $needle_len);
- $pos = mb_strpos($haystack, $needle, $pos + $replacement_len);
- }
- }
- return $haystack;
- }
- }
switch ($esc_type) {
case 'html':
return htmlspecialchars($string, ENT_QUOTES, $char_set);
return strtr($string, array('\\' => '\\\\', "'" => "\\'", '"' => '\\"', "\r" => '\\r', "\n" => '\\n', '</' => '<\/'));
case 'mail':
- // safe way to display e-mail address on a web page
- if (function_exists('mb_substr')) {
- return mb_str_replace(array('@', '.'), array(' [AT] ', ' [DOT] '), $string);
- } else {
- return str_replace(array('@', '.'), array(' [AT] ', ' [DOT] '), $string);
- }
+ require_once(SMARTY_PLUGINS_DIR . 'shared.mb_str_replace.php');
+ return smarty_mb_str_replace(array('@', '.'), array(' [AT] ', ' [DOT] '), $string);
case 'nonstd':
// escape non-standard chars, such as ms document quotes
diff --git a/gosa-core/include/smarty/plugins/modifier.replace.php b/gosa-core/include/smarty/plugins/modifier.replace.php
index 98195ffb413548aecfd8d06aaea2e9cb084cf781..0636a191459cb12de5847c1f138609de682a5468 100644 (file)
*/
function smarty_modifier_replace($string, $search, $replace)
{
- if (!function_exists('mb_str_replace')) {
- // simulate the missing PHP mb_str_replace function
- function mb_str_replace($needles, $replacements, $haystack)
- {
- $rep = (array)$replacements;
- foreach ((array)$needles as $key => $needle) {
- $replacement = $rep[$key];
- $needle_len = mb_strlen($needle);
- $replacement_len = mb_strlen($replacement);
- $pos = mb_strpos($haystack, $needle, 0);
- while ($pos !== false) {
- $haystack = mb_substr($haystack, 0, $pos) . $replacement
- . mb_substr($haystack, $pos + $needle_len);
- $pos = mb_strpos($haystack, $needle, $pos + $replacement_len);
- }
- }
- return $haystack;
- }
- }
- if (function_exists('mb_substr')) {
- return mb_str_replace($search, $replace, $string);
- } else {
- return str_replace($search, $replace, $string);
- }
+ require_once(SMARTY_PLUGINS_DIR . 'shared.mb_str_replace.php');
+ return smarty_mb_str_replace($search, $replace, $string);
}
?>
\ No newline at end of file
diff --git a/gosa-core/include/smarty/plugins/shared.make_timestamp.php b/gosa-core/include/smarty/plugins/shared.make_timestamp.php
index 832488baecf7b333f85e74f22004730e30f8ca1b..9789f53f7f8d9505a2fadc04ad87174e262f9914 100644 (file)
return time();
} elseif ($string instanceof DateTime) {
return $string->getTimestamp();
- } elseif (preg_match('/^\d{14}$/', $string)) {
+ } elseif (strlen($string)==14 && ctype_digit($string)) {
// it is mysql timestamp format of YYYYMMDDHHMMSS?
return mktime(substr($string, 8, 2),substr($string, 10, 2),substr($string, 12, 2),
substr($string, 4, 2),substr($string, 6, 2),substr($string, 0, 4));
}
}
-?>
\ No newline at end of file
+?>
diff --git a/gosa-core/include/smarty/plugins/shared.mb_str_replace.php b/gosa-core/include/smarty/plugins/shared.mb_str_replace.php
--- /dev/null
@@ -0,0 +1,38 @@
+<?php
+
+if(!function_exists('smarty_mb_str_replace')) {
+ function smarty_mb_str_replace($search, $replace, $subject, &$count=0) {
+ if (!is_array($search) && is_array($replace)) {
+ return false;
+ }
+ if (is_array($subject)) {
+ // call mb_replace for each single string in $subject
+ foreach ($subject as &$string) {
+ $string = &smarty_mb_str_replace($search, $replace, $string, $c);
+ $count += $c;
+ }
+ } elseif (is_array($search)) {
+ if (!is_array($replace)) {
+ foreach ($search as &$string) {
+ $subject = smarty_mb_str_replace($string, $replace, $subject, $c);
+ $count += $c;
+ }
+ } else {
+ $n = max(count($search), count($replace));
+ while ($n--) {
+ $subject = smarty_mb_str_replace(current($search), current($replace), $subject, $c);
+ $count += $c;
+ next($search);
+ next($replace);
+ }
+ }
+ } else {
+ $parts = mb_split(preg_quote($search), $subject);
+ $count = count($parts)-1;
+ $subject = implode($replace, $parts);
+ }
+ return $subject;
+ }
+}
+
+?>
\ No newline at end of file
diff --git a/gosa-core/include/smarty/sysplugins/smarty_internal_compile_append.php b/gosa-core/include/smarty/sysplugins/smarty_internal_compile_append.php
index 8b6c4ee8b270de21e8152477fc75ff9337943726..98e696e30e2a8f4eecaa532a98acc395e63bb9f4 100644 (file)
* Smarty Internal Plugin Compile Append Class
*/
class Smarty_Internal_Compile_Append extends Smarty_Internal_Compile_Assign {
- // attribute definitions
- public $required_attributes = array('var', 'value');
- public $shorttag_order = array('var', 'value');
- public $optional_attributes = array('scope', 'index');
/**
* Compiles code for the {append} tag
public function compile($args, $compiler, $parameter)
{
$this->compiler = $compiler;
+ // the following must be assigned at runtime because it will be overwritten in parent class
+ $this->required_attributes = array('var', 'value');
+ $this->shorttag_order = array('var', 'value');
+ $this->optional_attributes = array('scope','index');
// check and get attributes
$_attr = $this->_get_attributes($args);
// map to compile assign attributes
diff --git a/gosa-core/include/smarty/sysplugins/smarty_internal_compile_assign.php b/gosa-core/include/smarty/sysplugins/smarty_internal_compile_assign.php
index b7dab7c416985faf6fca1419a18d097c248758f9..8d8c643afceacbdb90fb78eba511e1338432f91d 100644 (file)
public function compile($args, $compiler, $parameter)
{
$this->compiler = $compiler;
+ // the following must be assigned at runtime because it will be overwritten in Smarty_Internal_Compile_Append
$this->required_attributes = array('var', 'value');
$this->shorttag_order = array('var', 'value');
$this->optional_attributes = array('scope');
diff --git a/gosa-core/include/smarty/sysplugins/smarty_internal_compile_block.php b/gosa-core/include/smarty/sysplugins/smarty_internal_compile_block.php
index b1b64374a245a6beadd840de0efef0cb91cacac3..cd1ca281bb260099bd17984f2674bc3c3c17b897 100644 (file)
$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'] ,"'");
+ $_name = trim($compiler->_tag_stack[$stack_count][1][0]['name'] ,"'\"");
break;
}
}
diff --git a/gosa-core/include/smarty/sysplugins/smarty_internal_compile_function.php b/gosa-core/include/smarty/sysplugins/smarty_internal_compile_function.php
index 54429ebd89f20ee80952096df9f92d4e6e2c9393..db2409a30552150e7ea511f4a2ba52e174497b4c 100644 (file)
$_name = trim($_attr['name'], "'\"");
unset($_attr['name']);
$compiler->template->properties['function'][$_name]['parameter'] = array();
+ $_smarty_tpl = $compiler->template;
foreach ($_attr as $_key => $_data) {
- $compiler->template->properties['function'][$_name]['parameter'][$_key] = $_data;
+ eval ('$tmp='.$_data.';');
+ $compiler->template->properties['function'][$_name]['parameter'][$_key] = $tmp;
}
$compiler->smarty->template_functions[$_name]['parameter'] = $compiler->template->properties['function'][$_name]['parameter'];
if ($compiler->template->caching) {
$output = "<?php if (!function_exists('smarty_template_function_{$_name}')) {
function smarty_template_function_{$_name}(\$_smarty_tpl,\$params) {
\$saved_tpl_vars = \$_smarty_tpl->tpl_vars;
- foreach (\$_smarty_tpl->template_functions['{$_name}']['parameter'] as \$key => \$value) {\$_smarty_tpl->tpl_vars[\$key] = new Smarty_variable(trim(\$value,'\''));};
+ foreach (\$_smarty_tpl->template_functions['{$_name}']['parameter'] as \$key => \$value) {\$_smarty_tpl->tpl_vars[\$key] = new Smarty_variable(\$value);};
foreach (\$params as \$key => \$value) {\$_smarty_tpl->tpl_vars[\$key] = new Smarty_variable(\$value);}?>";
}
// Init temporay context
diff --git a/gosa-core/include/smarty/sysplugins/smarty_internal_compile_if.php b/gosa-core/include/smarty/sysplugins/smarty_internal_compile_if.php
index 2d9d2c6a805dd7def05aeaaa217c516940adca61..41e6597e46f409ace28b748e7c3f41c2e700e174 100644 (file)
$_nocache = '';
}
if (is_array($parameter['if condition']['var'])) {
- $_output = "<?php if (!isset(\$_smarty_tpl->tpl_vars[".$parameter['if condition']['var']['var']."]) || !is_array(\$_smarty_tpl->tpl_vars[".$parameter['if condition']['var']['var']."]->value)) \$_smarty_tpl->createLocalArrayVariable(".$parameter['if condition']['var']['var']."$_nocache2);\n";
+ $_output = "<?php if (!isset(\$_smarty_tpl->tpl_vars[".$parameter['if condition']['var']['var']."]) || !is_array(\$_smarty_tpl->tpl_vars[".$parameter['if condition']['var']['var']."]->value)) \$_smarty_tpl->createLocalArrayVariable(".$parameter['if condition']['var']['var']."$_nocache);\n";
$_output .= "if (\$_smarty_tpl->tpl_vars[".$parameter['if condition']['var']['var']."]->value".$parameter['if condition']['var']['smarty_internal_index']." = ".$parameter['if condition']['value']."){?>";
} else {
$_output = "<?php \$_smarty_tpl->tpl_vars[".$parameter['if condition']['var']."] = new Smarty_Variable(\$_smarty_tpl->getVariable(".$parameter['if condition']['var'].",null,true,false)->value{$_nocache});";
if ($condition_by_assign) {
$this->_open_tag('elseif', array($nesting + 1, $compiler->tag_nocache));
if (is_array($parameter['if condition']['var'])) {
- $_output = "<?php }else{ if (!isset(\$_smarty_tpl->tpl_vars[".$parameter['if condition']['var']['var']."]) || !is_array(\$_smarty_tpl->tpl_vars[".$parameter['if condition']['var']['var']."]->value)) \$_smarty_tpl->createLocalArrayVariable(".$parameter['if condition']['var']['var']."$_nocache2);\n";
+ $_output = "<?php }else{ if (!isset(\$_smarty_tpl->tpl_vars[".$parameter['if condition']['var']['var']."]) || !is_array(\$_smarty_tpl->tpl_vars[".$parameter['if condition']['var']['var']."]->value)) \$_smarty_tpl->createLocalArrayVariable(".$parameter['if condition']['var']['var']."$_nocache);\n";
$_output .= "if (\$_smarty_tpl->tpl_vars[".$parameter['if condition']['var']['var']."]->value".$parameter['if condition']['var']['smarty_internal_index']." = ".$parameter['if condition']['value']."){?>";
} else {
$_output = "<?php }else{ \$_smarty_tpl->tpl_vars[".$parameter['if condition']['var']."] = new Smarty_Variable(\$_smarty_tpl->getVariable(".$parameter['if condition']['var'].",null,true,false)->value{$_nocache});";
$this->_open_tag('elseif', array($nesting + 1, $compiler->tag_nocache));
if ($condition_by_assign) {
if (is_array($parameter['if condition']['var'])) {
- $_output = "<?php }else{?>{$tmp}<?php if (!isset(\$_smarty_tpl->tpl_vars[".$parameter['if condition']['var']['var']."]) || !is_array(\$_smarty_tpl->tpl_vars[".$parameter['if condition']['var']['var']."]->value)) \$_smarty_tpl->createLocalArrayVariable(".$parameter['if condition']['var']['var']."$_nocache2);\n";
+ $_output = "<?php }else{?>{$tmp}<?php if (!isset(\$_smarty_tpl->tpl_vars[".$parameter['if condition']['var']['var']."]) || !is_array(\$_smarty_tpl->tpl_vars[".$parameter['if condition']['var']['var']."]->value)) \$_smarty_tpl->createLocalArrayVariable(".$parameter['if condition']['var']['var']."$_nocache);\n";
$_output .= "if (\$_smarty_tpl->tpl_vars[".$parameter['if condition']['var']['var']."]->value".$parameter['if condition']['var']['smarty_internal_index']." = ".$parameter['if condition']['value']."){?>";
} else {
$_output = "<?php }else{?>{$tmp}<?php \$_smarty_tpl->tpl_vars[".$parameter['if condition']['var']."] = new Smarty_Variable(\$_smarty_tpl->getVariable(".$parameter['if condition']['var'].",null,true,false)->value{$_nocache});";
diff --git a/gosa-core/include/smarty/sysplugins/smarty_internal_compile_include.php b/gosa-core/include/smarty/sysplugins/smarty_internal_compile_include.php
index ea323101910667982a6ad3fefc5a8134fb3d9a71..01d260eb7d2078a5fd7b02442531afbf470f5cbb 100644 (file)
$_output .= "<?php \$_smarty_tpl = array_pop(\$_tpl_stack);?>";
} else {
$_output .= " echo \$_template->getRenderedTemplate();?>";
- $_output .= "<?php \$_template->updateParentVariables($_parent_scope);?>";
+ if ($_parent_scope != Smarty::SCOPE_LOCAL) {
+ $_output .= "<?php \$_template->updateParentVariables($_parent_scope);?>";
+ }
}
}
$_output .= "<?php unset(\$_template);?>";
diff --git a/gosa-core/include/smarty/sysplugins/smarty_internal_compile_private_registered_block.php b/gosa-core/include/smarty/sysplugins/smarty_internal_compile_private_registered_block.php
index 37e1de73dfe75bf0e8261ee546d2640cec17f60b..054036241175a0696a068d96e9a1733813cff9bc 100644 (file)
foreach ($_attr as $_key => $_value) {\r
if (is_int($_key)) {\r
$_paramsArray[] = "$_key=>$_value";\r
+ } elseif ($this->compiler->template->caching && in_array($_key,$compiler->smarty->registered_plugins[Smarty::PLUGIN_BLOCK][$tag][2])) {\r
+ $_value = str_replace("'","^#^",$_value);\r
+ $_paramsArray[] = "'$_key'=>^#^.var_export($_value,true).^#^";\r
} else {\r
$_paramsArray[] = "'$_key'=>$_value";\r
} \r
diff --git a/gosa-core/include/smarty/sysplugins/smarty_internal_compile_private_registered_function.php b/gosa-core/include/smarty/sysplugins/smarty_internal_compile_private_registered_function.php
index ca4e68dbaaa0b8d4cb69918df4fe48cb1280708b..f79edf6849c836c96cc9e4023afdf501d26a435c 100644 (file)
foreach ($_attr as $_key => $_value) {\r
if (is_int($_key)) {\r
$_paramsArray[] = "$_key=>$_value";\r
+ } elseif ($this->compiler->template->caching && in_array($_key,$compiler->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION][$tag][2])) {\r
+ $_value = str_replace("'","^#^",$_value);\r
+ $_paramsArray[] = "'$_key'=>^#^.var_export($_value,true).^#^";\r
} else {\r
$_paramsArray[] = "'$_key'=>$_value";\r
} \r
diff --git a/gosa-core/include/smarty/sysplugins/smarty_internal_compile_private_special_variable.php b/gosa-core/include/smarty/sysplugins/smarty_internal_compile_private_special_variable.php
index f9a8535c7295bb3d626fa0e99423d8a6d2265f96..5d6ae8015ec371580a087699b182a6c027037925 100644 (file)
@@ -56,12 +56,10 @@ class Smarty_Internal_Compile_Private_Special_Variable extends Smarty_Internal_C
break;
case 'template':
- $_template_name = $compiler->template->template_resource;
- return "'$_template_name'";
+ return 'basename($_smarty_tpl->getTemplateFilepath())';
case 'current_dir':
- $_template_dir_name = dirname($compiler->template->getTemplateFilepath());
- return "'$_template_dir_name'";
+ return 'dirname($_smarty_tpl->getTemplateFilepath())';
case 'version':
$_version = Smarty::SMARTY_VERSION;
diff --git a/gosa-core/include/smarty/sysplugins/smarty_internal_compile_while.php b/gosa-core/include/smarty/sysplugins/smarty_internal_compile_while.php
index c7fd462f8be382b5ae16a3b74ac3bfa6ae7607c7..7e87a2291e91e4be766ea8a8170d7d04d939f223 100644 (file)
}
} else {
$_nocache = '';
- $_nocache2 = '';
}
if (is_array($parameter['if condition']['var'])) {
- $_output = "<?php if (!isset(\$_smarty_tpl->tpl_vars[".$parameter['if condition']['var']['var']."]) || !is_array(\$_smarty_tpl->tpl_vars[".$parameter['if condition']['var']['var']."]->value)) \$_smarty_tpl->createLocalArrayVariable(".$parameter['if condition']['var']['var']."$_nocache2);\n";
+ $_output = "<?php if (!isset(\$_smarty_tpl->tpl_vars[".$parameter['if condition']['var']['var']."]) || !is_array(\$_smarty_tpl->tpl_vars[".$parameter['if condition']['var']['var']."]->value)) \$_smarty_tpl->createLocalArrayVariable(".$parameter['if condition']['var']['var']."$_nocache);\n";
$_output .= "while (\$_smarty_tpl->tpl_vars[".$parameter['if condition']['var']['var']."]->value".$parameter['if condition']['var']['smarty_internal_index']." = ".$parameter['if condition']['value']."){?>";
} else {
- $_output = "<?php \$_smarty_tpl->tpl_vars[".$parameter['if condition']['var']."] = new Smarty_Variable(\$_smarty_tpl->getVariable(".$parameter['if condition']['var'].")->value{$_nocache},null,true,false);";
+ $_output = "<?php \$_smarty_tpl->tpl_vars[".$parameter['if condition']['var']."] = new Smarty_Variable(\$_smarty_tpl->getVariable(".$parameter['if condition']['var'].",null,true,false)->value{$_nocache});";
$_output .= "while (\$_smarty_tpl->tpl_vars[".$parameter['if condition']['var']."]->value = ".$parameter['if condition']['value']."){?>";
}
return $_output;
diff --git a/gosa-core/include/smarty/sysplugins/smarty_internal_configfilelexer.php b/gosa-core/include/smarty/sysplugins/smarty_internal_configfilelexer.php
index 3c4249c895b510b3327cc4d5636b373ef34f0488..9186fe22fcea2dc108e7cce5d566025a15b17221 100644 (file)
* @subpackage Config
* @author Uwe Tews
*/
-
/**
* Smarty Internal Plugin Configfilelexer
*/
public $node;
public $line;
private $state = 1;
- public $smarty_token_names = array ( // Text for parser error messages
- );
-
-
+ public $smarty_token_names = array ( // Text for parser error messages
+ );
+
+
function __construct($data, $smarty)
{
// set instance object
if ($this->counter >= strlen($this->data)) {
return false; // end of input
}
- $yy_global_pattern = "/^(#)|^(\\[)|^(\\])|^(=)|^([ \t\r]+)|^(\n)|^([0-9]*[a-zA-Z_]\\w*)/";
+ $yy_global_pattern = "/^(#)|^(\\[)|^(\\])|^(=)|^([ \t\r]+)|^(\n)|^([0-9]*[a-zA-Z_]\\w*)/iS";
do {
if (preg_match($yy_global_pattern, substr($this->data, $this->counter), $yymatches)) {
if ($this->counter >= strlen($this->data)) {
return false; // end of input
}
- $yy_global_pattern = "/^([ \t\r]+)|^(\\d+\\.\\d+(?=[ \t\r]*[\n#]))|^(\\d+(?=[ \t\r]*[\n#]))|^('[^'\\\\]*(?:\\\\.[^'\\\\]*)*'(?=[ \t\r]*[\n#]))|^(\"[^\"\\\\]*(?:\\\\.[^\"\\\\]*)*\"(?=[ \t\r]*[\n#]))|^(\"\"\"[^\"\\\\]*(?:\\\\.[^\"\\\\]*)*\"\"\"(?=[ \t\r]*[\n#]))|^([a-zA-Z]+(?=[ \t\r]*[\n#]))|^([^\n]+?(?=[ \t\r]*\n))|^(\n)/";
+ $yy_global_pattern = "/^([ \t\r]+)|^(\\d+\\.\\d+(?=[ \t\r]*[\n#]))|^(\\d+(?=[ \t\r]*[\n#]))|^('[^'\\\\]*(?:\\\\.[^'\\\\]*)*'(?=[ \t\r]*[\n#]))|^(\"[^\"\\\\]*(?:\\\\.[^\"\\\\]*)*\"(?=[ \t\r]*[\n#]))|^(\"\"\"[^\"\\\\]*(?:\\\\.[^\"\\\\]*)*\"\"\"(?=[ \t\r]*[\n#]))|^([a-zA-Z]+(?=[ \t\r]*[\n#]))|^([^\n]+?(?=[ \t\r]*\n))|^(\n)/iS";
do {
if (preg_match($yy_global_pattern, substr($this->data, $this->counter), $yymatches)) {
if ($this->counter >= strlen($this->data)) {
return false; // end of input
}
- $yy_global_pattern = "/^([^\n]+?(?=[ \t\r]*\n))/";
+ $yy_global_pattern = "/^([^\n]+?(?=[ \t\r]*\n))/iS";
do {
if (preg_match($yy_global_pattern, substr($this->data, $this->counter), $yymatches)) {
if ($this->counter >= strlen($this->data)) {
return false; // end of input
}
- $yy_global_pattern = "/^([ \t\r]+)|^([^\n]+?(?=[ \t\r]*\n))|^(\n)/";
+ $yy_global_pattern = "/^([ \t\r]+)|^([^\n]+?(?=[ \t\r]*\n))|^(\n)/iS";
do {
if (preg_match($yy_global_pattern, substr($this->data, $this->counter), $yymatches)) {
if ($this->counter >= strlen($this->data)) {
return false; // end of input
}
- $yy_global_pattern = "/^(\\.)|^(.*?(?=[\.=[\]\r\n]))/";
+ $yy_global_pattern = "/^(\\.)|^(.*?(?=[\.=[\]\r\n]))/iS";
do {
if (preg_match($yy_global_pattern, substr($this->data, $this->counter), $yymatches)) {
$this->yypopstate();
}
-}
+}
?>
\ No newline at end of file
diff --git a/gosa-core/include/smarty/sysplugins/smarty_internal_configfileparser.php b/gosa-core/include/smarty/sysplugins/smarty_internal_configfileparser.php
index d8bb95c2d27adbb3f3782123795f968f6be85359..0b5a573436f366c6ffea5529f309a453f10b4043 100644 (file)
@@ -113,7 +113,6 @@ class Smarty_Internal_Configfileparser#line 79 "smarty_internal_configfileparser
if (in_array(strtolower($str) ,array('on','yes','true'))) {
$res = true;
} else {
- assert(in_array(strtolower($str), array('off','no','false')));
$res = false;
}
return $res;
@@ -164,7 +163,7 @@ class Smarty_Internal_Configfileparser#line 79 "smarty_internal_configfileparser
private function add_global_vars(Array $vars) {
if (!isset($this->compiler->config_data['vars'])) {
- $this->compiler->config_data['vars'] = Array();
+ $this->compiler->config_data['vars'] = Array();
}
foreach ($vars as $var) {
$this->set_var($var, $this->compiler->config_data);
@@ -179,7 +178,7 @@ class Smarty_Internal_Configfileparser#line 79 "smarty_internal_configfileparser
$this->set_var($var, $this->compiler->config_data['sections'][$section_name]);
}
}
-#line 175 "smarty_internal_configfileparser.php"
+#line 174 "smarty_internal_configfileparser.php"
const TPC_OPENB = 1;
const TPC_SECTION = 2;
$this->yystack[$this->yyidx]->stateno,
self::$yyRuleInfo[$yyruleno]['lhs']);
if (isset(self::$yyExpectedTokens[$nextstate])) {
- $expected = array_merge($expected, self::$yyExpectedTokens[$nextstate]);
+ $expected = array_merge($expected, self::$yyExpectedTokens[$nextstate]);
if (in_array($token,
self::$yyExpectedTokens[$nextstate], true)) {
$this->yyidx = $yyidx;
}
break;
} while (true);
- $this->yyidx = $yyidx;
- $this->yystack = $stack;
+ $this->yyidx = $yyidx;
+ $this->yystack = $stack;
return array_unique($expected);
}
while ($this->yyidx >= 0) {
$this->yy_pop_parser_stack();
}
-#line 127 "smarty_internal_configfileparser.y"
+#line 126 "smarty_internal_configfileparser.y"
$this->internalError = true;
$this->compiler->trigger_config_file_error("Stack overflow in configfile parser");
-#line 586 "smarty_internal_configfileparser.php"
+#line 585 "smarty_internal_configfileparser.php"
return;
}
$yytos = new TPC_yyStackEntry;
15 => 15,
16 => 16,
);
-#line 133 "smarty_internal_configfileparser.y"
+#line 132 "smarty_internal_configfileparser.y"
function yy_r0(){ $this->_retvalue = null; }
-#line 653 "smarty_internal_configfileparser.php"
-#line 136 "smarty_internal_configfileparser.y"
+#line 652 "smarty_internal_configfileparser.php"
+#line 135 "smarty_internal_configfileparser.y"
function yy_r1(){ $this->add_global_vars($this->yystack[$this->yyidx + 0]->minor); $this->_retvalue = null; }
-#line 656 "smarty_internal_configfileparser.php"
-#line 142 "smarty_internal_configfileparser.y"
+#line 655 "smarty_internal_configfileparser.php"
+#line 141 "smarty_internal_configfileparser.y"
function yy_r4(){ $this->add_section_vars($this->yystack[$this->yyidx + -3]->minor, $this->yystack[$this->yyidx + 0]->minor); $this->_retvalue = null; }
-#line 659 "smarty_internal_configfileparser.php"
-#line 143 "smarty_internal_configfileparser.y"
+#line 658 "smarty_internal_configfileparser.php"
+#line 142 "smarty_internal_configfileparser.y"
function yy_r5(){ if ($this->smarty->config_read_hidden) { $this->add_section_vars($this->yystack[$this->yyidx + -3]->minor, $this->yystack[$this->yyidx + 0]->minor); } $this->_retvalue = null; }
-#line 662 "smarty_internal_configfileparser.php"
-#line 146 "smarty_internal_configfileparser.y"
+#line 661 "smarty_internal_configfileparser.php"
+#line 145 "smarty_internal_configfileparser.y"
function yy_r6(){ $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor; }
-#line 665 "smarty_internal_configfileparser.php"
-#line 147 "smarty_internal_configfileparser.y"
+#line 664 "smarty_internal_configfileparser.php"
+#line 146 "smarty_internal_configfileparser.y"
function yy_r7(){ $this->_retvalue = array_merge($this->yystack[$this->yyidx + -1]->minor, Array($this->yystack[$this->yyidx + 0]->minor)); }
-#line 668 "smarty_internal_configfileparser.php"
-#line 148 "smarty_internal_configfileparser.y"
+#line 667 "smarty_internal_configfileparser.php"
+#line 147 "smarty_internal_configfileparser.y"
function yy_r8(){ $this->_retvalue = Array(); }
-#line 671 "smarty_internal_configfileparser.php"
-#line 152 "smarty_internal_configfileparser.y"
+#line 670 "smarty_internal_configfileparser.php"
+#line 151 "smarty_internal_configfileparser.y"
function yy_r9(){ $this->_retvalue = Array("key" => $this->yystack[$this->yyidx + -2]->minor, "value" => $this->yystack[$this->yyidx + 0]->minor); }
-#line 674 "smarty_internal_configfileparser.php"
-#line 154 "smarty_internal_configfileparser.y"
+#line 673 "smarty_internal_configfileparser.php"
+#line 153 "smarty_internal_configfileparser.y"
function yy_r10(){ $this->_retvalue = (float) $this->yystack[$this->yyidx + 0]->minor; }
-#line 677 "smarty_internal_configfileparser.php"
-#line 155 "smarty_internal_configfileparser.y"
+#line 676 "smarty_internal_configfileparser.php"
+#line 154 "smarty_internal_configfileparser.y"
function yy_r11(){ $this->_retvalue = (int) $this->yystack[$this->yyidx + 0]->minor; }
-#line 680 "smarty_internal_configfileparser.php"
-#line 156 "smarty_internal_configfileparser.y"
+#line 679 "smarty_internal_configfileparser.php"
+#line 155 "smarty_internal_configfileparser.y"
function yy_r12(){ $this->_retvalue = $this->parse_bool($this->yystack[$this->yyidx + 0]->minor); }
-#line 683 "smarty_internal_configfileparser.php"
-#line 157 "smarty_internal_configfileparser.y"
+#line 682 "smarty_internal_configfileparser.php"
+#line 156 "smarty_internal_configfileparser.y"
function yy_r13(){ $this->_retvalue = self::parse_single_quoted_string($this->yystack[$this->yyidx + 0]->minor); }
-#line 686 "smarty_internal_configfileparser.php"
-#line 158 "smarty_internal_configfileparser.y"
+#line 685 "smarty_internal_configfileparser.php"
+#line 157 "smarty_internal_configfileparser.y"
function yy_r14(){ $this->_retvalue = self::parse_double_quoted_string($this->yystack[$this->yyidx + 0]->minor); }
-#line 689 "smarty_internal_configfileparser.php"
-#line 159 "smarty_internal_configfileparser.y"
+#line 688 "smarty_internal_configfileparser.php"
+#line 158 "smarty_internal_configfileparser.y"
function yy_r15(){ $this->_retvalue = self::parse_tripple_double_quoted_string($this->yystack[$this->yyidx + 0]->minor); }
-#line 692 "smarty_internal_configfileparser.php"
-#line 160 "smarty_internal_configfileparser.y"
+#line 691 "smarty_internal_configfileparser.php"
+#line 159 "smarty_internal_configfileparser.y"
function yy_r16(){ $this->_retvalue = $this->yystack[$this->yyidx + 0]->minor; }
-#line 695 "smarty_internal_configfileparser.php"
+#line 694 "smarty_internal_configfileparser.php"
private $_retvalue;
function yy_syntax_error($yymajor, $TOKEN)
{
-#line 120 "smarty_internal_configfileparser.y"
+#line 119 "smarty_internal_configfileparser.y"
$this->internalError = true;
$this->yymajor = $yymajor;
$this->compiler->trigger_config_file_error();
-#line 758 "smarty_internal_configfileparser.php"
+#line 757 "smarty_internal_configfileparser.php"
}
function yy_accept()
while ($this->yyidx >= 0) {
$stack = $this->yy_pop_parser_stack();
}
-#line 112 "smarty_internal_configfileparser.y"
+#line 111 "smarty_internal_configfileparser.y"
$this->successful = !$this->internalError;
$this->internalError = false;
$this->retvalue = $this->_retvalue;
//echo $this->retvalue."\n\n";
-#line 776 "smarty_internal_configfileparser.php"
+#line 775 "smarty_internal_configfileparser.php"
}
function doParse($yymajor, $yytokenvalue)
} while ($yymajor != self::YYNOCODE && $this->yyidx >= 0);
}
}
-
?>
\ No newline at end of file
diff --git a/gosa-core/include/smarty/sysplugins/smarty_internal_data.php b/gosa-core/include/smarty/sysplugins/smarty_internal_data.php
index 1781882711f291c20b341d73bf621de0f0417eee..609376ecb67898a997ef5c03c88b6fa26703f9e0 100644 (file)
$_ptr = $this;
} while ($_ptr !== null) {
foreach ($_ptr->tpl_vars AS $key => $var) {
- $_result[$key] = $var->value;
+ if (!array_key_exists($key, $_result)) {
+ $_result[$key] = $var->value;
+ }
}
// not found, try at parent
if ($search_parents) {
}
if ($search_parents && isset(Smarty::$global_tpl_vars)) {
foreach (Smarty::$global_tpl_vars AS $key => $var) {
- $_result[$key] = $var->value;
+ if (!array_key_exists($key, $_result)) {
+ $_result[$key] = $var->value;
+ }
}
}
return $_result;
diff --git a/gosa-core/include/smarty/sysplugins/smarty_internal_get_include_path.php b/gosa-core/include/smarty/sysplugins/smarty_internal_get_include_path.php
--- /dev/null
@@ -0,0 +1,44 @@
+<?php\r
+\r
+/**\r
+ * Smarty read include path plugin\r
+ * \r
+ * @package Smarty\r
+ * @subpackage PluginsInternal\r
+ * @author Monte Ohrt \r
+ */\r
+\r
+/**\r
+ * Smarty Internal Read Include Path Class\r
+ */\r
+class Smarty_Internal_Get_Include_Path {\r
+ /**\r
+ * Return full file path from PHP include_path\r
+ * \r
+ * @param string $filepath filepath\r
+ * @return mixed full filepath or false\r
+ */\r
+ public static function getIncludePath($filepath)\r
+ {\r
+ static $_path_array = null;\r
+\r
+ if(!isset($_path_array)) {\r
+ $_ini_include_path = ini_get('include_path');\r
+\r
+ if(strstr($_ini_include_path,';')) {\r
+ // windows pathnames\r
+ $_path_array = explode(';',$_ini_include_path);\r
+ } else {\r
+ $_path_array = explode(':',$_ini_include_path);\r
+ }\r
+ }\r
+ foreach ($_path_array as $_include_path) {\r
+ if (file_exists($_include_path . DS . $filepath)) {\r
+ return $_include_path . DS . $filepath;\r
+ }\r
+ }\r
+ return false;\r
+ } \r
+} \r
+\r
+?>
\ No newline at end of file
diff --git a/gosa-core/include/smarty/sysplugins/smarty_internal_register.php b/gosa-core/include/smarty/sysplugins/smarty_internal_register.php
index aee61584047b261317d9813cd1fd9cc1829b64da..edaa7ff130d21fc4f0aee4eadf19f591a0b77f5b 100644 (file)
} 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;
- }
+ $this->smarty->registered_plugins[$type][$tag] = array($callback, (bool) $cacheable, (array) $cache_attr);
}
}
diff --git a/gosa-core/include/smarty/sysplugins/smarty_internal_template.php b/gosa-core/include/smarty/sysplugins/smarty_internal_template.php
index d361b4c61149ed1bd4a15e21a4e17bcebfd85121..070fb840d72408c5a1c20bec36778499828f123e 100644 (file)
}
if ($this->smarty->debugging) {
Smarty_Internal_Debug::end_compile($this);
- }
+ }
+ // release objects to free memory
+ Smarty_Internal_TemplateCompilerBase::$_tag_objects = array();
+ unset($this->compiler_object->parser->root_buffer,
+ $this->compiler_object->parser->current_buffer,
+ $this->compiler_object->parser,
+ $this->compiler_object->lex,
+ $this->compiler_object->template,
+ $this->compiler_object
+ );
}
/**
{
if ($file == null) {
$file = $this->resource_name;
- }
- foreach((array)$this->smarty->template_dir as $_template_dir) {
- if (strpos('/\\', substr($_template_dir, -1)) === false) {
- $_template_dir .= DS;
- }
-
- $_filepath = $_template_dir . $file;
- if (file_exists($_filepath))
- return $_filepath;
- }
- if (file_exists($file)) return $file;
+ }
+ // relative file name?
+ if (!preg_match('/^([\/\\\\]|[a-zA-Z]:[\/\\\\])/', $file)) {
+ foreach((array)$this->smarty->template_dir as $_template_dir) {
+ if (strpos('/\\', substr($_template_dir, -1)) === false) {
+ $_template_dir .= DS;
+ }
+ $_filepath = $_template_dir . $file;
+ if (file_exists($_filepath)) {
+ return $_filepath;
+ }
+ if (!preg_match('/^([\/\\\\]|[a-zA-Z]:[\/\\\\])/', $_template_dir)) {
+ // try PHP include_path
+ if (($_filepath = Smarty_Internal_Get_Include_Path::getIncludePath($_filepath)) !== false) {
+ return $_filepath;
+ }
+ }
+ }
+ }
+ // try absolute filepath
+ if (file_exists($file)) return $file;
// no tpl file found
if (!empty($this->smarty->default_template_handler_func)) {
if (!is_callable($this->smarty->default_template_handler_func)) {
}
/**
- * creates a loacal Smarty variable for array assignments
+ * creates a local Smarty variable for array assignments
*/
public function createLocalArrayVariable($tpl_var, $nocache = false, $scope = Smarty::SCOPE_LOCAL)
{
{
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;
+ return iterator_count($value);
}
} elseif ($value instanceof PDOStatement) {
return $value->rowCount();
diff --git a/gosa-core/include/smarty/sysplugins/smarty_internal_templatecompilerbase.php b/gosa-core/include/smarty/sysplugins/smarty_internal_templatecompilerbase.php
index 38d612e0ad19ff7820e3e073cf1a943a3acbc473..76cec5dc188b708bb5bb50043df64cc34e06d0d3 100644 (file)
{\r
$this->nocache_hash = str_replace('.', '-', uniqid(rand(), true));\r
} \r
- // abstract function doCompile($_content);\r
+\r
/**\r
* Methode to compile a Smarty template\r
* \r
if ($plugin_type == Smarty::PLUGIN_BLOCK && $this->smarty->loadPlugin('smarty_compiler_' . $tag)) {\r
$plugin = 'smarty_compiler_' . $tag;\r
if (is_callable($plugin)) {\r
- return $plugin($args, $this->smarty);\r
+ // convert arguments format for old compiler plugins\r
+ $new_args = array();\r
+ foreach ($args as $mixed) {\r
+ $new_args = array_merge($new_args, $mixed);\r
+ } \r
+ return $plugin($new_args, $this->smarty);\r
} \r
if (class_exists($plugin, false)) {\r
$plugin_object = new $plugin;\r
($this->nocache || $this->tag_nocache || $this->template->forceNocache == 2)) {\r
$this->template->has_nocache_code = true;\r
$_output = str_replace("'", "\'", $content);\r
+ $_output = str_replace("^#^", "'", $_output);\r
$_output = "<?php echo '/*%%SmartyNocache:{$this->nocache_hash}%%*/" . $_output . "/*/%%SmartyNocache:{$this->nocache_hash}%%*/';?>"; \r
// make sure we include modifer plugins for nocache code\r
if (isset($this->template->saved_modifier)) {\r
diff --git a/gosa-core/include/smarty/sysplugins/smarty_internal_templatelexer.php b/gosa-core/include/smarty/sysplugins/smarty_internal_templatelexer.php
index 2210aba045000027d8292c66b5cb97b7b171a4db..5e0e496a380debc59d4d96ba371a30c898034f8d 100644 (file)
function __construct($data,$compiler)
{
- // set instance object
- self::instance($this);
// $this->data = preg_replace("/(\r\n|\r|\n)/", "\n", $data);
$this->data = $data;
$this->counter = 0;
$this->smarty_token_names['LDEL'] = $this->smarty->left_delimiter;
$this->smarty_token_names['RDEL'] = $this->smarty->right_delimiter;
}
- public static function &instance($new_instance = null)
- {
- static $instance = null;
- if (isset($new_instance) && is_object($new_instance))
- $instance = $new_instance;
- return $instance;
- }
-
private $_yy_state = 1;
22 => 0,
23 => 2,
26 => 0,
+ 27 => 0,
);
if ($this->counter >= strlen($this->data)) {
return false; // end of input
}
- $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]+)/";
+ $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]+)|^(.)/iS";
do {
if (preg_match($yy_global_pattern, substr($this->data, $this->counter), $yymatches)) {
function yy_r1_26($yy_subpatterns)
{
+ $this->token = Smarty_Internal_Templateparser::TP_OTHER;
+ }
+ function yy_r1_27($yy_subpatterns)
+ {
+
$this->token = Smarty_Internal_Templateparser::TP_OTHER;
}
10 => 0,
11 => 0,
12 => 0,
- 13 => 1,
- 15 => 1,
- 17 => 1,
+ 13 => 0,
+ 14 => 0,
+ 15 => 0,
+ 16 => 0,
+ 17 => 0,
+ 18 => 0,
19 => 0,
- 20 => 0,
- 21 => 0,
+ 20 => 1,
22 => 1,
24 => 1,
- 26 => 1,
- 28 => 1,
- 30 => 1,
- 32 => 1,
- 34 => 1,
- 36 => 1,
- 38 => 1,
- 40 => 1,
- 42 => 1,
- 44 => 0,
- 45 => 0,
- 46 => 0,
+ 26 => 0,
+ 27 => 0,
+ 28 => 0,
+ 29 => 0,
+ 30 => 0,
+ 31 => 0,
+ 32 => 0,
+ 33 => 0,
+ 34 => 0,
+ 35 => 0,
+ 36 => 0,
+ 37 => 0,
+ 38 => 0,
+ 39 => 0,
+ 40 => 0,
+ 41 => 0,
+ 42 => 0,
+ 43 => 3,
47 => 0,
48 => 0,
49 => 0,
51 => 0,
52 => 0,
53 => 0,
- 54 => 3,
- 58 => 0,
+ 54 => 0,
+ 55 => 1,
+ 57 => 1,
59 => 0,
60 => 0,
61 => 0,
63 => 0,
64 => 0,
65 => 0,
- 66 => 1,
- 68 => 1,
+ 66 => 0,
+ 67 => 0,
+ 68 => 0,
+ 69 => 0,
70 => 0,
71 => 0,
72 => 0,
74 => 0,
75 => 0,
76 => 0,
- 77 => 0,
- 78 => 0,
- 79 => 0,
- 80 => 0,
- 81 => 0,
- 82 => 0,
- 83 => 0,
- 84 => 0,
- 85 => 0,
- 86 => 0,
- 87 => 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*)|^(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\\s+)|^(\\s+to\\s+)|^(\\s+step\\s+)|^(\\s+instanceof\\s+)|^(\\s*===\\s*)|^(\\s*!==\\s*)|^(\\s*==\\s*|\\s+eq\\s+)|^(\\s*!=\\s*|\\s*<>\\s*|\\s+(ne|neq)\\s+)|^(\\s*>=\\s*|\\s+(ge|gte)\\s+)|^(\\s*<=\\s*|\\s+(le|lte)\\s+)|^(\\s*>\\s*|\\s+gt\\s+)|^(\\s*<\\s*|\\s+lt\\s+)|^(\\s+mod\\s+)|^(!\\s*|not\\s+)|^(\\s*&&\\s*|\\s*and\\s+)|^(\\s*\\|\\|\\s*|\\s*or\\s+)|^(\\s*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+)|^(.)/iS";
do {
if (preg_match($yy_global_pattern, substr($this->data, $this->counter), $yymatches)) {
$this->token = Smarty_Internal_Templateparser::TP_AS;
}
- function yy_r2_15($yy_subpatterns)
+ function yy_r2_14($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_TO;
}
- function yy_r2_17($yy_subpatterns)
+ function yy_r2_15($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_STEP;
}
- function yy_r2_19($yy_subpatterns)
+ function yy_r2_16($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_INSTANCEOF;
}
- function yy_r2_20($yy_subpatterns)
+ function yy_r2_17($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_IDENTITY;
}
- function yy_r2_21($yy_subpatterns)
+ function yy_r2_18($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_NONEIDENTITY;
}
- function yy_r2_22($yy_subpatterns)
+ function yy_r2_19($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_EQUALS;
}
- function yy_r2_24($yy_subpatterns)
+ function yy_r2_20($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_NOTEQUALS;
}
- function yy_r2_26($yy_subpatterns)
+ function yy_r2_22($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_GREATEREQUAL;
}
- function yy_r2_28($yy_subpatterns)
+ function yy_r2_24($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_LESSEQUAL;
}
- function yy_r2_30($yy_subpatterns)
+ function yy_r2_26($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_GREATERTHAN;
}
- function yy_r2_32($yy_subpatterns)
+ function yy_r2_27($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_LESSTHAN;
}
- function yy_r2_34($yy_subpatterns)
+ function yy_r2_28($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_MOD;
}
- function yy_r2_36($yy_subpatterns)
+ function yy_r2_29($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_NOT;
}
- function yy_r2_38($yy_subpatterns)
+ function yy_r2_30($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_LAND;
}
- function yy_r2_40($yy_subpatterns)
+ function yy_r2_31($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_LOR;
}
- function yy_r2_42($yy_subpatterns)
+ function yy_r2_32($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_LXOR;
}
- function yy_r2_44($yy_subpatterns)
+ function yy_r2_33($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_ISODDBY;
}
- function yy_r2_45($yy_subpatterns)
+ function yy_r2_34($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_ISNOTODDBY;
}
- function yy_r2_46($yy_subpatterns)
+ function yy_r2_35($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_ISODD;
}
- function yy_r2_47($yy_subpatterns)
+ function yy_r2_36($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_ISNOTODD;
}
- function yy_r2_48($yy_subpatterns)
+ function yy_r2_37($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_ISEVENBY;
}
- function yy_r2_49($yy_subpatterns)
+ function yy_r2_38($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_ISNOTEVENBY;
}
- function yy_r2_50($yy_subpatterns)
+ function yy_r2_39($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_ISEVEN;
}
- function yy_r2_51($yy_subpatterns)
+ function yy_r2_40($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_ISNOTEVEN;
}
- function yy_r2_52($yy_subpatterns)
+ function yy_r2_41($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_ISDIVBY;
}
- function yy_r2_53($yy_subpatterns)
+ function yy_r2_42($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_ISNOTDIVBY;
}
- function yy_r2_54($yy_subpatterns)
+ function yy_r2_43($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_TYPECAST;
}
- function yy_r2_58($yy_subpatterns)
+ function yy_r2_47($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_OPENP;
}
- function yy_r2_59($yy_subpatterns)
+ function yy_r2_48($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_CLOSEP;
}
- function yy_r2_60($yy_subpatterns)
+ function yy_r2_49($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_OPENB;
}
- function yy_r2_61($yy_subpatterns)
+ function yy_r2_50($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_CLOSEB;
}
- function yy_r2_62($yy_subpatterns)
+ function yy_r2_51($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_PTR;
}
- function yy_r2_63($yy_subpatterns)
+ function yy_r2_52($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_APTR;
}
- function yy_r2_64($yy_subpatterns)
+ function yy_r2_53($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_EQUAL;
}
- function yy_r2_65($yy_subpatterns)
+ function yy_r2_54($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_INCDEC;
}
- function yy_r2_66($yy_subpatterns)
+ function yy_r2_55($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_UNIMATH;
}
- function yy_r2_68($yy_subpatterns)
+ function yy_r2_57($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_MATH;
}
- function yy_r2_70($yy_subpatterns)
+ function yy_r2_59($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_DOLLAR;
}
- function yy_r2_71($yy_subpatterns)
+ function yy_r2_60($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_SEMICOLON;
}
- function yy_r2_72($yy_subpatterns)
+ function yy_r2_61($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_DOUBLECOLON;
}
- function yy_r2_73($yy_subpatterns)
+ function yy_r2_62($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_COLON;
}
- function yy_r2_74($yy_subpatterns)
+ function yy_r2_63($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_AT;
}
- function yy_r2_75($yy_subpatterns)
+ function yy_r2_64($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_HATCH;
}
- function yy_r2_76($yy_subpatterns)
+ function yy_r2_65($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_QUOTE;
$this->yypushstate(self::DOUBLEQUOTEDSTRING);
}
- function yy_r2_77($yy_subpatterns)
+ function yy_r2_66($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_BACKTICK;
$this->yypopstate();
}
- function yy_r2_78($yy_subpatterns)
+ function yy_r2_67($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_VERT;
}
- function yy_r2_79($yy_subpatterns)
+ function yy_r2_68($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_DOT;
}
- function yy_r2_80($yy_subpatterns)
+ function yy_r2_69($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_COMMA;
}
- function yy_r2_81($yy_subpatterns)
+ function yy_r2_70($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_ANDSYM;
}
- function yy_r2_82($yy_subpatterns)
+ function yy_r2_71($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_QMARK;
}
- function yy_r2_83($yy_subpatterns)
+ function yy_r2_72($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_HEX;
}
- function yy_r2_84($yy_subpatterns)
+ function yy_r2_73($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_ID;
}
- function yy_r2_85($yy_subpatterns)
+ function yy_r2_74($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_INTEGER;
}
- function yy_r2_86($yy_subpatterns)
+ function yy_r2_75($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_SPACE;
}
- function yy_r2_87($yy_subpatterns)
+ function yy_r2_76($yy_subpatterns)
{
$this->token = Smarty_Internal_Templateparser::TP_OTHER;
if ($this->counter >= strlen($this->data)) {
return false; // end of input
}
- $yy_global_pattern = "/^(".$this->ldel."\\s*literal\\s*".$this->rdel.")|^(".$this->ldel."\\s*\/literal\\s*".$this->rdel.")|^([\t ]*[\r\n]+[\t ]*)|^(<\\?(?:php\\w+|=|[a-zA-Z]+)?)|^(\\?>)|^(<%)|^(%>)|^(([\S\s]*?)(?=([\t ]*[\r\n]+[\t ]*|".$this->ldel."\/?literal".$this->rdel."|<\\?|<%)))|^([\S\s]+)/";
+ $yy_global_pattern = "/^(".$this->ldel."\\s*literal\\s*".$this->rdel.")|^(".$this->ldel."\\s*\/literal\\s*".$this->rdel.")|^([\t ]*[\r\n]+[\t ]*)|^(<\\?(?:php\\w+|=|[a-zA-Z]+)?)|^(\\?>)|^(<%)|^(%>)|^(([\S\s]*?)(?=([\t ]*[\r\n]+[\t ]*|".$this->ldel."\/?literal".$this->rdel."|<\\?|<%)))|^(.)/iS";
do {
if (preg_match($yy_global_pattern, substr($this->data, $this->counter), $yymatches)) {
12 => 0,
13 => 3,
17 => 0,
+ 18 => 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,})|^(".$this->ldel."\/)|^(".$this->ldel.")|^(\")|^(`\\$)|^(\\$[0-9]*[a-zA-Z_]\\w*)|^(\\$)|^(([^\"\\\\]*?)((?:\\\\.[^\"\\\\]*?)*?)(?=(".$this->ldel."|\\$|`\\$|\")))|^([\S\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,})|^(".$this->ldel."\/)|^(".$this->ldel.")|^(\")|^(`\\$)|^(\\$[0-9]*[a-zA-Z_]\\w*)|^(\\$)|^(([^\"\\\\]*?)((?:\\\\.[^\"\\\\]*?)*?)(?=(".$this->ldel."|\\$|`\\$|\")))|^([\S\s]+)|^(.)/iS";
do {
if (preg_match($yy_global_pattern, substr($this->data, $this->counter), $yymatches)) {
function yy_r4_17($yy_subpatterns)
{
+ $this->token = Smarty_Internal_Templateparser::TP_OTHER;
+ }
+ function yy_r4_18($yy_subpatterns)
+ {
+
$this->token = Smarty_Internal_Templateparser::TP_OTHER;
}
diff --git a/gosa-core/include/smarty/sysplugins/smarty_internal_templateparser.php b/gosa-core/include/smarty/sysplugins/smarty_internal_templateparser.php
index 342d2bea77fcc5dd648067ca1bc1c7a9816446bb..90e1c9762bc30037155475a57450c44c026396d2 100644 (file)
private $internalError = false;
function __construct($lex, $compiler) {
- // set instance object
- self::instance($this);
$this->lex = $lex;
$this->compiler = $compiler;
$this->smarty = $this->compiler->smarty;
@@ -116,27 +114,18 @@ class Smarty_Internal_Templateparser#line 79 "smarty_internal_templateparser.php
$this->asp_tags = (ini_get('asp_tags') != '0');
$this->current_buffer = $this->root_buffer = new _smarty_template_buffer($this);
}
- public static function &instance($new_instance = null)
- {
- static $instance = null;
- if (isset($new_instance) && is_object($new_instance))
- $instance = $new_instance;
- return $instance;
- }
public static function escape_start_tag($tag_text) {
$tag = preg_replace('/\A<\?(.*)\z/', '<<?php ?>?\1', $tag_text, -1 , $count); //Escape tag
- assert($tag !== false && $count === 1);
return $tag;
}
public static function escape_end_tag($tag_text) {
- assert($tag_text === '?>');
return '?<?php ?>>';
}
-#line 132 "smarty_internal_templateparser.php"
+#line 121 "smarty_internal_templateparser.php"
const TP_VERT = 1;
const TP_COLON = 2;
while ($this->yyidx >= 0) {
$this->yy_pop_parser_stack();
}
-#line 84 "smarty_internal_templateparser.y"
+#line 73 "smarty_internal_templateparser.y"
$this->internalError = true;
$this->compiler->trigger_template_error("Stack overflow in template parser");
-#line 1742 "smarty_internal_templateparser.php"
+#line 1731 "smarty_internal_templateparser.php"
return;
}
$yytos = new TP_yyStackEntry;
196 => 196,
198 => 198,
);
-#line 95 "smarty_internal_templateparser.y"
+#line 84 "smarty_internal_templateparser.y"
function yy_r0(){ $this->_retvalue = $this->root_buffer->to_smarty_php(); }
-#line 2166 "smarty_internal_templateparser.php"
-#line 101 "smarty_internal_templateparser.y"
+#line 2155 "smarty_internal_templateparser.php"
+#line 90 "smarty_internal_templateparser.y"
function yy_r1(){ $this->current_buffer->append_subtree($this->yystack[$this->yyidx + 0]->minor); }
-#line 2169 "smarty_internal_templateparser.php"
-#line 113 "smarty_internal_templateparser.y"
+#line 2158 "smarty_internal_templateparser.php"
+#line 102 "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();
$this->compiler->has_variable_string = false;
$this->block_nesting_level = count($this->compiler->_tag_stack);
}
-#line 2181 "smarty_internal_templateparser.php"
-#line 125 "smarty_internal_templateparser.y"
+#line 2170 "smarty_internal_templateparser.php"
+#line 114 "smarty_internal_templateparser.y"
function yy_r5(){ $this->_retvalue = new _smarty_tag($this, ''); }
-#line 2184 "smarty_internal_templateparser.php"
-#line 128 "smarty_internal_templateparser.y"
+#line 2173 "smarty_internal_templateparser.php"
+#line 117 "smarty_internal_templateparser.y"
function yy_r6(){ $this->_retvalue = new _smarty_text($this, $this->yystack[$this->yyidx + 0]->minor); }
-#line 2187 "smarty_internal_templateparser.php"
-#line 131 "smarty_internal_templateparser.y"
+#line 2176 "smarty_internal_templateparser.php"
+#line 120 "smarty_internal_templateparser.y"
function yy_r7(){
if ($this->php_handling == Smarty::PHP_PASSTHRU) {
$this->_retvalue = new _smarty_text($this, self::escape_start_tag($this->yystack[$this->yyidx + 0]->minor));
$this->_retvalue = new _smarty_text($this, '');
}
}
-#line 2200 "smarty_internal_templateparser.php"
-#line 143 "smarty_internal_templateparser.y"
+#line 2189 "smarty_internal_templateparser.php"
+#line 132 "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, '');
}
}
-#line 2216 "smarty_internal_templateparser.php"
-#line 159 "smarty_internal_templateparser.y"
+#line 2205 "smarty_internal_templateparser.php"
+#line 148 "smarty_internal_templateparser.y"
function yy_r9(){
if ($this->php_handling == Smarty::PHP_PASSTHRU) {
$this->_retvalue = new _smarty_text($this, '<<?php ?>%');
}
}
}
-#line 2237 "smarty_internal_templateparser.php"
-#line 180 "smarty_internal_templateparser.y"
+#line 2226 "smarty_internal_templateparser.php"
+#line 169 "smarty_internal_templateparser.y"
function yy_r10(){
if ($this->php_handling == Smarty::PHP_PASSTHRU) {
$this->_retvalue = new _smarty_text($this, '%<?php ?>>');
}
}
}
-#line 2258 "smarty_internal_templateparser.php"
-#line 200 "smarty_internal_templateparser.y"
+#line 2247 "smarty_internal_templateparser.php"
+#line 189 "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 2266 "smarty_internal_templateparser.php"
-#line 208 "smarty_internal_templateparser.y"
+#line 2255 "smarty_internal_templateparser.php"
+#line 197 "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("<?php echo '<?xml';?>", $this->compiler, true)); }
-#line 2269 "smarty_internal_templateparser.php"
-#line 211 "smarty_internal_templateparser.y"
+#line 2258 "smarty_internal_templateparser.php"
+#line 200 "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 2277 "smarty_internal_templateparser.php"
-#line 217 "smarty_internal_templateparser.y"
+#line 2266 "smarty_internal_templateparser.php"
+#line 206 "smarty_internal_templateparser.y"
function yy_r14(){
$this->_retvalue = new _smarty_linebreak($this, $this->yystack[$this->yyidx + 0]->minor);
}
-#line 2282 "smarty_internal_templateparser.php"
-#line 222 "smarty_internal_templateparser.y"
+#line 2271 "smarty_internal_templateparser.php"
+#line 211 "smarty_internal_templateparser.y"
function yy_r15(){ $this->_retvalue = ''; }
-#line 2285 "smarty_internal_templateparser.php"
-#line 223 "smarty_internal_templateparser.y"
+#line 2274 "smarty_internal_templateparser.php"
+#line 212 "smarty_internal_templateparser.y"
function yy_r16(){ $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor; }
-#line 2288 "smarty_internal_templateparser.php"
-#line 225 "smarty_internal_templateparser.y"
+#line 2277 "smarty_internal_templateparser.php"
+#line 214 "smarty_internal_templateparser.y"
function yy_r17(){ $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor; }
-#line 2291 "smarty_internal_templateparser.php"
-#line 228 "smarty_internal_templateparser.y"
+#line 2280 "smarty_internal_templateparser.php"
+#line 217 "smarty_internal_templateparser.y"
function yy_r19(){ $this->_retvalue = $this->yystack[$this->yyidx + 0]->minor; }
-#line 2294 "smarty_internal_templateparser.php"
-#line 230 "smarty_internal_templateparser.y"
+#line 2283 "smarty_internal_templateparser.php"
+#line 219 "smarty_internal_templateparser.y"
function yy_r21(){ $this->_retvalue = self::escape_start_tag($this->yystack[$this->yyidx + 0]->minor); }
-#line 2297 "smarty_internal_templateparser.php"
-#line 232 "smarty_internal_templateparser.y"
+#line 2286 "smarty_internal_templateparser.php"
+#line 221 "smarty_internal_templateparser.y"
function yy_r23(){ $this->_retvalue = self::escape_end_tag($this->yystack[$this->yyidx + 0]->minor); }
-#line 2300 "smarty_internal_templateparser.php"
-#line 233 "smarty_internal_templateparser.y"
+#line 2289 "smarty_internal_templateparser.php"
+#line 222 "smarty_internal_templateparser.y"
function yy_r24(){ $this->_retvalue = '<<?php ?>%'; }
-#line 2303 "smarty_internal_templateparser.php"
-#line 234 "smarty_internal_templateparser.y"
+#line 2292 "smarty_internal_templateparser.php"
+#line 223 "smarty_internal_templateparser.y"
function yy_r25(){ $this->_retvalue = '%<?php ?>>'; }
-#line 2306 "smarty_internal_templateparser.php"
-#line 242 "smarty_internal_templateparser.y"
+#line 2295 "smarty_internal_templateparser.php"
+#line 231 "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 2309 "smarty_internal_templateparser.php"
-#line 243 "smarty_internal_templateparser.y"
+#line 2298 "smarty_internal_templateparser.php"
+#line 232 "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 2312 "smarty_internal_templateparser.php"
-#line 245 "smarty_internal_templateparser.y"
+#line 2301 "smarty_internal_templateparser.php"
+#line 234 "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 2315 "smarty_internal_templateparser.php"
-#line 253 "smarty_internal_templateparser.y"
+#line 2304 "smarty_internal_templateparser.php"
+#line 242 "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 2318 "smarty_internal_templateparser.php"
-#line 255 "smarty_internal_templateparser.y"
+#line 2307 "smarty_internal_templateparser.php"
+#line 244 "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 2321 "smarty_internal_templateparser.php"
-#line 256 "smarty_internal_templateparser.y"
+#line 2310 "smarty_internal_templateparser.php"
+#line 245 "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 2324 "smarty_internal_templateparser.php"
-#line 258 "smarty_internal_templateparser.y"
+#line 2313 "smarty_internal_templateparser.php"
+#line 247 "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 2327 "smarty_internal_templateparser.php"
-#line 259 "smarty_internal_templateparser.y"
+#line 2316 "smarty_internal_templateparser.php"
+#line 248 "smarty_internal_templateparser.y"
function yy_r36(){ $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -1]->minor,array()); }
-#line 2330 "smarty_internal_templateparser.php"
-#line 261 "smarty_internal_templateparser.y"
+#line 2319 "smarty_internal_templateparser.php"
+#line 250 "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 2333 "smarty_internal_templateparser.php"
-#line 263 "smarty_internal_templateparser.y"
+#line 2322 "smarty_internal_templateparser.php"
+#line 252 "smarty_internal_templateparser.y"
function yy_r38(){ $this->_retvalue = '<?php ob_start();?>'.$this->compiler->compileTag($this->yystack[$this->yyidx + -3]->minor,$this->yystack[$this->yyidx + -1]->minor).'<?php echo ';
$this->_retvalue .= $this->compiler->compileTag('private_modifier',array(),array('modifierlist'=>$this->yystack[$this->yyidx + -2]->minor,'value'=>'ob_get_clean()')).'?>';
}
-#line 2338 "smarty_internal_templateparser.php"
-#line 267 "smarty_internal_templateparser.y"
+#line 2327 "smarty_internal_templateparser.php"
+#line 256 "smarty_internal_templateparser.y"
function yy_r39(){ $this->_retvalue = '<?php ob_start();?>'.$this->compiler->compileTag($this->yystack[$this->yyidx + -5]->minor,$this->yystack[$this->yyidx + -1]->minor,array('object_methode'=>$this->yystack[$this->yyidx + -3]->minor)).'<?php echo ';
$this->_retvalue .= $this->compiler->compileTag('private_modifier',array(),array('modifierlist'=>$this->yystack[$this->yyidx + -2]->minor,'value'=>'ob_get_clean()')).'?>';
}
-#line 2343 "smarty_internal_templateparser.php"
-#line 271 "smarty_internal_templateparser.y"
+#line 2332 "smarty_internal_templateparser.php"
+#line 260 "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 2346 "smarty_internal_templateparser.php"
-#line 272 "smarty_internal_templateparser.y"
+#line 2335 "smarty_internal_templateparser.php"
+#line 261 "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 2349 "smarty_internal_templateparser.php"
-#line 276 "smarty_internal_templateparser.y"
+#line 2338 "smarty_internal_templateparser.php"
+#line 265 "smarty_internal_templateparser.y"
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 2353 "smarty_internal_templateparser.php"
-#line 279 "smarty_internal_templateparser.y"
+#line 2342 "smarty_internal_templateparser.php"
+#line 268 "smarty_internal_templateparser.y"
function yy_r45(){ $this->_retvalue = '='.$this->yystack[$this->yyidx + 0]->minor; }
-#line 2356 "smarty_internal_templateparser.php"
-#line 280 "smarty_internal_templateparser.y"
+#line 2345 "smarty_internal_templateparser.php"
+#line 269 "smarty_internal_templateparser.y"
function yy_r46(){ $this->_retvalue = $this->yystack[$this->yyidx + 0]->minor; }
-#line 2359 "smarty_internal_templateparser.php"
-#line 281 "smarty_internal_templateparser.y"
+#line 2348 "smarty_internal_templateparser.php"
+#line 270 "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 2362 "smarty_internal_templateparser.php"
-#line 282 "smarty_internal_templateparser.y"
+#line 2351 "smarty_internal_templateparser.php"
+#line 271 "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 2365 "smarty_internal_templateparser.php"
-#line 284 "smarty_internal_templateparser.y"
+#line 2354 "smarty_internal_templateparser.php"
+#line 273 "smarty_internal_templateparser.y"
function yy_r49(){ $this->_retvalue = $this->compiler->compileTag('foreach',$this->yystack[$this->yyidx + -1]->minor); }
-#line 2368 "smarty_internal_templateparser.php"
-#line 286 "smarty_internal_templateparser.y"
+#line 2357 "smarty_internal_templateparser.php"
+#line 275 "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 2372 "smarty_internal_templateparser.php"
-#line 288 "smarty_internal_templateparser.y"
+#line 2361 "smarty_internal_templateparser.php"
+#line 277 "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 2376 "smarty_internal_templateparser.php"
-#line 290 "smarty_internal_templateparser.y"
+#line 2365 "smarty_internal_templateparser.php"
+#line 279 "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 2380 "smarty_internal_templateparser.php"
-#line 292 "smarty_internal_templateparser.y"
+#line 2369 "smarty_internal_templateparser.php"
+#line 281 "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 2384 "smarty_internal_templateparser.php"
-#line 296 "smarty_internal_templateparser.y"
+#line 2373 "smarty_internal_templateparser.php"
+#line 285 "smarty_internal_templateparser.y"
function yy_r54(){ $this->_retvalue = SMARTY_INTERNAL_COMPILE_BLOCK::compileChildBlock($this->compiler); }
-#line 2387 "smarty_internal_templateparser.php"
-#line 300 "smarty_internal_templateparser.y"
+#line 2376 "smarty_internal_templateparser.php"
+#line 289 "smarty_internal_templateparser.y"
function yy_r55(){ $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -1]->minor.'close',array()); }
-#line 2390 "smarty_internal_templateparser.php"
-#line 302 "smarty_internal_templateparser.y"
+#line 2379 "smarty_internal_templateparser.php"
+#line 291 "smarty_internal_templateparser.y"
function yy_r56(){ $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -2]->minor.'close',array(),array('modifier_list'=>$this->yystack[$this->yyidx + -1]->minor));
}
-#line 2394 "smarty_internal_templateparser.php"
-#line 305 "smarty_internal_templateparser.y"
+#line 2383 "smarty_internal_templateparser.php"
+#line 294 "smarty_internal_templateparser.y"
function yy_r57(){ $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -3]->minor.'close',array(),array('object_methode'=>$this->yystack[$this->yyidx + -1]->minor)); }
-#line 2397 "smarty_internal_templateparser.php"
-#line 306 "smarty_internal_templateparser.y"
+#line 2386 "smarty_internal_templateparser.php"
+#line 295 "smarty_internal_templateparser.y"
function yy_r58(){ $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -4]->minor.'close',array(),array('object_methode'=>$this->yystack[$this->yyidx + -2]->minor, 'modifier_list'=>$this->yystack[$this->yyidx + -1]->minor)); }
-#line 2400 "smarty_internal_templateparser.php"
-#line 312 "smarty_internal_templateparser.y"
+#line 2389 "smarty_internal_templateparser.php"
+#line 301 "smarty_internal_templateparser.y"
function yy_r59(){ $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor; $this->_retvalue[] = $this->yystack[$this->yyidx + 0]->minor; }
-#line 2403 "smarty_internal_templateparser.php"
-#line 314 "smarty_internal_templateparser.y"
+#line 2392 "smarty_internal_templateparser.php"
+#line 303 "smarty_internal_templateparser.y"
function yy_r60(){ $this->_retvalue = array($this->yystack[$this->yyidx + 0]->minor); }
-#line 2406 "smarty_internal_templateparser.php"
-#line 316 "smarty_internal_templateparser.y"
+#line 2395 "smarty_internal_templateparser.php"
+#line 305 "smarty_internal_templateparser.y"
function yy_r61(){ $this->_retvalue = array(); }
-#line 2409 "smarty_internal_templateparser.php"
-#line 319 "smarty_internal_templateparser.y"
+#line 2398 "smarty_internal_templateparser.php"
+#line 308 "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)) {
$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 2419 "smarty_internal_templateparser.php"
-#line 327 "smarty_internal_templateparser.y"
+#line 2408 "smarty_internal_templateparser.php"
+#line 316 "smarty_internal_templateparser.y"
function yy_r63(){ $this->_retvalue = array($this->yystack[$this->yyidx + -2]->minor=>$this->yystack[$this->yyidx + 0]->minor); }
-#line 2422 "smarty_internal_templateparser.php"
-#line 329 "smarty_internal_templateparser.y"
+#line 2411 "smarty_internal_templateparser.php"
+#line 318 "smarty_internal_templateparser.y"
function yy_r65(){ $this->_retvalue = "'".$this->yystack[$this->yyidx + 0]->minor."'"; }
-#line 2425 "smarty_internal_templateparser.php"
-#line 332 "smarty_internal_templateparser.y"
+#line 2414 "smarty_internal_templateparser.php"
+#line 321 "smarty_internal_templateparser.y"
function yy_r68(){$this->_retvalue = array($this->yystack[$this->yyidx + -2]->minor=>$this->yystack[$this->yyidx + 0]->minor); }
-#line 2428 "smarty_internal_templateparser.php"
-#line 339 "smarty_internal_templateparser.y"
+#line 2417 "smarty_internal_templateparser.php"
+#line 328 "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 2431 "smarty_internal_templateparser.php"
-#line 341 "smarty_internal_templateparser.y"
+#line 2420 "smarty_internal_templateparser.php"
+#line 330 "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 2434 "smarty_internal_templateparser.php"
-#line 343 "smarty_internal_templateparser.y"
+#line 2423 "smarty_internal_templateparser.php"
+#line 332 "smarty_internal_templateparser.y"
function yy_r73(){ $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor; }
-#line 2437 "smarty_internal_templateparser.php"
-#line 354 "smarty_internal_templateparser.y"
+#line 2426 "smarty_internal_templateparser.php"
+#line 343 "smarty_internal_templateparser.y"
function yy_r76(){$this->_retvalue = '$_smarty_tpl->getStreamVariable(\''. $this->yystack[$this->yyidx + -2]->minor .'://'. $this->yystack[$this->yyidx + 0]->minor . '\')'; }
-#line 2440 "smarty_internal_templateparser.php"
-#line 356 "smarty_internal_templateparser.y"
+#line 2429 "smarty_internal_templateparser.php"
+#line 345 "smarty_internal_templateparser.y"
function yy_r77(){ $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor . trim($this->yystack[$this->yyidx + -1]->minor) . $this->yystack[$this->yyidx + 0]->minor; }
-#line 2443 "smarty_internal_templateparser.php"
-#line 362 "smarty_internal_templateparser.y"
+#line 2432 "smarty_internal_templateparser.php"
+#line 351 "smarty_internal_templateparser.y"
function yy_r80(){$this->_retvalue = $this->yystack[$this->yyidx + 0]->minor; }
-#line 2446 "smarty_internal_templateparser.php"
-#line 365 "smarty_internal_templateparser.y"
+#line 2435 "smarty_internal_templateparser.php"
+#line 354 "smarty_internal_templateparser.y"
function yy_r81(){ $this->_retvalue = $this->compiler->compileTag('private_modifier',array(),array('value'=>$this->yystack[$this->yyidx + -1]->minor,'modifierlist'=>$this->yystack[$this->yyidx + 0]->minor)); }
-#line 2449 "smarty_internal_templateparser.php"
-#line 369 "smarty_internal_templateparser.y"
+#line 2438 "smarty_internal_templateparser.php"
+#line 358 "smarty_internal_templateparser.y"
function yy_r82(){$this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.$this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor; }
-#line 2452 "smarty_internal_templateparser.php"
-#line 370 "smarty_internal_templateparser.y"
+#line 2441 "smarty_internal_templateparser.php"
+#line 359 "smarty_internal_templateparser.y"
function yy_r83(){$this->_retvalue = 'in_array('.$this->yystack[$this->yyidx + -2]->minor.','.$this->yystack[$this->yyidx + 0]->minor.')'; }
-#line 2455 "smarty_internal_templateparser.php"
-#line 371 "smarty_internal_templateparser.y"
+#line 2444 "smarty_internal_templateparser.php"
+#line 360 "smarty_internal_templateparser.y"
function yy_r84(){$this->_retvalue = 'in_array('.$this->yystack[$this->yyidx + -2]->minor.',(array)'.$this->yystack[$this->yyidx + 0]->minor.')'; }
-#line 2458 "smarty_internal_templateparser.php"
-#line 373 "smarty_internal_templateparser.y"
+#line 2447 "smarty_internal_templateparser.php"
+#line 362 "smarty_internal_templateparser.y"
function yy_r86(){$this->_retvalue = '!('.$this->yystack[$this->yyidx + -2]->minor.' % '.$this->yystack[$this->yyidx + 0]->minor.')'; }
-#line 2461 "smarty_internal_templateparser.php"
-#line 374 "smarty_internal_templateparser.y"
+#line 2450 "smarty_internal_templateparser.php"
+#line 363 "smarty_internal_templateparser.y"
function yy_r87(){$this->_retvalue = '('.$this->yystack[$this->yyidx + -2]->minor.' % '.$this->yystack[$this->yyidx + 0]->minor.')'; }
-#line 2464 "smarty_internal_templateparser.php"
-#line 375 "smarty_internal_templateparser.y"
+#line 2453 "smarty_internal_templateparser.php"
+#line 364 "smarty_internal_templateparser.y"
function yy_r88(){$this->_retvalue = '!(1 & '.$this->yystack[$this->yyidx + -1]->minor.')'; }
-#line 2467 "smarty_internal_templateparser.php"
-#line 376 "smarty_internal_templateparser.y"
+#line 2456 "smarty_internal_templateparser.php"
+#line 365 "smarty_internal_templateparser.y"
function yy_r89(){$this->_retvalue = '(1 & '.$this->yystack[$this->yyidx + -1]->minor.')'; }
-#line 2470 "smarty_internal_templateparser.php"
-#line 377 "smarty_internal_templateparser.y"
+#line 2459 "smarty_internal_templateparser.php"
+#line 366 "smarty_internal_templateparser.y"
function yy_r90(){$this->_retvalue = '!(1 & '.$this->yystack[$this->yyidx + -2]->minor.' / '.$this->yystack[$this->yyidx + 0]->minor.')'; }
-#line 2473 "smarty_internal_templateparser.php"
-#line 378 "smarty_internal_templateparser.y"
+#line 2462 "smarty_internal_templateparser.php"
+#line 367 "smarty_internal_templateparser.y"
function yy_r91(){$this->_retvalue = '(1 & '.$this->yystack[$this->yyidx + -2]->minor.' / '.$this->yystack[$this->yyidx + 0]->minor.')'; }
-#line 2476 "smarty_internal_templateparser.php"
-#line 384 "smarty_internal_templateparser.y"
+#line 2465 "smarty_internal_templateparser.php"
+#line 373 "smarty_internal_templateparser.y"
function yy_r97(){$this->prefix_number++; $this->compiler->prefix_code[] = '<?php $_tmp'.$this->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 2479 "smarty_internal_templateparser.php"
-#line 390 "smarty_internal_templateparser.y"
+#line 2468 "smarty_internal_templateparser.php"
+#line 379 "smarty_internal_templateparser.y"
function yy_r98(){ $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 2482 "smarty_internal_templateparser.php"
-#line 391 "smarty_internal_templateparser.y"
+#line 2471 "smarty_internal_templateparser.php"
+#line 380 "smarty_internal_templateparser.y"
function yy_r99(){ $this->_retvalue = $this->yystack[$this->yyidx + -5]->minor.' ? '.$this->yystack[$this->yyidx + -2]->minor.' : '.$this->yystack[$this->yyidx + 0]->minor; }
-#line 2485 "smarty_internal_templateparser.php"
-#line 398 "smarty_internal_templateparser.y"
+#line 2474 "smarty_internal_templateparser.php"
+#line 387 "smarty_internal_templateparser.y"
function yy_r102(){ $this->_retvalue = '!'.$this->yystack[$this->yyidx + 0]->minor; }
-#line 2488 "smarty_internal_templateparser.php"
-#line 404 "smarty_internal_templateparser.y"
+#line 2477 "smarty_internal_templateparser.php"
+#line 393 "smarty_internal_templateparser.y"
function yy_r107(){ $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.'.'.$this->yystack[$this->yyidx + 0]->minor; }
-#line 2491 "smarty_internal_templateparser.php"
-#line 405 "smarty_internal_templateparser.y"
+#line 2480 "smarty_internal_templateparser.php"
+#line 394 "smarty_internal_templateparser.y"
function yy_r108(){ $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor.'.'; }
-#line 2494 "smarty_internal_templateparser.php"
-#line 406 "smarty_internal_templateparser.y"
+#line 2483 "smarty_internal_templateparser.php"
+#line 395 "smarty_internal_templateparser.y"
function yy_r109(){ $this->_retvalue = '.'.$this->yystack[$this->yyidx + 0]->minor; }
-#line 2497 "smarty_internal_templateparser.php"
-#line 408 "smarty_internal_templateparser.y"
+#line 2486 "smarty_internal_templateparser.php"
+#line 397 "smarty_internal_templateparser.y"
function yy_r110(){ 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 = 'null';
} else
$this->_retvalue = "'".$this->yystack[$this->yyidx + 0]->minor."'"; }
-#line 2507 "smarty_internal_templateparser.php"
-#line 419 "smarty_internal_templateparser.y"
+#line 2496 "smarty_internal_templateparser.php"
+#line 408 "smarty_internal_templateparser.y"
function yy_r112(){ $this->_retvalue = "(". $this->yystack[$this->yyidx + -1]->minor .")"; }
-#line 2510 "smarty_internal_templateparser.php"
-#line 425 "smarty_internal_templateparser.y"
+#line 2499 "smarty_internal_templateparser.php"
+#line 414 "smarty_internal_templateparser.y"
function yy_r115(){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;
$this->compiler->trigger_template_error ("static class '".$this->yystack[$this->yyidx + -2]->minor."' is undefined or not allowed by security setting");
}
}
-#line 2522 "smarty_internal_templateparser.php"
-#line 435 "smarty_internal_templateparser.y"
+#line 2511 "smarty_internal_templateparser.php"
+#line 424 "smarty_internal_templateparser.y"
function yy_r116(){ 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 2526 "smarty_internal_templateparser.php"
-#line 438 "smarty_internal_templateparser.y"
+#line 2515 "smarty_internal_templateparser.php"
+#line 427 "smarty_internal_templateparser.y"
function yy_r117(){ $this->prefix_number++; $this->compiler->prefix_code[] = '<?php ob_start();?>'.$this->yystack[$this->yyidx + 0]->minor.'<?php $_tmp'.$this->prefix_number.'=ob_get_clean();?>'; $this->_retvalue = '$_tmp'.$this->prefix_number; }
-#line 2529 "smarty_internal_templateparser.php"
-#line 448 "smarty_internal_templateparser.y"
+#line 2518 "smarty_internal_templateparser.php"
+#line 437 "smarty_internal_templateparser.y"
function yy_r119(){if ($this->yystack[$this->yyidx + 0]->minor['var'] == '\'smarty\'') {
$smarty_var = $this->compiler->compileTag('private_special_variable',array(),$this->yystack[$this->yyidx + 0]->minor['smarty_internal_index']);
$this->_retvalue = $smarty_var;
$this->compiler->tag_nocache=$this->compiler->tag_nocache|$this->template->getVariable(trim($this->yystack[$this->yyidx + 0]->minor['var'],"'"), null, true, false)->nocache;
}
}
-#line 2546 "smarty_internal_templateparser.php"
-#line 464 "smarty_internal_templateparser.y"
+#line 2535 "smarty_internal_templateparser.php"
+#line 453 "smarty_internal_templateparser.y"
function yy_r120(){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 2554 "smarty_internal_templateparser.php"
-#line 473 "smarty_internal_templateparser.y"
+#line 2543 "smarty_internal_templateparser.php"
+#line 462 "smarty_internal_templateparser.y"
function yy_r122(){$this->_retvalue = '$_smarty_tpl->getConfigVariable(\''. $this->yystack[$this->yyidx + -1]->minor .'\')'; }
-#line 2557 "smarty_internal_templateparser.php"
-#line 474 "smarty_internal_templateparser.y"
+#line 2546 "smarty_internal_templateparser.php"
+#line 463 "smarty_internal_templateparser.y"
function yy_r123(){$this->_retvalue = '$_smarty_tpl->getConfigVariable('. $this->yystack[$this->yyidx + -1]->minor .')'; }
-#line 2560 "smarty_internal_templateparser.php"
-#line 477 "smarty_internal_templateparser.y"
+#line 2549 "smarty_internal_templateparser.php"
+#line 466 "smarty_internal_templateparser.y"
function yy_r124(){$this->_retvalue = array('var'=>$this->yystack[$this->yyidx + -1]->minor, 'smarty_internal_index'=>$this->yystack[$this->yyidx + 0]->minor); }
-#line 2563 "smarty_internal_templateparser.php"
-#line 483 "smarty_internal_templateparser.y"
+#line 2552 "smarty_internal_templateparser.php"
+#line 472 "smarty_internal_templateparser.y"
function yy_r125(){$this->_retvalue = $this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor; }
-#line 2566 "smarty_internal_templateparser.php"
-#line 485 "smarty_internal_templateparser.y"
+#line 2555 "smarty_internal_templateparser.php"
+#line 474 "smarty_internal_templateparser.y"
function yy_r126(){return; }
-#line 2569 "smarty_internal_templateparser.php"
-#line 489 "smarty_internal_templateparser.y"
+#line 2558 "smarty_internal_templateparser.php"
+#line 478 "smarty_internal_templateparser.y"
function yy_r127(){ $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 2572 "smarty_internal_templateparser.php"
-#line 490 "smarty_internal_templateparser.y"
+#line 2561 "smarty_internal_templateparser.php"
+#line 479 "smarty_internal_templateparser.y"
function yy_r128(){ $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 2575 "smarty_internal_templateparser.php"
-#line 491 "smarty_internal_templateparser.y"
+#line 2564 "smarty_internal_templateparser.php"
+#line 480 "smarty_internal_templateparser.y"
function yy_r129(){ $this->_retvalue = "['". $this->yystack[$this->yyidx + 0]->minor ."']"; }
-#line 2578 "smarty_internal_templateparser.php"
-#line 492 "smarty_internal_templateparser.y"
+#line 2567 "smarty_internal_templateparser.php"
+#line 481 "smarty_internal_templateparser.y"
function yy_r130(){ $this->_retvalue = "[". $this->yystack[$this->yyidx + 0]->minor ."]"; }
-#line 2581 "smarty_internal_templateparser.php"
-#line 493 "smarty_internal_templateparser.y"
+#line 2570 "smarty_internal_templateparser.php"
+#line 482 "smarty_internal_templateparser.y"
function yy_r131(){ $this->_retvalue = "[". $this->yystack[$this->yyidx + -1]->minor ."]"; }
-#line 2584 "smarty_internal_templateparser.php"
-#line 495 "smarty_internal_templateparser.y"
+#line 2573 "smarty_internal_templateparser.php"
+#line 484 "smarty_internal_templateparser.y"
function yy_r132(){ $this->_retvalue = '['.$this->compiler->compileTag('private_special_variable',array(),'[\'section\'][\''.$this->yystack[$this->yyidx + -1]->minor.'\'][\'index\']').']'; }
-#line 2587 "smarty_internal_templateparser.php"
-#line 496 "smarty_internal_templateparser.y"
+#line 2576 "smarty_internal_templateparser.php"
+#line 485 "smarty_internal_templateparser.y"
function yy_r133(){ $this->_retvalue = '['.$this->compiler->compileTag('private_special_variable',array(),'[\'section\'][\''.$this->yystack[$this->yyidx + -3]->minor.'\'][\''.$this->yystack[$this->yyidx + -1]->minor.'\']').']'; }
-#line 2590 "smarty_internal_templateparser.php"
-#line 500 "smarty_internal_templateparser.y"
+#line 2579 "smarty_internal_templateparser.php"
+#line 489 "smarty_internal_templateparser.y"
function yy_r135(){$this->_retvalue = '[]'; }
-#line 2593 "smarty_internal_templateparser.php"
-#line 508 "smarty_internal_templateparser.y"
+#line 2582 "smarty_internal_templateparser.php"
+#line 497 "smarty_internal_templateparser.y"
function yy_r137(){$this->_retvalue = $this->yystack[$this->yyidx + -1]->minor.'.'.$this->yystack[$this->yyidx + 0]->minor; }
-#line 2596 "smarty_internal_templateparser.php"
-#line 510 "smarty_internal_templateparser.y"
+#line 2585 "smarty_internal_templateparser.php"
+#line 499 "smarty_internal_templateparser.y"
function yy_r138(){$this->_retvalue = '\''.$this->yystack[$this->yyidx + 0]->minor.'\''; }
-#line 2599 "smarty_internal_templateparser.php"
-#line 512 "smarty_internal_templateparser.y"
+#line 2588 "smarty_internal_templateparser.php"
+#line 501 "smarty_internal_templateparser.y"
function yy_r139(){$this->_retvalue = '('.$this->yystack[$this->yyidx + -1]->minor.')'; }
-#line 2602 "smarty_internal_templateparser.php"
-#line 517 "smarty_internal_templateparser.y"
+#line 2591 "smarty_internal_templateparser.php"
+#line 506 "smarty_internal_templateparser.y"
function yy_r140(){ 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 2606 "smarty_internal_templateparser.php"
-#line 520 "smarty_internal_templateparser.y"
+#line 2595 "smarty_internal_templateparser.php"
+#line 509 "smarty_internal_templateparser.y"
function yy_r141(){$this->_retvalue = $this->yystack[$this->yyidx + 0]->minor; }
-#line 2609 "smarty_internal_templateparser.php"
-#line 522 "smarty_internal_templateparser.y"
+#line 2598 "smarty_internal_templateparser.php"
+#line 511 "smarty_internal_templateparser.y"
function yy_r142(){$this->_retvalue = $this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor; }
-#line 2612 "smarty_internal_templateparser.php"
-#line 524 "smarty_internal_templateparser.y"
+#line 2601 "smarty_internal_templateparser.php"
+#line 513 "smarty_internal_templateparser.y"
function yy_r143(){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 2619 "smarty_internal_templateparser.php"
-#line 529 "smarty_internal_templateparser.y"
+#line 2608 "smarty_internal_templateparser.php"
+#line 518 "smarty_internal_templateparser.y"
function yy_r144(){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 2626 "smarty_internal_templateparser.php"
-#line 534 "smarty_internal_templateparser.y"
+#line 2615 "smarty_internal_templateparser.php"
+#line 523 "smarty_internal_templateparser.y"
function yy_r145(){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 2633 "smarty_internal_templateparser.php"
-#line 539 "smarty_internal_templateparser.y"
+#line 2622 "smarty_internal_templateparser.php"
+#line 528 "smarty_internal_templateparser.y"
function yy_r146(){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 2640 "smarty_internal_templateparser.php"
-#line 545 "smarty_internal_templateparser.y"
+#line 2629 "smarty_internal_templateparser.php"
+#line 534 "smarty_internal_templateparser.y"
function yy_r147(){ $this->_retvalue = '->'.$this->yystack[$this->yyidx + 0]->minor; }
-#line 2643 "smarty_internal_templateparser.php"
-#line 551 "smarty_internal_templateparser.y"
+#line 2632 "smarty_internal_templateparser.php"
+#line 540 "smarty_internal_templateparser.y"
function yy_r148(){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)) {
$func_name = strtolower($this->yystack[$this->yyidx + -3]->minor);
}
}
}
-#line 2671 "smarty_internal_templateparser.php"
-#line 581 "smarty_internal_templateparser.y"
+#line 2660 "smarty_internal_templateparser.php"
+#line 570 "smarty_internal_templateparser.y"
function yy_r149(){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 . "(". implode(',',$this->yystack[$this->yyidx + -1]->minor) .")";
}
-#line 2678 "smarty_internal_templateparser.php"
-#line 586 "smarty_internal_templateparser.y"
+#line 2667 "smarty_internal_templateparser.php"
+#line 575 "smarty_internal_templateparser.y"
function yy_r150(){if ($this->security) {
$this->compiler->trigger_template_error (self::Err2);
}
$this->prefix_number++; $this->compiler->prefix_code[] = '<?php $_tmp'.$this->prefix_number.'=$_smarty_tpl->getVariable(\''. $this->yystack[$this->yyidx + -3]->minor .'\')->value;?>'; $this->_retvalue = '$_tmp'.$this->prefix_number.'('. implode(',',$this->yystack[$this->yyidx + -1]->minor) .')';
}
-#line 2685 "smarty_internal_templateparser.php"
-#line 594 "smarty_internal_templateparser.y"
+#line 2674 "smarty_internal_templateparser.php"
+#line 583 "smarty_internal_templateparser.y"
function yy_r151(){ $this->_retvalue = array_merge($this->yystack[$this->yyidx + -2]->minor,array($this->yystack[$this->yyidx + 0]->minor)); }
-#line 2688 "smarty_internal_templateparser.php"
-#line 603 "smarty_internal_templateparser.y"
+#line 2677 "smarty_internal_templateparser.php"
+#line 592 "smarty_internal_templateparser.y"
function yy_r154(){$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 2691 "smarty_internal_templateparser.php"
-#line 604 "smarty_internal_templateparser.y"
+#line 2680 "smarty_internal_templateparser.php"
+#line 593 "smarty_internal_templateparser.y"
function yy_r155(){$this->_retvalue = array(array_merge($this->yystack[$this->yyidx + -1]->minor,$this->yystack[$this->yyidx + 0]->minor)); }
-#line 2694 "smarty_internal_templateparser.php"
-#line 607 "smarty_internal_templateparser.y"
+#line 2683 "smarty_internal_templateparser.php"
+#line 596 "smarty_internal_templateparser.y"
function yy_r157(){ $this->_retvalue = array($this->yystack[$this->yyidx + 0]->minor); }
-#line 2697 "smarty_internal_templateparser.php"
-#line 612 "smarty_internal_templateparser.y"
+#line 2686 "smarty_internal_templateparser.php"
+#line 601 "smarty_internal_templateparser.y"
function yy_r158(){ $this->_retvalue = array_merge($this->yystack[$this->yyidx + -1]->minor,$this->yystack[$this->yyidx + 0]->minor); }
-#line 2700 "smarty_internal_templateparser.php"
-#line 614 "smarty_internal_templateparser.y"
+#line 2689 "smarty_internal_templateparser.php"
+#line 603 "smarty_internal_templateparser.y"
function yy_r159(){$this->_retvalue = array(); }
-#line 2703 "smarty_internal_templateparser.php"
-#line 616 "smarty_internal_templateparser.y"
+#line 2692 "smarty_internal_templateparser.php"
+#line 605 "smarty_internal_templateparser.y"
function yy_r160(){$this->_retvalue = array($this->yystack[$this->yyidx + 0]->minor); }
-#line 2706 "smarty_internal_templateparser.php"
-#line 626 "smarty_internal_templateparser.y"
+#line 2695 "smarty_internal_templateparser.php"
+#line 615 "smarty_internal_templateparser.y"
function yy_r165(){ $this->_retvalue = '$'.$this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor; }
-#line 2709 "smarty_internal_templateparser.php"
-#line 628 "smarty_internal_templateparser.y"
+#line 2698 "smarty_internal_templateparser.php"
+#line 617 "smarty_internal_templateparser.y"
function yy_r166(){ $this->_retvalue = '$'.$this->yystack[$this->yyidx + -2]->minor.$this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor; }
-#line 2712 "smarty_internal_templateparser.php"
-#line 637 "smarty_internal_templateparser.y"
+#line 2701 "smarty_internal_templateparser.php"
+#line 626 "smarty_internal_templateparser.y"
function yy_r167(){$this->_retvalue = '=='; }
-#line 2715 "smarty_internal_templateparser.php"
-#line 638 "smarty_internal_templateparser.y"
+#line 2704 "smarty_internal_templateparser.php"
+#line 627 "smarty_internal_templateparser.y"
function yy_r168(){$this->_retvalue = '!='; }
-#line 2718 "smarty_internal_templateparser.php"
-#line 639 "smarty_internal_templateparser.y"
+#line 2707 "smarty_internal_templateparser.php"
+#line 628 "smarty_internal_templateparser.y"
function yy_r169(){$this->_retvalue = '>'; }
-#line 2721 "smarty_internal_templateparser.php"
-#line 640 "smarty_internal_templateparser.y"
+#line 2710 "smarty_internal_templateparser.php"
+#line 629 "smarty_internal_templateparser.y"
function yy_r170(){$this->_retvalue = '<'; }
-#line 2724 "smarty_internal_templateparser.php"
-#line 641 "smarty_internal_templateparser.y"
+#line 2713 "smarty_internal_templateparser.php"
+#line 630 "smarty_internal_templateparser.y"
function yy_r171(){$this->_retvalue = '>='; }
-#line 2727 "smarty_internal_templateparser.php"
-#line 642 "smarty_internal_templateparser.y"
+#line 2716 "smarty_internal_templateparser.php"
+#line 631 "smarty_internal_templateparser.y"
function yy_r172(){$this->_retvalue = '<='; }
-#line 2730 "smarty_internal_templateparser.php"
-#line 643 "smarty_internal_templateparser.y"
+#line 2719 "smarty_internal_templateparser.php"
+#line 632 "smarty_internal_templateparser.y"
function yy_r173(){$this->_retvalue = '==='; }
-#line 2733 "smarty_internal_templateparser.php"
-#line 644 "smarty_internal_templateparser.y"
+#line 2722 "smarty_internal_templateparser.php"
+#line 633 "smarty_internal_templateparser.y"
function yy_r174(){$this->_retvalue = '!=='; }
-#line 2736 "smarty_internal_templateparser.php"
-#line 645 "smarty_internal_templateparser.y"
+#line 2725 "smarty_internal_templateparser.php"
+#line 634 "smarty_internal_templateparser.y"
function yy_r175(){$this->_retvalue = '%'; }
-#line 2739 "smarty_internal_templateparser.php"
-#line 647 "smarty_internal_templateparser.y"
+#line 2728 "smarty_internal_templateparser.php"
+#line 636 "smarty_internal_templateparser.y"
function yy_r176(){$this->_retvalue = '&&'; }
-#line 2742 "smarty_internal_templateparser.php"
-#line 648 "smarty_internal_templateparser.y"
+#line 2731 "smarty_internal_templateparser.php"
+#line 637 "smarty_internal_templateparser.y"
function yy_r177(){$this->_retvalue = '||'; }
-#line 2745 "smarty_internal_templateparser.php"
-#line 649 "smarty_internal_templateparser.y"
+#line 2734 "smarty_internal_templateparser.php"
+#line 638 "smarty_internal_templateparser.y"
function yy_r178(){$this->_retvalue = ' XOR '; }
-#line 2748 "smarty_internal_templateparser.php"
-#line 654 "smarty_internal_templateparser.y"
+#line 2737 "smarty_internal_templateparser.php"
+#line 643 "smarty_internal_templateparser.y"
function yy_r179(){ $this->_retvalue = 'array('.$this->yystack[$this->yyidx + -1]->minor.')'; }
-#line 2751 "smarty_internal_templateparser.php"
-#line 656 "smarty_internal_templateparser.y"
+#line 2740 "smarty_internal_templateparser.php"
+#line 645 "smarty_internal_templateparser.y"
function yy_r181(){ $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.','.$this->yystack[$this->yyidx + 0]->minor; }
-#line 2754 "smarty_internal_templateparser.php"
-#line 657 "smarty_internal_templateparser.y"
+#line 2743 "smarty_internal_templateparser.php"
+#line 646 "smarty_internal_templateparser.y"
function yy_r182(){ return; }
-#line 2757 "smarty_internal_templateparser.php"
-#line 658 "smarty_internal_templateparser.y"
+#line 2746 "smarty_internal_templateparser.php"
+#line 647 "smarty_internal_templateparser.y"
function yy_r183(){ $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.'=>'.$this->yystack[$this->yyidx + 0]->minor; }
-#line 2760 "smarty_internal_templateparser.php"
-#line 659 "smarty_internal_templateparser.y"
+#line 2749 "smarty_internal_templateparser.php"
+#line 648 "smarty_internal_templateparser.y"
function yy_r184(){ $this->_retvalue = '\''.$this->yystack[$this->yyidx + -2]->minor.'\'=>'.$this->yystack[$this->yyidx + 0]->minor; }
-#line 2763 "smarty_internal_templateparser.php"
-#line 666 "smarty_internal_templateparser.y"
+#line 2752 "smarty_internal_templateparser.php"
+#line 655 "smarty_internal_templateparser.y"
function yy_r186(){ $this->_retvalue = "''"; }
-#line 2766 "smarty_internal_templateparser.php"
-#line 667 "smarty_internal_templateparser.y"
+#line 2755 "smarty_internal_templateparser.php"
+#line 656 "smarty_internal_templateparser.y"
function yy_r187(){ $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor->to_smarty_php(); }
-#line 2769 "smarty_internal_templateparser.php"
-#line 669 "smarty_internal_templateparser.y"
+#line 2758 "smarty_internal_templateparser.php"
+#line 658 "smarty_internal_templateparser.y"
function yy_r188(){ $this->yystack[$this->yyidx + -1]->minor->append_subtree($this->yystack[$this->yyidx + 0]->minor); $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor; }
-#line 2772 "smarty_internal_templateparser.php"
-#line 670 "smarty_internal_templateparser.y"
+#line 2761 "smarty_internal_templateparser.php"
+#line 659 "smarty_internal_templateparser.y"
function yy_r189(){ $this->_retvalue = new _smarty_doublequoted($this, $this->yystack[$this->yyidx + 0]->minor); }
-#line 2775 "smarty_internal_templateparser.php"
-#line 672 "smarty_internal_templateparser.y"
+#line 2764 "smarty_internal_templateparser.php"
+#line 661 "smarty_internal_templateparser.y"
function yy_r190(){ $this->_retvalue = new _smarty_code($this, $this->yystack[$this->yyidx + -1]->minor); }
-#line 2778 "smarty_internal_templateparser.php"
-#line 674 "smarty_internal_templateparser.y"
+#line 2767 "smarty_internal_templateparser.php"
+#line 663 "smarty_internal_templateparser.y"
function yy_r192(){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->compiler->tag_nocache = $this->compiler->tag_nocache | $this->template->getVariable(trim($this->yystack[$this->yyidx + 0]->minor,"'"), null, true, false)->nocache;
}
-#line 2787 "smarty_internal_templateparser.php"
-#line 682 "smarty_internal_templateparser.y"
+#line 2776 "smarty_internal_templateparser.php"
+#line 671 "smarty_internal_templateparser.y"
function yy_r194(){ $this->_retvalue = new _smarty_code($this, '('.$this->yystack[$this->yyidx + -1]->minor.')'); }
-#line 2790 "smarty_internal_templateparser.php"
-#line 683 "smarty_internal_templateparser.y"
+#line 2779 "smarty_internal_templateparser.php"
+#line 672 "smarty_internal_templateparser.y"
function yy_r195(){
$this->_retvalue = new _smarty_tag($this, $this->yystack[$this->yyidx + 0]->minor);
}
-#line 2795 "smarty_internal_templateparser.php"
-#line 686 "smarty_internal_templateparser.y"
+#line 2784 "smarty_internal_templateparser.php"
+#line 675 "smarty_internal_templateparser.y"
function yy_r196(){ $this->_retvalue = new _smarty_dq_content($this, $this->yystack[$this->yyidx + 0]->minor); }
-#line 2798 "smarty_internal_templateparser.php"
-#line 693 "smarty_internal_templateparser.y"
+#line 2787 "smarty_internal_templateparser.php"
+#line 682 "smarty_internal_templateparser.y"
function yy_r198(){$this->_retvalue = ''; }
-#line 2801 "smarty_internal_templateparser.php"
+#line 2790 "smarty_internal_templateparser.php"
private $_retvalue;
function yy_syntax_error($yymajor, $TOKEN)
{
-#line 77 "smarty_internal_templateparser.y"
+#line 66 "smarty_internal_templateparser.y"
$this->internalError = true;
$this->yymajor = $yymajor;
$this->compiler->trigger_template_error();
-#line 2864 "smarty_internal_templateparser.php"
+#line 2853 "smarty_internal_templateparser.php"
}
function yy_accept()
while ($this->yyidx >= 0) {
$stack = $this->yy_pop_parser_stack();
}
-#line 69 "smarty_internal_templateparser.y"
+#line 58 "smarty_internal_templateparser.y"
$this->successful = !$this->internalError;
$this->internalError = false;
$this->retvalue = $this->_retvalue;
//echo $this->retvalue."\n\n";
-#line 2882 "smarty_internal_templateparser.php"
+#line 2871 "smarty_internal_templateparser.php"
}
function doParse($yymajor, $yytokenvalue)
diff --git a/gosa-core/include/smarty/sysplugins/smarty_internal_utility.php b/gosa-core/include/smarty/sysplugins/smarty_internal_utility.php
index 3c64e58acb69621723d85e042ed5b57d5290a809..b532e4a1eaf147fae74c251109cc246765ba0f9e 100644 (file)
flush();
$_start_time = microtime(true);
try {
- $_tpl = $this->smarty->createTemplate($_template_file);
+ $_tpl = $this->smarty->createTemplate($_template_file,null,null,null,false);
if ($_tpl->mustCompile()) {
$_tpl->compileTemplateSource();
echo ' compiled in ', microtime(true) - $_start_time, ' seconds';
} else {
echo ' is up to date';
flush();
- }
- }
+ }
+ }
catch (Exception $e) {
echo 'Error: ', $e->getMessage(), "<br><br>";
$_error_count++;
}
+ // free memory
+ $this->smarty->template_objects = array();
+ $_tpl->smarty->template_objects = array();
+ $_tpl = null;
if ($max_errors !== null && $_error_count == $max_errors) {
echo '<br><br>too many errors';
exit();