mirror of
https://github.com/smarty-php/smarty.git
synced 2025-11-02 21:31:48 +01:00
- change of filenames in sysplugins folder for internal spl_autoload function
- lexer/parser changed for increased compilation speed
This commit is contained in:
30
libs/sysplugins/smarty_method_clear_config.php
Normal file
30
libs/sysplugins/smarty_method_clear_config.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Smarty method Get_Config_Vars
|
||||
*
|
||||
* Returns a single or all global config variables
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage SmartyMethod
|
||||
* @author Uwe Tews
|
||||
*/
|
||||
|
||||
/**
|
||||
* Deassigns a single or all global config variables
|
||||
*
|
||||
* @param object $smarty
|
||||
* @param string $varname variable name or null
|
||||
*/
|
||||
function clear_config($smarty, $varname = null)
|
||||
{
|
||||
if (isset($varname)) {
|
||||
unset($smarty->config_vars[$varname]);
|
||||
return;
|
||||
} else {
|
||||
$smarty->config_vars = array();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user