- Timestamp:
- 09/17/11 12:24:33 (8 months ago)
- Location:
- trunk/gui/include/Smarty
- Files:
-
- 8 edited
-
Smarty.class.php (modified) (6 diffs)
-
plugins/function.fetch.php (modified) (1 diff)
-
plugins/function.html_image.php (modified) (1 diff)
-
sysplugins/smarty_internal_compile_include.php (modified) (10 diffs)
-
sysplugins/smarty_internal_template.php (modified) (2 diffs)
-
sysplugins/smarty_internal_templatecompilerbase.php (modified) (3 diffs)
-
sysplugins/smarty_internal_utility.php (modified) (12 diffs)
-
sysplugins/smarty_internal_wrapper.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/include/Smarty/Smarty.class.php
r3850 r3894 4 4 * Project: Smarty: the PHP compiling template engine 5 5 * File: Smarty.class.php 6 * SVN: $Id: Smarty.class.php 4 074 2011-04-22 02:19:14Z uwe.tews@googlemail.com $6 * SVN: $Id: Smarty.class.php 4225 2011-07-26 18:09:31Z uwe.tews@googlemail.com $ 7 7 * 8 8 * This library is free software; you can redistribute it and/or … … 29 29 * @author Uwe Tews 30 30 * @package Smarty 31 * @version 3.0. 831 * @version 3.0.9 32 32 */ 33 33 … … 88 88 */ 89 89 // smarty version 90 const SMARTY_VERSION = 'Smarty-3.0. 8';90 const SMARTY_VERSION = 'Smarty-3.0.9'; 91 91 //define variable scopes 92 92 const SCOPE_LOCAL = 0; … … 237 237 // generate deprecated function call notices? 238 238 public $deprecation_notices = true; 239 // internal flag for getTags() 240 public $get_used_tags = false; 239 241 // Smarty 2 BC 240 242 public $_version = self::SMARTY_VERSION; … … 716 718 717 719 /** 720 * Return array of tag/attributes of all tags used by an template 721 * 722 * @param object $templae template object 723 * @return array of tag/attributes 724 */ 725 public function getTags(Smarty_Internal_Template $template) 726 { 727 return Smarty_Internal_Utility::getTags($template); 728 } 729 730 /** 718 731 * clean up properties on cloned object 719 732 */ … … 725 738 $this->tpl_vars = array(); 726 739 // clear objects for external methods 727 unset($this-> register);728 unset($this-> filter);740 unset($this->Register); 741 unset($this->Filter); 729 742 } 730 743 -
trunk/gui/include/Smarty/plugins/function.fetch.php
r3753 r3894 29 29 30 30 $content = ''; 31 if (isset($template->s ecurity_policy) && !preg_match('!^(http|ftp)://!i', $params['file'])) {32 if(!$template->s ecurity_policy->isTrustedResourceDir($params['file'])) {31 if (isset($template->smarty->security_policy) && !preg_match('!^(http|ftp)://!i', $params['file'])) { 32 if(!$template->smarty->security_policy->isTrustedResourceDir($params['file'])) { 33 33 return; 34 34 } -
trunk/gui/include/Smarty/plugins/function.html_image.php
r3753 r3894 107 107 } 108 108 } 109 if (isset($template->s ecurity_policy)) {110 if (!$template->s ecurity_policy->isTrustedResourceDir($_image_path)) {109 if (isset($template->smarty->security_policy)) { 110 if (!$template->smarty->security_policy->isTrustedResourceDir($_image_path)) { 111 111 return; 112 112 } -
trunk/gui/include/Smarty/sysplugins/smarty_internal_compile_include.php
r3850 r3894 3 3 /** 4 4 * Smarty Internal Plugin Compile Include 5 * 5 * 6 6 * Compiles the {include} tag 7 * 7 * 8 8 * @package Smarty 9 9 * @subpackage Compiler 10 * @author Uwe Tews 10 * @author Uwe Tews 11 11 */ 12 12 … … 21 21 public $shorttag_order = array('file'); 22 22 public $option_flags = array('nocache','inline','caching'); 23 public $optional_attributes = array('_any'); 23 public $optional_attributes = array('_any'); 24 24 25 25 /** 26 26 * Compiles code for the {include} tag 27 * 27 * 28 28 * @param array $args array with attributes from parser 29 29 * @param object $compiler compiler object … … 34 34 $this->compiler = $compiler; 35 35 // check and get attributes 36 $_attr = $this->_get_attributes($args); 36 $_attr = $this->_get_attributes($args); 37 37 // save posible attributes 38 38 $include_file = $_attr['file']; 39 39 $has_compiled_template = false; 40 if ($compiler->smarty->merge_compiled_includes || $_attr['inline'] === true) { 40 41 if (isset($_attr['assign'])) { 42 // output will be stored in a smarty variable instead of beind displayed 43 $_assign = $_attr['assign']; 44 } 45 46 $_parent_scope = Smarty::SCOPE_LOCAL; 47 if (isset($_attr['scope'])) { 48 $_attr['scope'] = trim($_attr['scope'], "'\""); 49 if ($_attr['scope'] == 'parent') { 50 $_parent_scope = Smarty::SCOPE_PARENT; 51 } elseif ($_attr['scope'] == 'root') { 52 $_parent_scope = Smarty::SCOPE_ROOT; 53 } elseif ($_attr['scope'] == 'global') { 54 $_parent_scope = Smarty::SCOPE_GLOBAL; 55 } 56 } 57 $_caching = 'null'; 58 if ($this->compiler->nocache || $this->compiler->tag_nocache) { 59 $_caching = Smarty::CACHING_OFF; 60 } 61 // default for included templates 62 if ($compiler->template->caching && !$this->compiler->nocache && !$this->compiler->tag_nocache) { 63 $_caching = self::CACHING_NOCACHE_CODE; 64 } 65 /* 66 * if the {include} tag provides individual parameter for caching 67 * it will not be included into the common cache file and treated like 68 * a nocache section 69 */ 70 if (isset($_attr['cache_lifetime'])) { 71 $_cache_lifetime = $_attr['cache_lifetime']; 72 $this->compiler->tag_nocache = true; 73 $_caching = Smarty::CACHING_LIFETIME_CURRENT; 74 } else { 75 $_cache_lifetime = 'null'; 76 } 77 if (isset($_attr['cache_id'])) { 78 $_cache_id = $_attr['cache_id']; 79 $this->compiler->tag_nocache = true; 80 $_caching = Smarty::CACHING_LIFETIME_CURRENT; 81 } else { 82 $_cache_id = '$_smarty_tpl->cache_id'; 83 } 84 if (isset($_attr['compile_id'])) { 85 $_compile_id = $_attr['compile_id']; 86 } else { 87 $_compile_id = '$_smarty_tpl->compile_id'; 88 } 89 if ($_attr['caching'] === true) { 90 $_caching = Smarty::CACHING_LIFETIME_CURRENT; 91 } 92 if ($_attr['nocache'] === true) { 93 $this->compiler->tag_nocache = true; 94 $_caching = Smarty::CACHING_OFF; 95 } 96 97 98 if (($compiler->smarty->merge_compiled_includes || $_attr['inline'] === true) && !($compiler->template->caching && ($this->compiler->tag_nocache || $this->compiler->nocache)) && $_caching != Smarty::CACHING_LIFETIME_CURRENT) { 41 99 // check if compiled code can be merged (contains no variable part) 42 100 if (!$compiler->has_variable_string && (substr_count($include_file, '"') == 2 or substr_count($include_file, "'") == 2) and substr_count($include_file, '(') == 0) { … … 50 108 // needs code for cached page but no cache file 51 109 $tpl->caching = self::CACHING_NOCACHE_CODE; 52 } 110 } 53 111 // if ($this->compiler->template->mustCompile) { 54 112 // make sure whole chain gest compiled 55 113 $tpl->mustCompile = true; 56 // } 114 // } 57 115 if ($tpl->resource_object->usesCompiler && $tpl->isExisting()) { 58 116 // get compiled code 59 $compiled_tpl = $tpl->getCompiledTemplate(); 117 $compiled_tpl = $tpl->getCompiledTemplate(); 60 118 // merge compiled code for {function} tags 61 $compiler->template->properties['function'] = array_merge($compiler->template->properties['function'], $tpl->properties['function']); 119 $compiler->template->properties['function'] = array_merge($compiler->template->properties['function'], $tpl->properties['function']); 62 120 // merge filedependency by evaluating header code 63 121 preg_match_all("/(<\?php \/\*%%SmartyHeaderCode:{$tpl->properties['nocache_hash']}%%\*\/(.+?)\/\*\/%%SmartyHeaderCode%%\*\/\?>\n)/s", $compiled_tpl, $result); … … 67 125 eval($result[2][0]); 68 126 $compiler->template->properties['nocache_hash'] = $saved_nocache_hash; 69 $compiler->template->has_nocache_code = $saved_has_nocache_code; 127 $compiler->template->has_nocache_code = $saved_has_nocache_code; 70 128 // remove header code 71 129 $compiled_tpl = preg_replace("/(<\?php \/\*%%SmartyHeaderCode:{$tpl->properties['nocache_hash']}%%\*\/(.+?)\/\*\/%%SmartyHeaderCode%%\*\/\?>\n)/s", '', $compiled_tpl); … … 74 132 $compiled_tpl = preg_replace("/{$tpl->properties['nocache_hash']}/", $compiler->template->properties['nocache_hash'], $compiled_tpl); 75 133 $compiler->template->has_nocache_code = true; 76 } 134 } 77 135 $has_compiled_template = true; 78 } 79 } 80 } 81 } 136 } 137 } 138 } 139 } 82 140 83 if (isset($_attr['assign'])) {84 // output will be stored in a smarty variable instead of beind displayed85 $_assign = $_attr['assign'];86 }87 88 $_parent_scope = Smarty::SCOPE_LOCAL;89 if (isset($_attr['scope'])) {90 $_attr['scope'] = trim($_attr['scope'], "'\"");91 if ($_attr['scope'] == 'parent') {92 $_parent_scope = Smarty::SCOPE_PARENT;93 } elseif ($_attr['scope'] == 'root') {94 $_parent_scope = Smarty::SCOPE_ROOT;95 } elseif ($_attr['scope'] == 'global') {96 $_parent_scope = Smarty::SCOPE_GLOBAL;97 }98 }99 $_caching = 'null';100 if ($this->compiler->nocache || $this->compiler->tag_nocache) {101 $_caching = Smarty::CACHING_OFF;102 }103 // default for included templates104 if ($compiler->template->caching && !$this->compiler->nocache && !$this->compiler->tag_nocache) {105 $_caching = self::CACHING_NOCACHE_CODE;106 }107 /*108 * if the {include} tag provides individual parameter for caching109 * it will not be included into the common cache file and treated like110 * a nocache section111 */112 if (isset($_attr['cache_lifetime'])) {113 $_cache_lifetime = $_attr['cache_lifetime'];114 $this->compiler->tag_nocache = true;115 $_caching = Smarty::CACHING_LIFETIME_CURRENT;116 } else {117 $_cache_lifetime = 'null';118 }119 if (isset($_attr['cache_id'])) {120 $_cache_id = $_attr['cache_id'];121 $this->compiler->tag_nocache = true;122 $_caching = Smarty::CACHING_LIFETIME_CURRENT;123 } else {124 $_cache_id = '$_smarty_tpl->cache_id';125 }126 if (isset($_attr['compile_id'])) {127 $_compile_id = $_attr['compile_id'];128 } else {129 $_compile_id = '$_smarty_tpl->compile_id';130 }131 if ($_attr['caching'] === true) {132 $_caching = Smarty::CACHING_LIFETIME_CURRENT;133 }134 if ($_attr['nocache'] === true) {135 $this->compiler->tag_nocache = true;136 $_caching = Smarty::CACHING_OFF;137 }138 141 // create template object 139 142 $_output = "<?php "; … … 141 144 $_output .= "\$sha = sha1($include_file . $_cache_id . $_compile_id);\n"; 142 145 $_output .= "if (isset(\$_smarty_tpl->smarty->template_objects[\$sha])) {\n"; 143 $_output .= "\$_template = \$_smarty_tpl->smarty->template_objects[\$sha]; \$_template-> caching = $_caching; \$_template->cache_lifetime = $_cache_lifetime;\n";146 $_output .= "\$_template = \$_smarty_tpl->smarty->template_objects[\$sha]; \$_template->parent = \$_smarty_tpl; \$_template->caching = $_caching; \$_template->cache_lifetime = $_cache_lifetime;\n"; 144 147 $_output .= "} else {\n"; 145 148 } … … 147 150 if ($_caching != 'null' && $_caching != Smarty::CACHING_OFF) { 148 151 $_output .= "}\n"; 149 } 152 } 150 153 // delete {include} standard attributes 151 unset($_attr['file'], $_attr['assign'], $_attr['cache_id'], $_attr['compile_id'], $_attr['cache_lifetime'], $_attr['nocache'], $_attr['caching'], $_attr['scope'], $_attr['inline']); 154 unset($_attr['file'], $_attr['assign'], $_attr['cache_id'], $_attr['compile_id'], $_attr['cache_lifetime'], $_attr['nocache'], $_attr['caching'], $_attr['scope'], $_attr['inline']); 152 155 // remaining attributes must be assigned as smarty variable 153 156 if (!empty($_attr)) { … … 156 159 foreach ($_attr as $_key => $_value) { 157 160 $_output .= "\$_template->assign('$_key',$_value);"; 158 } 161 } 159 162 } else { 160 163 $this->compiler->trigger_template_error('variable passing not allowed in parent/global scope', $this->compiler->lex->taglineno); 161 } 162 } 164 } 165 } 163 166 // was there an assign attribute 164 167 if (isset($_assign)) { 165 168 $_output .= "\$_smarty_tpl->assign($_assign,\$_template->getRenderedTemplate());?>"; 166 169 } else { 167 if ($has_compiled_template && !($compiler->template->caching && ($this->compiler->tag_nocache || $this->compiler->nocache))) {170 if ($has_compiled_template) { 168 171 $_output .= "\$_template->properties['nocache_hash'] = '{$compiler->template->properties['nocache_hash']}';\n"; 169 172 $_output .= "\$_tpl_stack[] = \$_smarty_tpl; \$_smarty_tpl = \$_template;?>\n"; … … 177 180 $_output .= "<?php \$_template->updateParentVariables($_parent_scope);?>"; 178 181 } 179 } 180 } 182 } 183 } 181 184 $_output .= "<?php unset(\$_template);?>"; 182 185 return $_output; 183 } 184 } 186 } 187 } 185 188 186 189 ?> -
trunk/gui/include/Smarty/sysplugins/smarty_internal_template.php
r3850 r3894 71 71 public $block_data = array(); 72 72 public $wrapper = null; 73 // optional log of tag/attributes 74 public $used_tags = array(); 73 75 /** 74 76 * Create template data object … … 651 653 foreach ($this->tpl_vars as $_key => $_variable) { 652 654 $_variable_scope = $this->tpl_vars[$_key]->scope; 653 if ( $scope == Smarty::SCOPE_LOCAL && $_variable_scope == Smarty::SCOPE_LOCAL) {655 if (($scope == Smarty::SCOPE_LOCAL && $_variable_scope == Smarty::SCOPE_LOCAL) || $_key == 'smarty') { 654 656 continue; 655 657 } -
trunk/gui/include/Smarty/sysplugins/smarty_internal_templatecompilerbase.php
r3850 r3894 24 24 // current template 25 25 public $template = null; 26 // optional log of tag/attributes27 public $used_tags = array();28 26 29 27 /** … … 115 113 // log tag/attributes 116 114 if (isset($this->smarty->get_used_tags) && $this->smarty->get_used_tags) { 117 $this-> used_tags[] = array($tag,$args);115 $this->template->used_tags[] = array($tag,$args); 118 116 } 119 117 // check nocache option flag … … 381 379 $_output = str_replace("'", "\'", $content); 382 380 $_output = str_replace("^#^", "'", $_output); 383 $_output = "<?php echo '/*%%SmartyNocache:{$this->nocache_hash}%%*/" . $_output . "/*/%%SmartyNocache:{$this->nocache_hash}%%*/';?> ";381 $_output = "<?php echo '/*%%SmartyNocache:{$this->nocache_hash}%%*/" . $_output . "/*/%%SmartyNocache:{$this->nocache_hash}%%*/';?>\n"; 384 382 // make sure we include modifer plugins for nocache code 385 383 if (isset($this->template->saved_modifier)) { -
trunk/gui/include/Smarty/sysplugins/smarty_internal_utility.php
r3850 r3894 5 5 * File: smarty_internal_utility.php 6 6 * SVN: $Id: $ 7 * 7 * 8 8 * This library is free software; you can redistribute it and/or 9 9 * modify it under the terms of the GNU Lesser General Public 10 10 * License as published by the Free Software Foundation; either 11 11 * version 2.1 of the License, or (at your option) any later version. 12 * 12 * 13 13 * This library is distributed in the hope that it will be useful, 14 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 16 * Lesser General Public License for more details. 17 * 17 * 18 18 * You should have received a copy of the GNU Lesser General Public 19 19 * License along with this library; if not, write to the Free Software 20 20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 * 21 * 22 22 * For questions, help, comments, discussion, etc., please join the 23 23 * Smarty mailing list. Send a blank e-mail to 24 24 * smarty-discussion-subscribe@googlegroups.com 25 * 25 * 26 26 * @link http://www.smarty.net/ 27 27 * @copyright 2008 New Digital Group, Inc. 28 * @author Monte Ohrt <monte at ohrt dot com> 29 * @author Uwe Tews 28 * @author Monte Ohrt <monte at ohrt dot com> 29 * @author Uwe Tews 30 30 * @package Smarty 31 31 * @subpackage PluginsInternal … … 39 39 { 40 40 $this->smarty = $smarty; 41 } 41 } 42 42 43 43 /** 44 44 * Compile all template files 45 * 45 * 46 46 * @param string $extension file extension 47 47 * @param bool $force_compile force all to recompile 48 * @param int $time_limit 49 * @param int $max_errors 48 * @param int $time_limit 49 * @param int $max_errors 50 50 * @return integer number of template files recompiled 51 51 */ 52 52 function compileAllTemplates($extention = '.tpl', $force_compile = false, $time_limit = 0, $max_errors = null) 53 { 53 { 54 54 // switch off time limit 55 55 if (function_exists('set_time_limit')) { 56 56 @set_time_limit($time_limit); 57 } 57 } 58 58 $this->smarty->force_compile = $force_compile; 59 59 $_count = 0; 60 $_error_count = 0; 60 $_error_count = 0; 61 61 // loop over array of template directories 62 62 foreach((array)$this->smarty->template_dir as $_dir) { 63 63 if (strpos('/\\', substr($_dir, -1)) === false) { 64 64 $_dir .= DS; 65 } 65 } 66 66 $_compileDirs = new RecursiveDirectoryIterator($_dir); 67 67 $_compile = new RecursiveIteratorIterator($_compileDirs); … … 92 92 echo 'Error: ', $e->getMessage(), "<br><br>"; 93 93 $_error_count++; 94 } 94 } 95 95 // free memory 96 96 $this->smarty->template_objects = array(); … … 100 100 echo '<br><br>too many errors'; 101 101 exit(); 102 } 103 } 104 } 102 } 103 } 104 } 105 105 return $_count; 106 } 106 } 107 107 108 108 /** 109 109 * Compile all config files 110 * 110 * 111 111 * @param string $extension file extension 112 112 * @param bool $force_compile force all to recompile 113 * @param int $time_limit 114 * @param int $max_errors 113 * @param int $time_limit 114 * @param int $max_errors 115 115 * @return integer number of template files recompiled 116 116 */ 117 117 function compileAllConfig($extention = '.conf', $force_compile = false, $time_limit = 0, $max_errors = null) 118 { 118 { 119 119 // switch off time limit 120 120 if (function_exists('set_time_limit')) { 121 121 @set_time_limit($time_limit); 122 } 122 } 123 123 $this->smarty->force_compile = $force_compile; 124 124 $_count = 0; 125 $_error_count = 0; 125 $_error_count = 0; 126 126 // loop over array of template directories 127 127 foreach((array)$this->smarty->config_dir as $_dir) { 128 128 if (strpos('/\\', substr($_dir, -1)) === false) { 129 129 $_dir .= DS; 130 } 130 } 131 131 $_compileDirs = new RecursiveDirectoryIterator($_dir); 132 132 $_compile = new RecursiveIteratorIterator($_compileDirs); … … 139 139 } else { 140 140 $_config_file = substr($_fileinfo->getPath(), strlen($_dir)) . DS . $_file; 141 } 141 } 142 142 echo '<br>', $_dir, '---', $_config_file; 143 143 flush(); … … 152 152 echo ' is up to date'; 153 153 flush(); 154 } 155 } 154 } 155 } 156 156 catch (Exception $e) { 157 157 echo 'Error: ', $e->getMessage(), "<br><br>"; 158 158 $_error_count++; 159 } 159 } 160 160 if ($max_errors !== null && $_error_count == $max_errors) { 161 161 echo '<br><br>too many errors'; 162 162 exit(); 163 } 164 } 165 } 163 } 164 } 165 } 166 166 return $_count; 167 } 167 } 168 168 169 169 /** 170 170 * Delete compiled template file 171 * 171 * 172 172 * @param string $resource_name template name 173 173 * @param string $compile_id compile id … … 184 184 } else { 185 185 $_resource_part = ''; 186 } 186 } 187 187 $_dir = $this->smarty->compile_dir; 188 188 if ($this->smarty->use_sub_dirs && isset($_compile_id)) { 189 189 $_dir .= $_compile_id . $_dir_sep; 190 } 190 } 191 191 if (isset($_compile_id)) { 192 192 $_compile_id_part = $this->smarty->compile_dir . $_compile_id . $_dir_sep; 193 } 193 } 194 194 $_count = 0; 195 195 $_compileDirs = new RecursiveDirectoryIterator($_dir); … … 201 201 // delete folder if empty 202 202 @rmdir($_file->getPathname()); 203 } 203 } 204 204 } else { 205 205 if ((!isset($_compile_id) || (strlen((string)$_file) > strlen($_compile_id_part) && substr_compare((string)$_file, $_compile_id_part, 0, strlen($_compile_id_part)) == 0)) && … … 209 209 if (time() - @filemtime($_file) >= $exp_time) { 210 210 $_count += @unlink((string) $_file) ? 1 : 0; 211 } 211 } 212 212 } else { 213 213 $_count += @unlink((string) $_file) ? 1 : 0; 214 } 215 } 216 } 217 } 214 } 215 } 216 } 217 } 218 218 return $_count; 219 } 219 } 220 220 221 221 /** 222 222 * Return array of tag/attributes of all tags used by an template 223 * 223 * 224 224 * @param object $templae template object 225 225 * @return array of tag/attributes 226 226 */ 227 function getTags(Smarty_Internal_Template $template)227 public static function getTags(Smarty_Internal_Template $template) 228 228 { 229 229 $template->smarty->get_used_tags = true; 230 230 $template->compileTemplateSource(); 231 return $template-> compiler_object->used_tags;232 } 233 231 return $template->used_tags; 232 } 233 234 234 function testInstall() 235 235 { … … 247 247 else 248 248 echo "$template_dir is OK.\n"; 249 } 249 } 250 250 251 251 echo "Testing compile directory...\n"; … … 269 269 else 270 270 echo "$plugin_dir is OK.\n"; 271 } 271 } 272 272 273 273 echo "Testing cache directory...\n"; … … 296 296 297 297 return true; 298 } 298 } 299 299 } 300 300 ?> -
trunk/gui/include/Smarty/sysplugins/smarty_internal_wrapper.php
r3753 r3894 5 5 * File: smarty_internal_wrapper.php 6 6 * SVN: $Id: $ 7 * 7 * 8 8 * This library is free software; you can redistribute it and/or 9 9 * modify it under the terms of the GNU Lesser General Public 10 10 * License as published by the Free Software Foundation; either 11 11 * version 2.1 of the License, or (at your option) any later version. 12 * 12 * 13 13 * This library is distributed in the hope that it will be useful, 14 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 16 * Lesser General Public License for more details. 17 * 17 * 18 18 * You should have received a copy of the GNU Lesser General Public 19 19 * License along with this library; if not, write to the Free Software 20 20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 * 21 * 22 22 * For questions, help, comments, discussion, etc., please join the 23 23 * Smarty mailing list. Send a blank e-mail to 24 24 * smarty-discussion-subscribe@googlegroups.com 25 * 25 * 26 26 * @link http://www.smarty.net/ 27 27 * @copyright 2008 New Digital Group, Inc. 28 * @author Monte Ohrt <monte at ohrt dot com> 29 * @author Uwe Tews 28 * @author Monte Ohrt <monte at ohrt dot com> 29 * @author Uwe Tews 30 30 * @package Smarty 31 31 * @subpackage PluginsInternal … … 38 38 39 39 class Smarty_Internal_Wrapper { 40 40 41 41 protected $smarty; 42 42 … … 44 44 $this->smarty = $smarty; 45 45 } 46 46 47 47 /** 48 48 * Converts smarty2-style function call to smarty 3-style function call 49 49 * This is expensive, be sure to port your code to Smarty 3! 50 * 50 * 51 51 * @param string $name Smarty 2 function name 52 52 * @param array $args Smarty 2 function args … … 96 96 case 'cache': 97 97 return call_user_func_array(array($this->smarty,'clearCache'),$args); 98 case 'config': 99 return call_user_func_array(array($this->smarty,'clearConfig'),$args); 98 100 case 'compiled_template': 99 101 return call_user_func_array(array($this->smarty,'clearCompiledTemplate'),$args);
Note: See TracChangeset
for help on using the changeset viewer.
