From: cajus Date: Sat, 1 May 2010 17:48:30 +0000 (+0000) Subject: Updated smarty to 3.0rc1 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=a7778a7d839e8bee003e6d3d63fbb142c688c38f;p=gosa.git Updated smarty to 3.0rc1 git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18013 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/include/smarty/Smarty.class.php b/gosa-core/include/smarty/Smarty.class.php index 2d2ed357e..505f269fc 100644 --- a/gosa-core/include/smarty/Smarty.class.php +++ b/gosa-core/include/smarty/Smarty.class.php @@ -3,7 +3,7 @@ /** * Project: Smarty: the PHP compiling template engine * File: Smarty.class.php - * SVN: $Id: Smarty.class.php 3508 2010-02-26 12:58:36Z Uwe.Tews $ + * SVN: $Id: Smarty.class.php 3557 2010-04-28 20:30:27Z Uwe.Tews $ * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -108,7 +108,7 @@ if (SMARTY_SPL_AUTOLOAD && set_include_path(get_include_path() . PATH_SEPARATOR */ class Smarty extends Smarty_Internal_Data { // smarty version - const SMARTY_VERSION = 'Smarty3-b8'; + const SMARTY_VERSION = '3.0rc1'; // SVN Rev: 3286 // auto literal on delimiters with whitspace public $auto_literal = true; // display error on not assigned variables @@ -129,6 +129,8 @@ class Smarty extends Smarty_Internal_Data { public $force_compile = false; // check template for modifications? public $compile_check = true; + // locking concurrent compiles + public $compile_locking = true; // use sub dirs for compiled/cached files? public $use_sub_dirs = false; // compile_error? @@ -159,7 +161,7 @@ class Smarty extends Smarty_Internal_Data { public $direct_access_security = true; // debug mode public $debugging = false; - public $debugging_ctrl = 'URL'; + public $debugging_ctrl = 'NONE'; public $smarty_debug_id = 'SMARTY_DEBUG'; public $debug_tpl = null; // When set, smarty does uses this value as error_reporting-level. @@ -167,7 +169,7 @@ class Smarty extends Smarty_Internal_Data { // 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 = true; //Controls whether hidden config sections/vars are read from the file. // config vars public $config_vars = array(); // assigned tpl vars @@ -221,7 +223,8 @@ class Smarty extends Smarty_Internal_Data { // smarty object reference public $smarty = null; // block data at template inheritance - public $block_data = array(); + public $block_data = array(); + public $block_data_stack = array(); // block tag hierarchy public $_tag_stack = array(); // plugins @@ -310,6 +313,8 @@ class Smarty extends Smarty_Internal_Data { // get default Smarty data object $parent = $this; } + array_push($this->block_data_stack, $this->block_data); + $this->block_data = array(); // create template object if necessary ($template instanceof $this->template_class)? $_template = $template : $_template = $this->createTemplate ($template, $cache_id, $compile_id, $parent); @@ -326,7 +331,7 @@ class Smarty extends Smarty_Internal_Data { } // return redered template if (isset($this->autoload_filters['output']) || isset($this->registered_filters['output'])) { - $_output = Smarty_Internal_Filter_Handler::runFilter('output', $_template->getRenderedTemplate(), $this); + $_output = Smarty_Internal_Filter_Handler::runFilter('output', $_template->getRenderedTemplate(), $this, $_template); } else { $_output = $_template->getRenderedTemplate(); } @@ -352,9 +357,11 @@ class Smarty extends Smarty_Internal_Data { if ($this->debugging) { Smarty_Internal_Debug::display_debug($this); } + $this->block_data = array_pop($this->block_data_stack); return; } else { - // return fetched content + // return fetched content + $this->block_data = array_pop($this->block_data_stack); return $_output; } } @@ -466,7 +473,7 @@ class Smarty extends Smarty_Internal_Data { */ public function disableSecurity() { - $this->security = true; + $this->security = false; } /** @@ -707,7 +714,7 @@ class Smarty extends Smarty_Internal_Data { // Smarty 2 BC $this->_version = self::SMARTY_VERSION; return $this->_version; - } + } return null; } @@ -751,21 +758,6 @@ class Smarty extends Smarty_Internal_Data { $this->wrapper = new Smarty_Internal_Wrapper($this); } return $this->wrapper->convert($name, $args); - - /* - $name = strtolower($name); - if ($name == 'smarty') { - throw new Exception('Please use parent::__construct() to call parent constuctor'); - } - $function_name = 'smarty_method_' . $name; - if (!is_callable($function_name)) { - if (!file_exists(SMARTY_SYSPLUGINS_DIR . $function_name . '.php')) { - throw new Exception('Undefined Smarty method "' . $name . '"'); - } - require_once(SMARTY_SYSPLUGINS_DIR . $function_name . '.php'); - } - return call_user_func_array($function_name, array_merge(array($this), $args)); - */ } } diff --git a/gosa-core/include/smarty/plugins/function.html_options.php b/gosa-core/include/smarty/plugins/function.html_options.php index 69f56e801..85b05f7dc 100644 --- a/gosa-core/include/smarty/plugins/function.html_options.php +++ b/gosa-core/include/smarty/plugins/function.html_options.php @@ -98,7 +98,7 @@ function smarty_function_html_options($params, $smarty, $template) function smarty_function_html_options_optoutput($key, $value, $selected) { if (!is_array($value)) { - $_html_result = '