- renamed function names of autoloaded Smarty methods to Smarty_Method_....

- new security_class property (default is Smarty_Security)
This commit is contained in:
Uwe.Tews
2009-11-03 20:38:38 +00:00
parent 05c64b7748
commit 94b80e892b
90 changed files with 162 additions and 171 deletions

View File

@@ -2,6 +2,8 @@
- fixed parser error on objects with special smarty vars - fixed parser error on objects with special smarty vars
- fixed file dependency for {incude} inside {block} tag - fixed file dependency for {incude} inside {block} tag
- fixed not compiling on non existing compiled templates when compile_check = false - fixed not compiling on non existing compiled templates when compile_check = false
- renamed function names of autoloaded Smarty methods to Smarty_Method_....
- new security_class property (default is Smarty_Security)
11/02/2009 11/02/2009
- added neq,lte,gte,mod as aliases to if conditions - added neq,lte,gte,mod as aliases to if conditions

View File

@@ -90,10 +90,10 @@ define('SMARTY_PHP_ALLOW', 3); //-> escape tags as entities
spl_autoload_extensions('.php,.inc'); spl_autoload_extensions('.php,.inc');
if (set_include_path(SMARTY_SYSPLUGINS_DIR . PATH_SEPARATOR . get_include_path()) !== false) { if (set_include_path(SMARTY_SYSPLUGINS_DIR . PATH_SEPARATOR . get_include_path()) !== false) {
$spl_funcs = spl_autoload_functions(); $spl_funcs = spl_autoload_functions();
if($spl_funcs === false) if ($spl_funcs === false)
spl_autoload_register(); spl_autoload_register();
elseif(!in_array('spl_autoload',$spl_funcs)) elseif (!in_array('spl_autoload', $spl_funcs))
spl_autoload_register('spl_autoload'); spl_autoload_register('spl_autoload');
} else { } else {
spl_autoload_register('smartyAutoload'); spl_autoload_register('smartyAutoload');
} }
@@ -102,7 +102,7 @@ if (set_include_path(SMARTY_SYSPLUGINS_DIR . PATH_SEPARATOR . get_include_path()
*/ */
class Smarty extends Smarty_Internal_TemplateBase { class Smarty extends Smarty_Internal_TemplateBase {
// smarty version // smarty version
public static $_version = 'Smarty3-SVN$Rev: 3286 $'; public static $_version = 'Smarty3-SVN$Rev: 3286 $';
// auto literal on delimiters with whitspace // auto literal on delimiters with whitspace
public $auto_literal = true; public $auto_literal = true;
// display error on not assigned variables // display error on not assigned variables
@@ -125,8 +125,6 @@ class Smarty extends Smarty_Internal_TemplateBase {
public $compile_check = true; public $compile_check = true;
// use sub dirs for compiled/cached files? // use sub dirs for compiled/cached files?
public $use_sub_dirs = false; public $use_sub_dirs = false;
// php file extention
public $php_ext = '.php';
// compile_error? // compile_error?
public $compile_error = false; public $compile_error = false;
// caching enabled // caching enabled
@@ -145,6 +143,7 @@ class Smarty extends Smarty_Internal_TemplateBase {
public $left_delimiter = "{"; public $left_delimiter = "{";
public $right_delimiter = "}"; public $right_delimiter = "}";
// security // security
public $security_class = 'Smarty_Security';
public $php_handling = SMARTY_PHP_PASSTHRU; public $php_handling = SMARTY_PHP_PASSTHRU;
public $allow_php_tag = false; public $allow_php_tag = false;
public $allow_php_templates = false; public $allow_php_templates = false;
@@ -162,7 +161,7 @@ class Smarty extends Smarty_Internal_TemplateBase {
// config var settings // config var settings
public $config_overwrite = true; //Controls whether variables with the same name overwrite each other. 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_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 // config vars
public $config_vars = array(); public $config_vars = array();
// assigned tpl vars // assigned tpl vars
@@ -216,7 +215,7 @@ class Smarty extends Smarty_Internal_TemplateBase {
// default file permissions // default file permissions
public $_file_perms = 0644; public $_file_perms = 0644;
// default dir permissions // default dir permissions
public $_dir_perms = 0771; public $_dir_perms = 0771;
// smarty object reference // smarty object reference
public $smarty = null; public $smarty = null;
@@ -352,25 +351,16 @@ class Smarty extends Smarty_Internal_TemplateBase {
} }
/** /**
* Load the plugin with security definition and enables security * Loads security class and enables security
*
* @param string $security_policy plugin to load
*/ */
public function enableSecurity($security_policy_file = null) public function enableSecurity()
{ {
if (!isset($security_policy_file)) { if (isset($this->security_class)) {
$security_policy_file = SMARTY_DIR . 'Security.class.php'; $this->security_policy = new $this->security_class;
}
if (file_exists($security_policy_file)) {
require_once($security_policy_file);
if (!class_exists('Smarty_Security_Policy')) {
throw new Exception("Security policy must define class 'Smarty_Security_Policy'");
}
$this->security_policy = new Smarty_Security_Policy;
$this->security_handler = new Smarty_Internal_Security_Handler($this); $this->security_handler = new Smarty_Internal_Security_Handler($this);
$this->security = true; $this->security = true;
} else { } else {
throw new Exception("Security policy {$security_policy_file} not found"); throw new Exception('Property security_class is not defined');
} }
} }
@@ -459,15 +449,15 @@ class Smarty extends Smarty_Internal_TemplateBase {
} }
// if type is "internal", get plugin from sysplugins // if type is "internal", get plugin from sysplugins
if ($_name_parts[1] == 'internal') { if ($_name_parts[1] == 'internal') {
if (file_exists(SMARTY_SYSPLUGINS_DIR . $_plugin_name . $this->php_ext)) { if (file_exists(SMARTY_SYSPLUGINS_DIR . $_plugin_name . '.php')) {
require_once(SMARTY_SYSPLUGINS_DIR . $_plugin_name . $this->php_ext); require_once(SMARTY_SYSPLUGINS_DIR . $_plugin_name . '.php');
return true; return true;
} else { } else {
return false; return false;
} }
} }
// plugin filename is expected to be: [type].[name].php // plugin filename is expected to be: [type].[name].php
$_plugin_filename = "{$_name_parts[1]}.{$_name_parts[2]}{$this->php_ext}"; $_plugin_filename = "{$_name_parts[1]}.{$_name_parts[2]}.php";
// loop through plugin dirs and find the plugin // loop through plugin dirs and find the plugin
foreach((array)$this->plugins_dir as $_plugin_dir) { foreach((array)$this->plugins_dir as $_plugin_dir) {
if (strpos('/\\', substr($_plugin_dir, -1)) === false) { if (strpos('/\\', substr($_plugin_dir, -1)) === false) {
@@ -526,17 +516,18 @@ class Smarty extends Smarty_Internal_TemplateBase {
*/ */
public function __call($name, $args) public function __call($name, $args)
{ {
if ($name == 'Smarty') { $name = strtolower($name);
if ($name == 'smarty') {
throw new Exception('Please use parent::__construct() to call parent constuctor'); throw new Exception('Please use parent::__construct() to call parent constuctor');
}
if (!is_callable($name)) {
$_plugin_filename = strtolower('smarty_method_' . $name . $this->php_ext);
if (!file_exists(SMARTY_SYSPLUGINS_DIR . $_plugin_filename)) {
throw new Exception('Undefined Smarty method "'. $name .'"');
}
require_once(SMARTY_SYSPLUGINS_DIR . $_plugin_filename);
} }
return call_user_func_array($name, array_merge(array($this), $args)); $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));
} }
} }

View File

@@ -93,7 +93,7 @@ class Smarty_Internal_CacheResource_File {
{ {
$_dir_sep = $this->smarty->use_sub_dirs ? DS : '^'; $_dir_sep = $this->smarty->use_sub_dirs ? DS : '^';
if (isset($resource_name)) { if (isset($resource_name)) {
$_resource_part = (string)abs(crc32($resource_name)) . '.' . $resource_name . $this->smarty->php_ext; $_resource_part = (string)abs(crc32($resource_name)) . '.' . $resource_name . '.php';
} else { } else {
$_resource_part = null; $_resource_part = null;
} }
@@ -173,7 +173,7 @@ class Smarty_Internal_CacheResource_File {
$_cache_dir .= DS; $_cache_dir .= DS;
} }
return $_cache_dir . $_cache_id . $_compile_id . $_filepath . '.' . basename($_files[count($_files)-1]) . $this->smarty->php_ext; return $_cache_dir . $_cache_id . $_compile_id . $_filepath . '.' . basename($_files[count($_files)-1]) . '.php';
} }
} }

View File

@@ -146,7 +146,7 @@ class Smarty_Internal_Config {
if (substr($_compile_dir, -1) != DS) { if (substr($_compile_dir, -1) != DS) {
$_compile_dir .= DS; $_compile_dir .= DS;
} }
return $_compile_dir . $_filepath . '.' . basename($this->config_resource_name) . '.config' . $this->smarty->php_ext; return $_compile_dir . $_filepath . '.' . basename($this->config_resource_name) . '.config' . '.php';
} }
/** /**
* Returns the timpestamp of the compiled file * Returns the timpestamp of the compiled file

View File

@@ -189,7 +189,7 @@ class Smarty_Internal_Resource_Extend {
if (substr($_compile_dir, -1) != DS) { if (substr($_compile_dir, -1) != DS) {
$_compile_dir .= DS; $_compile_dir .= DS;
} }
return $_compile_dir . $_filepath . '.' . basename($_files[count($_files)-1]) . $_cache . $template->smarty->php_ext; return $_compile_dir . $_filepath . '.' . basename($_files[count($_files)-1]) . $_cache . '.php';
} }
} }

View File

@@ -133,7 +133,7 @@ class Smarty_Internal_Resource_File {
if (strpos('/\\', substr($_compile_dir, -1)) === false) { if (strpos('/\\', substr($_compile_dir, -1)) === false) {
$_compile_dir .= DS; $_compile_dir .= DS;
} }
return $_compile_dir . $_filepath . '.' . $_template->resource_type . '.' . basename($_template->resource_name). $_cache . $_template->smarty->php_ext; return $_compile_dir . $_filepath . '.' . $_template->resource_type . '.' . basename($_template->resource_name). $_cache . '.php';
} }
} }

View File

@@ -145,7 +145,7 @@ class Smarty_Internal_Resource_Registered {
if (strpos('/\\', substr($_compile_dir, -1)) === false) { if (strpos('/\\', substr($_compile_dir, -1)) === false) {
$_compile_dir .= DS; $_compile_dir .= DS;
} }
return $_compile_dir . $_filepath . '.' . $_template->resource_type . '.' . basename($_template->resource_name) . $_cache . $_template->smarty->php_ext; return $_compile_dir . $_filepath . '.' . $_template->resource_type . '.' . basename($_template->resource_name) . $_cache . '.php';
} }
} }

View File

@@ -21,8 +21,6 @@ class Smarty_Internal_SmartyTemplateCompiler extends Smarty_Internal_TemplateCom
$this->smarty = $smarty; $this->smarty = $smarty;
parent::__construct(); parent::__construct();
// get required plugins // get required plugins
// $this->smarty->loadPlugin($lexer_class);
// $this->smarty->loadPlugin($parser_class);
$this->lexer_class = $lexer_class; $this->lexer_class = $lexer_class;
$this->parser_class = $parser_class; $this->parser_class = $parser_class;
} }

View File

@@ -16,7 +16,7 @@
* @param object $smarty * @param object $smarty
* @param callback $function * @param callback $function
*/ */
function _get_filter_name($smarty, $function) function Smarty_Method__get_filter_name($smarty, $function)
{ {
if (is_array($function)) { if (is_array($function)) {
$_class_name = (is_object($function[0]) ? $_class_name = (is_object($function[0]) ?

View File

@@ -17,7 +17,7 @@
* @param string $ |array $ plugins folder * @param string $ |array $ plugins folder
* @return * @return
*/ */
function AddPluginsDir($smarty, $plugins_dir) function Smarty_Method_AddPluginsDir($smarty, $plugins_dir)
{ {
$smarty->plugins_dir = array_merge((array)$smarty->plugins_dir, (array)$plugins_dir); $smarty->plugins_dir = array_merge((array)$smarty->plugins_dir, (array)$plugins_dir);
$smarty->plugins_dir = array_unique($smarty->plugins_dir); $smarty->plugins_dir = array_unique($smarty->plugins_dir);

View File

@@ -16,7 +16,7 @@
* @param object $smarty * @param object $smarty
* @param object $data_object object which holds tpl_vars * @param object $data_object object which holds tpl_vars
*/ */
function clear_all_assign($smarty, $data_object = null) function Smarty_Method_Clear_All_Assign($smarty, $data_object = null)
{ {
if (isset($data_object)) { if (isset($data_object)) {
$ptr = $data_object; $ptr = $data_object;

View File

@@ -18,7 +18,7 @@
* @param string $type resource type * @param string $type resource type
* @return integer number of cache files deleted * @return integer number of cache files deleted
*/ */
function clear_all_cache($smarty, $exp_time = null, $type = 'file') function Smarty_Method_Clear_All_Cache($smarty, $exp_time = null, $type = 'file')
{ {
// load cache resource // load cache resource
if (!isset($smarty->cache_resource_objects[$type])) { if (!isset($smarty->cache_resource_objects[$type])) {

View File

@@ -17,7 +17,7 @@
* @param string $ |array $varname variable name or array of variable names * @param string $ |array $varname variable name or array of variable names
* @param object $data_object object which holds tpl_vars * @param object $data_object object which holds tpl_vars
*/ */
function clear_assign($smarty, $varname, $data_object = null) function Smarty_Method_Clear_Assign($smarty, $varname, $data_object = null)
{ {
foreach ((array)$varname as $variable) { foreach ((array)$varname as $variable) {
if (isset($data_object)) { if (isset($data_object)) {

View File

@@ -21,7 +21,7 @@
* @param string $type resource type * @param string $type resource type
* @return integer number of cache files deleted * @return integer number of cache files deleted
*/ */
function clear_cache($smarty, $template_name, $cache_id = null, $compile_id = null, $exp_time = null, $type = 'file') function Smarty_Method_Clear_Cache($smarty, $template_name, $cache_id = null, $compile_id = null, $exp_time = null, $type = 'file')
{ {
// load cache resource // load cache resource
$_cache_resource_class = 'Smarty_Internal_CacheResource_' . $type; $_cache_resource_class = 'Smarty_Internal_CacheResource_' . $type;

View File

@@ -18,12 +18,12 @@
* @param integer $exp_time expiration time * @param integer $exp_time expiration time
* @return integer number of template files deleted * @return integer number of template files deleted
*/ */
function clear_compiled_tpl($smarty, $resource_name = null, $compile_id = null, $exp_time = null) function Smarty_Method_Clear_Compiled_Tpl($smarty, $resource_name = null, $compile_id = null, $exp_time = null)
{ {
$_dir_sep = $smarty->use_sub_dirs ? DS : '^'; $_dir_sep = $smarty->use_sub_dirs ? DS : '^';
if (isset($resource_name)) { if (isset($resource_name)) {
$_resource_part_1 = $resource_name . $smarty->php_ext; $_resource_part_1 = $resource_name . '.php';
$_resource_part_2 = $resource_name . '.cache' . $smarty->php_ext; $_resource_part_2 = $resource_name . '.cache' . '.php';
} else { } else {
$_resource_part = ''; $_resource_part = '';
} }

View File

@@ -16,7 +16,7 @@
* @param object $smarty * @param object $smarty
* @param string $varname variable name or null * @param string $varname variable name or null
*/ */
function clear_config($smarty, $varname = null) function Smarty_Method_Clear_Config($smarty, $varname = null)
{ {
if (isset($varname)) { if (isset($varname)) {
unset($smarty->config_vars[$varname]); unset($smarty->config_vars[$varname]);

View File

@@ -16,7 +16,7 @@
* @param string $dir_name name of directories * @param string $dir_name name of directories
* @return integer number of template files deleted * @return integer number of template files deleted
*/ */
function compile_directory($smarty, $extention = '.tpl', $force_compile = false, $time_limit = 0, $max_errors = null) function Smarty_Method_Compile_Directory($smarty, $extention = '.tpl', $force_compile = false, $time_limit = 0, $max_errors = null)
{ {
function _get_time() function _get_time()
{ {

View File

@@ -17,7 +17,7 @@
* @param string $config_file filename * @param string $config_file filename
* @param mixed $sections array of section names, single section or null * @param mixed $sections array of section names, single section or null
*/ */
function config_load($smarty, $config_file, $sections = null) function Smarty_Method_Config_Load($smarty, $config_file, $sections = null)
{ {
// load Config class // load Config class
$config = new Smarty_Internal_Config($config_file, $smarty); $config = new Smarty_Internal_Config($config_file, $smarty);

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* Smarty method disableCacheModifyCheck * Smarty method DisableCacheModifyCheck
* *
* Disable cache modify check * Disable cache modify check
* *
@@ -14,7 +14,7 @@
* *
* Disable cache modify check * Disable cache modify check
*/ */
function disableCacheModifyCheck($smarty) function Smarty_Method_DisableCacheModifyCheck($smarty)
{ {
$smarty->cache_modified_check = false; $smarty->cache_modified_check = false;
return ; return ;

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* Smarty method disableCaching * Smarty method DisableCaching
* *
* Disable caching * Disable caching
* *
@@ -13,7 +13,7 @@
/** /**
* Disable caching * Disable caching
*/ */
function DisableCaching() function Smarty_Method_DisableCaching()
{ {
$this->smarty->caching = false; $this->smarty->caching = false;
return; return;

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* Smarty method disableCompileCheck * Smarty method DisableCompileCheck
* *
* Disable compile checking * Disable compile checking
* *
@@ -15,7 +15,7 @@
* *
* @param object $smarty * @param object $smarty
*/ */
function DisableCompileCheck($smarty) function Smarty_Method_DisableCompileCheck($smarty)
{ {
$smarty->compile_check = false; $smarty->compile_check = false;
return; return;

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* Smarty method disableConfigBooleanize * Smarty method DisableConfigBooleanize
* *
* Disable config booleanize mode * Disable config booleanize mode
* *
@@ -13,7 +13,7 @@
/** /**
* Disable config booleanize mode * Disable config booleanize mode
*/ */
function disableConfigBooleanize($smarty) function Smarty_Method_DisableConfigBooleanize($smarty)
{ {
$this->smarty->config_booleanize = false; $this->smarty->config_booleanize = false;
return; return;

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* Smarty method disableConfigOverwrite * Smarty method DisableConfigOverwrite
* *
* Disable config overwrite mode * Disable config overwrite mode
* *
@@ -13,7 +13,7 @@
/** /**
* Disable config overwrite mode * Disable config overwrite mode
*/ */
function disableConfigOverwrite($smarty) function Smarty_Method_DisableConfigOverwrite($smarty)
{ {
$smarty->config_overwrite = false; $smarty->config_overwrite = false;
return ; return ;

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* Smarty method disableConfigReadHidden * Smarty method DisableConfigReadHidden
* *
* Disable config read hidden mode * Disable config read hidden mode
* *
@@ -13,7 +13,7 @@
/** /**
* Disable config read hidden mode * Disable config read hidden mode
*/ */
function disableConfigReadHidden ($smarty) function Smarty_Method_DisableConfigReadHidden ($smarty)
{ {
$this->smarty->config_read_hidden = false; $this->smarty->config_read_hidden = false;
return; return;

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* Smarty method disableDebugging * Smarty method DisableDebugging
* *
* Disable debugging * Disable debugging
* *
@@ -13,7 +13,7 @@
/** /**
* Disable debugging * Disable debugging
*/ */
function disableDebugging($smarty) function Smarty_Method_DisableDebugging($smarty)
{ {
$smarty->debugging = false; $smarty->debugging = false;
return; return;

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* Smarty method disableDebuggingUrlCtrl * Smarty method DisableDebuggingUrlCtrl
* *
* Disable possibility to Disable debugging by SMARTY_DEBUG attribute * Disable possibility to Disable debugging by SMARTY_DEBUG attribute
* *
@@ -13,7 +13,7 @@
/** /**
* Disable possibility to Disable debugging by SMARTY_DEBUG attribute * Disable possibility to Disable debugging by SMARTY_DEBUG attribute
*/ */
function disableDebuggingUrlCtrl($smarty) function Smarty_Method_DisableDebuggingUrlCtrl($smarty)
{ {
$smarty->debugging_ctrl = 'none'; $smarty->debugging_ctrl = 'none';
return; return;

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* Smarty method disableDefaultTimezone * Smarty method DisableDefaultTimezone
* *
* Disable setting of default timezone * Disable setting of default timezone
* *
@@ -13,7 +13,7 @@
/** /**
* Disable setting of default timezone * Disable setting of default timezone
*/ */
function disableDefaultTimezone($smarty) function Smarty_Method_DisableDefaultTimezone($smarty)
{ {
$smarty->set_timezone = false; $smarty->set_timezone = false;
return; return;

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* Smarty method disableForceCompile * Smarty method DisableForceCompile
* *
* Disable forced compiling * Disable forced compiling
* *
@@ -13,7 +13,7 @@
/** /**
* Disable forced compiling * Disable forced compiling
*/ */
function disableForceCompile($smarty) function Smarty_Method_DisableForceCompile($smarty)
{ {
$smarty->force_compile = false; $smarty->force_compile = false;
return; return;

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* Smarty method disableVariableFilter * Smarty method DisableVariableFilter
* *
* Disable filter on variable output * Disable filter on variable output
* *
@@ -13,7 +13,7 @@
/** /**
* Disable filter on variable output * Disable filter on variable output
*/ */
function disableVariableFilter($smarty) function Smarty_Method_DisableVariableFilter($smarty)
{ {
$smarty->variable_filter = false; $smarty->variable_filter = false;
return; return;

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* Smarty method enableCacheModifyCheck * Smarty method EnableCacheModifyCheck
* *
* Enable cache modify check * Enable cache modify check
* *
@@ -13,7 +13,7 @@
/** /**
* Enable cache modify check * Enable cache modify check
*/ */
function enableCacheModifyCheck($smarty) function Smarty_Method_EnableCacheModifyCheck($smarty)
{ {
$smarty->cache_modified_check = true; $smarty->cache_modified_check = true;
return; return;

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* Smarty method enableCompileCheck * Smarty method EnableCompileCheck
* *
* Enable compile checking * Enable compile checking
* *
@@ -13,7 +13,7 @@
/** /**
* Enable compile checking * Enable compile checking
*/ */
function enableCompileCheck($smarty) function Smarty_Method_EnableCompileCheck($smarty)
{ {
$smarty->compile_check = true; $smarty->compile_check = true;
return; return;

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* Smarty method enableConfigBooleanize * Smarty method EnableConfigBooleanize
* *
* Enable config booleanize mode * Enable config booleanize mode
* *
@@ -13,7 +13,7 @@
/** /**
* Enable config booleanize mode * Enable config booleanize mode
*/ */
function enableConfigBooleanize($smarty) function Smarty_Method_EnableConfigBooleanize($smarty)
{ {
$smarty->config_booleanize = true; $smarty->config_booleanize = true;
return; return;

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* Smarty method enableConfigOverwrite * Smarty method EnableConfigOverwrite
* *
* Enable config overwrite mode * Enable config overwrite mode
* *
@@ -13,7 +13,7 @@
/** /**
* Enable config overwrite mode * Enable config overwrite mode
*/ */
function enableConfigOverwrite($smarty) function Smarty_Method_EnableConfigOverwrite($smarty)
{ {
$smarty->config_overwrite = true; $smarty->config_overwrite = true;
return; return;

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* Smarty method enableConfigReadHidden * Smarty method EnableConfigReadHidden
* *
* Enable config read hidden mode * Enable config read hidden mode
* *
@@ -13,7 +13,7 @@
/** /**
* Enable config read hidden mode * Enable config read hidden mode
*/ */
function enableConfigReadHidden($smarty) function Smarty_Method_EnableConfigReadHidden($smarty)
{ {
$this->smarty->config_read_hidden = true; $this->smarty->config_read_hidden = true;
return; return;

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* Smarty method enableDebugging * Smarty method EnableDebugging
* *
* Enable debugging * Enable debugging
* *
@@ -13,7 +13,7 @@
/** /**
* Enable debugging * Enable debugging
*/ */
function enableDebugging($smarty) function Smarty_Method_EnableDebugging($smarty)
{ {
$this->smarty->debugging = true; $this->smarty->debugging = true;
return; return;

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* Smarty method enableDebuggingUrlCtrl * Smarty method EnableDebuggingUrlCtrl
* *
* Enable possibility to enable debugging by SMARTY_DEBUG attribute * Enable possibility to enable debugging by SMARTY_DEBUG attribute
* *
@@ -13,7 +13,7 @@
/** /**
* Enable possibility to enable debugging by SMARTY_DEBUG attribute * Enable possibility to enable debugging by SMARTY_DEBUG attribute
*/ */
function enableDebuggingUrlCtrl($smarty) function Smarty_Method_EnableDebuggingUrlCtrl($smarty)
{ {
$smarty->debugging_ctrl = 'URL'; $smarty->debugging_ctrl = 'URL';
return; return;

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* Smarty method enableDefaultTimezone * Smarty method EnableDefaultTimezone
* *
* Enable setting of default timezone * Enable setting of default timezone
* *
@@ -13,7 +13,7 @@
/** /**
* Enable setting of default timezone * Enable setting of default timezone
*/ */
function enableDefaultTimezone($smarty) function Smarty_Method_EnableDefaultTimezone($smarty)
{ {
$this->smarty->set_timezone = true; $this->smarty->set_timezone = true;
return; return;

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* Smarty method enableForceCompile * Smarty method EnableForceCompile
* *
* Enable forced compiling * Enable forced compiling
* *
@@ -13,7 +13,7 @@
/** /**
* Enable forced compiling * Enable forced compiling
*/ */
function enableForceCompile($smarty) function Smarty_Method_EnableForceCompile($smarty)
{ {
$smarty->force_compile = true; $smarty->force_compile = true;
return; return;

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* Smarty method enableVariableFilter * Smarty method EnableVariableFilter
* *
* Enable filter on variable output * Enable filter on variable output
* *
@@ -13,7 +13,7 @@
/** /**
* Enable filter on variable output * Enable filter on variable output
*/ */
function enableVariableFilter($smarty) function Smarty_Method_EnableVariableFilter($smarty)
{ {
$smarty->variable_filter = true; $smarty->variable_filter = true;
return; return;

View File

@@ -20,7 +20,7 @@
* @param string $varname variable name or null * @param string $varname variable name or null
* @return string variable value or or array of variables * @return string variable value or or array of variables
*/ */
function Get_Config_Vars($smarty, $varname = null) function Smarty_Method_Get_Config_Vars($smarty, $varname = null)
{ {
if (isset($varname)) { if (isset($varname)) {
if (isset($smarty->config_vars[$varname])) { if (isset($smarty->config_vars[$varname])) {

View File

@@ -17,7 +17,7 @@
* @param string $varname variable name or null * @param string $varname variable name or null
* @return string variable value or or array of variables * @return string variable value or or array of variables
*/ */
function get_global($smarty, $varname = null) function Smarty_Method_Get_Global($smarty, $varname = null)
{ {
if (isset($varname)) { if (isset($varname)) {
if (isset($smarty->global_tpl_vars[$varname])) { if (isset($smarty->global_tpl_vars[$varname])) {

View File

@@ -20,7 +20,7 @@
* @param string $name * @param string $name
* @return object * @return object
*/ */
function get_registered_object($smarty, $name) function Smarty_Method_Get_Registered_Object($smarty, $name)
{ {
if (!isset($smarty->registered_objects[$name])) if (!isset($smarty->registered_objects[$name]))
throw new Exception("'$name' is not a registered object"); throw new Exception("'$name' is not a registered object");

View File

@@ -20,7 +20,7 @@
* @param string $varname variable name or null * @param string $varname variable name or null
* @return string variable value or or array of variables * @return string variable value or or array of variables
*/ */
function get_template_vars($smarty, $varname = null, $_ptr = null, $search_parents = true) function Smarty_Method_Get_Template_Vars($smarty, $varname = null, $_ptr = null, $search_parents = true)
{ {
if (isset($varname)) { if (isset($varname)) {
$_var = $smarty->getVariable($varname, $_ptr, $search_parents); $_var = $smarty->getVariable($varname, $_ptr, $search_parents);

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* Smarty method getCacheDir * Smarty method GetCacheDir
* *
* Returns directory of cache files * Returns directory of cache files
* *
@@ -19,7 +19,7 @@
* *
* @return array cache folder * @return array cache folder
*/ */
function getCacheDir($smarty) function Smarty_Method_GetCacheDir($smarty)
{ {
return $this->smarty->cache_dir; return $this->smarty->cache_dir;
} }

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* Smarty method getCacheLifetime * Smarty method GetCacheLifetime
* *
* Returns lifetime of cache files * Returns lifetime of cache files
* *
@@ -20,7 +20,7 @@
* *
* @return integer cache file lifetime * @return integer cache file lifetime
*/ */
function getCacheLifetime($smarty) function Smarty_Method_GetCacheLifetime($smarty)
{ {
return $smarty->cache_lifetime; return $smarty->cache_lifetime;
} }

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* Smarty method getCompileDir * Smarty method GetCompileDir
* *
* Returns directory of compiled templates * Returns directory of compiled templates
* *
@@ -19,7 +19,7 @@
* *
* @return array compiled template folder * @return array compiled template folder
*/ */
function GetCompileDir($smarty) function Smarty_Method_GetCompileDir($smarty)
{ {
return $this->smarty->compile_dir; return $this->smarty->compile_dir;
} }

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* Smarty method getConfigDir * Smarty method GetConfigDir
* *
* Returns directory of config files * Returns directory of config files
* *
@@ -19,7 +19,7 @@
* *
* @return array config folder * @return array config folder
*/ */
function getConfigDir($smarty) function Smarty_Method_GetConfigDir($smarty)
{ {
return $smarty->config_dir; return $smarty->config_dir;
} }

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* Smarty method getDebugTemplate * Smarty method GetDebugTemplate
* *
* Returns debug template filepath * Returns debug template filepath
* *
@@ -19,7 +19,7 @@
* *
* @return string debug template filepath * @return string debug template filepath
*/ */
function GetDebugTemplate($smarty) function Smarty_Method_GetDebugTemplate($smarty)
{ {
return $smarty->debug_tpl; return $smarty->debug_tpl;
} }

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* Smarty method getPluginsDir * Smarty method GetPluginsDir
* *
* Returns directory of plugins * Returns directory of plugins
* *
@@ -19,7 +19,7 @@
* *
* @return array plugins folder * @return array plugins folder
*/ */
function getPluginsDir($smarty) function Smarty_Method_GetPluginsDir($smarty)
{ {
return $smarty->plugins_dir; return $smarty->plugins_dir;
} }

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* Smarty method getTemplateDir * Smarty method GetTemplateDir
* *
* Returns template directory * Returns template directory
* *
@@ -19,7 +19,7 @@
* *
* @return array template folders * @return array template folders
*/ */
function getTemplateDir($smarty) function Smarty_Method_GetTemplateDir($smarty)
{ {
return $smarty->template_dir; return $smarty->template_dir;
} }

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* Smarty method getVariableFilter * Smarty method GetVariableFilter
* *
* get status of filter on variable output * get status of filter on variable output
* *
@@ -15,7 +15,7 @@
* *
* get status of filter on variable output * get status of filter on variable output
*/ */
function getVariableFilter($smarty) function Smarty_Method_GetVariableFilter($smarty)
{ {
return $smarty->variable_filter; return $smarty->variable_filter;
} }

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* Smarty method isCacheModifyCheck * Smarty method IsCacheModifyCheck
* *
* is cache modify check * is cache modify check
* *
@@ -13,7 +13,7 @@
/** /**
* is cache modify check * is cache modify check
*/ */
function isCacheModifyCheck() function Smarty_Method_IsCacheModifyCheck()
{ {
return $smarty->cache_modified_check; return $smarty->cache_modified_check;
} }

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* Smarty method isCaching * Smarty method IsCaching
* *
* is caching * is caching
* *
@@ -13,7 +13,7 @@
/** /**
* is caching * is caching
*/ */
function isCaching($smarty) function Smarty_Method_IsCaching($smarty)
{ {
return $smarty->caching; return $smarty->caching;
} }

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* Smarty method isCompileCheck * Smarty method IsCompileCheck
* *
* is compile checking * is compile checking
* *
@@ -13,7 +13,7 @@
/** /**
* is compile checking * is compile checking
*/ */
function isCompileCheck($smarty) function Smarty_Method_IsCompileCheck($smarty)
{ {
return $smarty->compile_check; return $smarty->compile_check;
} }

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* Smarty method isConfigBooleanize * Smarty method IsConfigBooleanize
* *
* is config booleanize mode * is config booleanize mode
* *
@@ -13,7 +13,7 @@
/** /**
* is config booleanize mode * is config booleanize mode
*/ */
function isConfigBooleanize($smarty) function Smarty_Method_IsConfigBooleanize($smarty)
{ {
return $smarty->config_booleanize; return $smarty->config_booleanize;
} }

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* Smarty method isConfigOverwrite * Smarty method IsConfigOverwrite
* *
* is config overwrite mode * is config overwrite mode
* *
@@ -13,7 +13,7 @@
/** /**
* is config overwrite mode * is config overwrite mode
*/ */
function isConfigOverwrite($smarty) function Smarty_Method_IsConfigOverwrite($smarty)
{ {
return $smarty->config_overwrite; return $smarty->config_overwrite;
} }

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* Smarty method isConfigReadHidden * Smarty method IsConfigReadHidden
* *
* is config read hidden mode * is config read hidden mode
* *
@@ -14,7 +14,7 @@
* *
* is config read hidden mode * is config read hidden mode
*/ */
function isConfigReadHidden($smarty) function Smarty_Method_IsConfigReadHidden($smarty)
{ {
return $smarty->config_read_hidden; return $smarty->config_read_hidden;
} }

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* Smarty method isDebugging * Smarty method IsDebugging
* *
* is debugging * is debugging
* *
@@ -13,7 +13,7 @@
/** /**
* is debugging * is debugging
*/ */
function isDebugging($smarty) function Smarty_Method_IsDebugging($smarty)
{ {
return $smarty->debugging; return $smarty->debugging;
} }

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* Smarty method isDebuggingUrlCtrl * Smarty method IsDebuggingUrlCtrl
* *
* is possibility to is debugging by SMARTY_DEBUG attribute * is possibility to is debugging by SMARTY_DEBUG attribute
* *
@@ -13,7 +13,7 @@
/** /**
* is possibility to is debugging by SMARTY_DEBUG attribute * is possibility to is debugging by SMARTY_DEBUG attribute
*/ */
function isDebuggingUrlCtrl($smarty) function Smarty_Method_IsDebuggingUrlCtrl($smarty)
{ {
return $smarty->debugging_ctrl != 'none'; return $smarty->debugging_ctrl != 'none';
} }

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* Smarty method isDefaultTimezone * Smarty method IsDefaultTimezone
* *
* is setting of default timezone * is setting of default timezone
* *
@@ -13,7 +13,7 @@
/** /**
* is setting of default timezone * is setting of default timezone
*/ */
function isDefaultTimezone($smarty) function Smarty_Method_IsDefaultTimezone($smarty)
{ {
return $smarty->set_timezone = false; return $smarty->set_timezone = false;
} }

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* Smarty method isForceCompile * Smarty method IsForceCompile
* *
* is forced compiling * is forced compiling
* *
@@ -14,7 +14,7 @@
* *
* is forced compiling * is forced compiling
*/ */
function isForceCompile($smarty) function Smarty_Method_IsForceCompile($smarty)
{ {
return $smarty->force_compile; return $smarty->force_compile;
} }

View File

@@ -16,7 +16,7 @@
* @param string $type filter type * @param string $type filter type
* @param string $name filter name * @param string $name filter name
*/ */
function load_filter($smarty, $type, $name) function Smarty_Method_Load_Filter($smarty, $type, $name)
{ {
$_plugin = "smarty_{$type}filter_{$name}"; $_plugin = "smarty_{$type}filter_{$name}";
$_filter_name = $_plugin; $_filter_name = $_plugin;

View File

@@ -21,7 +21,7 @@
* @param string $block_impl PHP function to register * @param string $block_impl PHP function to register
* @param boolean $cacheable if true (default) this fuction is cachable * @param boolean $cacheable if true (default) this fuction is cachable
*/ */
function register_block($smarty, $block_tag, $block_impl, $cacheable = true, $cache_attr = array()) function Smarty_Method_Register_Block($smarty, $block_tag, $block_impl, $cacheable = true, $cache_attr = array())
{ {
if (isset($smarty->registered_plugins[$block_tag])) { if (isset($smarty->registered_plugins[$block_tag])) {
throw new Exception("Plugin tag \"{$block_tag}\" already registered"); throw new Exception("Plugin tag \"{$block_tag}\" already registered");

View File

@@ -20,7 +20,7 @@
* @param string $compiler_tag of template function * @param string $compiler_tag of template function
* @param string $compiler_impl name of PHP function to register * @param string $compiler_impl name of PHP function to register
*/ */
function register_compiler_function($smarty, $compiler_tag, $compiler_impl, $cacheable = true) function Smarty_Method_Register_Compiler_Function($smarty, $compiler_tag, $compiler_impl, $cacheable = true)
{ {
if (isset($smarty->registered_plugins[$compiler_tag])) { if (isset($smarty->registered_plugins[$compiler_tag])) {
throw new Exception("Plugin tag \"{$compiler_tag}\" already registered"); throw new Exception("Plugin tag \"{$compiler_tag}\" already registered");

View File

@@ -18,7 +18,7 @@
* @param string $function_impl the name of the PHP function to register * @param string $function_impl the name of the PHP function to register
* @param boolean $cacheable if true (default) this fuction is cachable * @param boolean $cacheable if true (default) this fuction is cachable
*/ */
function register_function($smarty, $function_tag, $function_impl, $cacheable = true, $cache_attr = array()) function Smarty_Method_Register_Function($smarty, $function_tag, $function_impl, $cacheable = true, $cache_attr = array())
{ {
if (isset($smarty->registered_plugins[$function_tag])) { if (isset($smarty->registered_plugins[$function_tag])) {
throw new Exception("Plugin tag \"{$function_tag}\" already registered"); throw new Exception("Plugin tag \"{$function_tag}\" already registered");

View File

@@ -17,7 +17,7 @@
* @param string $modifier name of template modifier * @param string $modifier name of template modifier
* @param string $modifier_impl name of PHP function to register * @param string $modifier_impl name of PHP function to register
*/ */
function register_modifier($smarty, $modifier, $modifier_impl) function Smarty_Method_Register_Modifier($smarty, $modifier, $modifier_impl)
{ {
if (isset($smarty->registered_plugins[$modifier])) { if (isset($smarty->registered_plugins[$modifier])) {
throw new Exception("Plugin \"{$modifier}\" already registered"); throw new Exception("Plugin \"{$modifier}\" already registered");

View File

@@ -20,7 +20,7 @@
* @param boolean $smarty_args smarty argument format, else traditional * @param boolean $smarty_args smarty argument format, else traditional
* @param null $ |array $block_functs list of methods that are block format * @param null $ |array $block_functs list of methods that are block format
*/ */
function register_object($smarty, $object, $object_impl, $allowed = array(), $smarty_args = true, $block_methods = array()) function Smarty_Method_Register_Object($smarty, $object, $object_impl, $allowed = array(), $smarty_args = true, $block_methods = array())
{ {
// test if allowed methodes callable // test if allowed methodes callable
if (!empty($allowed)) { if (!empty($allowed)) {

View File

@@ -17,7 +17,7 @@
* @param object $smarty * @param object $smarty
* @param callback $function * @param callback $function
*/ */
function register_outputfilter($smarty, $function) function Smarty_Method_Register_Outputfilter($smarty, $function)
{ {
$smarty->registered_filters['output'][$smarty->_get_filter_name($function)] = $function; $smarty->registered_filters['output'][$smarty->_get_filter_name($function)] = $function;
} }

View File

@@ -17,7 +17,7 @@
* @param object $smarty * @param object $smarty
* @param callback $function * @param callback $function
*/ */
function register_postfilter($smarty, $function) function Smarty_Method_Register_Postfilter($smarty, $function)
{ {
$smarty->registered_filters['post'][$smarty->_get_filter_name($function)] = $function; $smarty->registered_filters['post'][$smarty->_get_filter_name($function)] = $function;
} }

View File

@@ -17,7 +17,7 @@
* @param object $smarty * @param object $smarty
* @param callback $function * @param callback $function
*/ */
function register_prefilter($smarty, $function) function Smarty_Method_Register_Prefilter($smarty, $function)
{ {
$smarty->registered_filters['pre'][$smarty->_get_filter_name($function)] = $function; $smarty->registered_filters['pre'][$smarty->_get_filter_name($function)] = $function;
} }

View File

@@ -17,7 +17,7 @@
* @param string $type name of resource * @param string $type name of resource
* @param array $functions array of functions to handle resource * @param array $functions array of functions to handle resource
*/ */
function register_resource($smarty, $type, $functions) function Smarty_Method_Register_Resource($smarty, $type, $functions)
{ {
if (count($functions) == 4) { if (count($functions) == 4) {
$smarty->_plugins['resource'][$type] = $smarty->_plugins['resource'][$type] =

View File

@@ -17,7 +17,7 @@
* @param object $smarty * @param object $smarty
* @param callback $function * @param callback $function
*/ */
function register_variablefilter($smarty, $function) function Smarty_Method_Register_Variablefilter($smarty, $function)
{ {
$smarty->registered_filters['variable'][$smarty->_get_filter_name($function)] = $function; $smarty->registered_filters['variable'][$smarty->_get_filter_name($function)] = $function;
} }

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* Smarty method registerDefaultPluginhandlerHandler * Smarty method RegisterDefaultPluginhandlerHandler
* *
* Registers a default plugin handler * Registers a default plugin handler
* *
@@ -16,7 +16,7 @@
* @param object $smarty * @param object $smarty
* @param string $ |array $plugin class/methode name * @param string $ |array $plugin class/methode name
*/ */
function registerDefaultPluginHandler($smarty, $plugin) function Smarty_Method_RegisterDefaultPluginHandler($smarty, $plugin)
{ {
if (is_callable($plugin)) { if (is_callable($plugin)) {
$smarty->default_plugin_handler_func = $plugin; $smarty->default_plugin_handler_func = $plugin;

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* Smarty method registerDefaultTemplateHandler * Smarty method RegisterDefaultTemplateHandler
* *
* Registers a default template handler * Registers a default template handler
* *
@@ -16,7 +16,7 @@
* @param object $smarty * @param object $smarty
* @param string $ |array $function class/methode name * @param string $ |array $function class/methode name
*/ */
function registerDefaultTemplateHandler($smarty, $function) function Smarty_Method_RegisterDefaultTemplateHandler($smarty, $function)
{ {
if (is_callable($function)) { if (is_callable($function)) {
$smarty->default_template_handler_func = $function; $smarty->default_template_handler_func = $function;

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* Smarty method setConfigDir * Smarty method SetConfigDir
* *
* Sets directory of config files * Sets directory of config files
* *
@@ -17,7 +17,7 @@
* @param string $ config folder * @param string $ config folder
* @return * @return
*/ */
function SetConfigDir($smarty, $config_dir) function Smarty_Method_SetConfigDir($smarty, $config_dir)
{ {
$this->smarty->config_dir = $config_dir; $this->smarty->config_dir = $config_dir;
return; return;

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* Smarty method setDebugTemplate * Smarty method SetDebugTemplate
* *
* Sets debug template filepath * Sets debug template filepath
* *
@@ -19,7 +19,7 @@
* *
* @param string $ array debug template filepath * @param string $ array debug template filepath
*/ */
function SetDebugTemplate($smarty, $debug_tpl) function Smarty_Method_SetDebugTemplate($smarty, $debug_tpl)
{ {
$smarty->debug_tpl = $debug_tpl; $smarty->debug_tpl = $debug_tpl;
return; return;

View File

@@ -1,7 +1,7 @@
<?php <?php
/** /**
* Smarty method setPluginsDir * Smarty method SetPluginsDir
* *
* Sets directory of plugin files * Sets directory of plugin files
* *
@@ -20,7 +20,7 @@
* @param string $ plugins folder * @param string $ plugins folder
* @return * @return
*/ */
function SetPluginsDir($smarty, $plugins_dir) function Smarty_Method_SetPluginsDir($smarty, $plugins_dir)
{ {
$smarty->plugins_dir = (array)$plugins_dir; $smarty->plugins_dir = (array)$plugins_dir;
return; return;

View File

@@ -20,7 +20,7 @@
* @param string $resource_name template name * @param string $resource_name template name
* @return boolean status * @return boolean status
*/ */
function template_exists($smarty, $resource_name) function Smarty_Method_Template_Exists($smarty, $resource_name)
{ {
// create template object // create template object
$tpl = new $smarty->template_class($resource_name, $smarty); $tpl = new $smarty->template_class($resource_name, $smarty);

View File

@@ -8,7 +8,7 @@
* @subpackage plugins * @subpackage plugins
*/ */
function test($smarty) function Smarty_Method_Test($smarty)
{ {
echo "<PRE>\n"; echo "<PRE>\n";

View File

@@ -19,7 +19,7 @@
* *
* @param string $block_tag name of template function * @param string $block_tag name of template function
*/ */
function unregister_block($smarty, $block_tag) function Smarty_Method_Unregister_Block($smarty, $block_tag)
{ {
if (isset($smarty->registered_plugins[$block_tag]) && $smarty->registered_plugins[$block_tag][0] == 'block') { if (isset($smarty->registered_plugins[$block_tag]) && $smarty->registered_plugins[$block_tag][0] == 'block') {
unset($smarty->registered_plugins[$block_tag]); unset($smarty->registered_plugins[$block_tag]);

View File

@@ -19,7 +19,7 @@
* *
* @param string $compiler_tag name of template function * @param string $compiler_tag name of template function
*/ */
function unregister_compiler_function($smarty, $compiler_tag) function Smarty_Method_Unregister_Compiler_Function($smarty, $compiler_tag)
{ {
if (isset($smarty->registered_plugins[$compiler_tag]) && $smarty->registered_plugins[$compiler_tag][0] == 'compiler') { if (isset($smarty->registered_plugins[$compiler_tag]) && $smarty->registered_plugins[$compiler_tag][0] == 'compiler') {
unset($smarty->registered_plugins[$compiler_tag]); unset($smarty->registered_plugins[$compiler_tag]);

View File

@@ -19,7 +19,7 @@
* *
* @param string $function_tag name of template function * @param string $function_tag name of template function
*/ */
function unregister_function($smarty, $function_tag) function Smarty_Method_Unregister_Function($smarty, $function_tag)
{ {
if (isset($smarty->registered_plugins[$function_tag]) && $smarty->registered_plugins[$function_tag][0] == 'function') { if (isset($smarty->registered_plugins[$function_tag]) && $smarty->registered_plugins[$function_tag][0] == 'function') {
unset($smarty->registered_plugins[$function_tag]); unset($smarty->registered_plugins[$function_tag]);

View File

@@ -19,7 +19,7 @@
* *
* @param string $modifier name of template modifier * @param string $modifier name of template modifier
*/ */
function unregister_modifier($smarty, $modifier) function Smarty_Method_Unregister_Modifier($smarty, $modifier)
{ {
if (isset($smarty->registered_plugins[$modifier]) && $smarty->registered_plugins[$modifier][0] == 'modifier') { if (isset($smarty->registered_plugins[$modifier]) && $smarty->registered_plugins[$modifier][0] == 'modifier') {
unset($smarty->registered_plugins[$modifier]); unset($smarty->registered_plugins[$modifier]);

View File

@@ -20,7 +20,7 @@
* *
* @param string $object name of template object * @param string $object name of template object
*/ */
function unregister_object($smarty, $object) function Smarty_Method_Unregister_Object($smarty, $object)
{ {
unset($smarty->registered_objects[$object]); unset($smarty->registered_objects[$object]);
} }

View File

@@ -20,7 +20,7 @@
* *
* @param callback $function * @param callback $function
*/ */
function unregister_outputfilter($smarty, $function) function Smarty_Method_Unregister_Outputfilter($smarty, $function)
{ {
unset($smarty->registered_filters['output'][$smarty->_get_filter_name($function)]); unset($smarty->registered_filters['output'][$smarty->_get_filter_name($function)]);
} }

View File

@@ -19,7 +19,7 @@
* *
* @param callback $function * @param callback $function
*/ */
function unregister_postfilter($smarty, $function) function Smarty_Method_Unregister_Postfilter($smarty, $function)
{ {
unset($smarty->registered_filters['post'][$smarty->_get_filter_name($function)]); unset($smarty->registered_filters['post'][$smarty->_get_filter_name($function)]);
} }

View File

@@ -19,7 +19,7 @@
* *
* @param callback $function * @param callback $function
*/ */
function unregister_prefilter($smarty, $function) function Smarty_Method_Unregister_Prefilter($smarty, $function)
{ {
unset($smarty->registered_filters['pre'][$smarty->_get_filter_name($function)]); unset($smarty->registered_filters['pre'][$smarty->_get_filter_name($function)]);
} }

View File

@@ -19,7 +19,7 @@
* *
* @param string $type name of resource * @param string $type name of resource
*/ */
function Unregister_Resource($smarty, $type) function Smarty_Method_Unregister_Resource($smarty, $type)
{ {
unset($smarty->plugins['resource'][$type]); unset($smarty->plugins['resource'][$type]);
} }

View File

@@ -19,7 +19,7 @@
* *
* @param callback $function * @param callback $function
*/ */
function unregister_variablefilter($smarty, $function) function Smarty_Method_Unregister_Variablefilter($smarty, $function)
{ {
unset($smarty->registered_filters['variable'][$smarty->_get_filter_name($function)]); unset($smarty->registered_filters['variable'][$smarty->_get_filter_name($function)]);
} }

View File

@@ -10,7 +10,7 @@
/** /**
* This class does contain the security settings * This class does contain the security settings
*/ */
class Smarty_Security_Policy { class Smarty_Security {
/** /**
* This determines how Smarty handles "<?php ... ?>" tags in templates. * This determines how Smarty handles "<?php ... ?>" tags in templates.
* possible values: * possible values: