Primer commit del sistema avantika sin cambios
This commit is contained in:
30
libs/sysplugins/smarty_method_clear_config.php
Executable file
30
libs/sysplugins/smarty_method_clear_config.php
Executable 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 Smarty_Method_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