Code

Updated smarty
[gosa.git] / gosa-core / include / smarty / sysplugins / smarty_method_get_config_vars.php
1 <?php
3 /**
4 * Smarty method Get_Config_Vars
5
6 * Returns a single or all global config variables
7
8 * @package Smarty
9 * @subpackage SmartyMethod
10 * @author Uwe Tews 
11 */
13 /**
14 * Returns a single or all global config variables
15 */
17 /**
18 * Returns a single or all global config variables
19
20 * @param string $varname variable name or null
21 * @return string variable value or or array of variables
22 */
23 function  Smarty_Method_Get_Config_Vars($smarty, $varname = null)
24 {
25     if (isset($varname)) {
26         if (isset($smarty->config_vars[$varname])) {
27             return $smarty->config_vars[$varname];
28         } else {
29             return '';
30         } 
31     } else {
32         return $smarty->config_vars;
33     } 
34
36 ?>