game/onyx2/modules/templates/smarty/sysplugins/smarty_method_get_config_vars.php

37 lines
689 B
PHP
Raw Normal View History

2020-11-15 15:12:32 +00:00
<?php
/**
* Smarty method Get_Config_Vars
*
* Returns a single or all global config variables
*
* @package Smarty
* @subpackage SmartyMethod
* @author Uwe Tews
*/
/**
* Returns a single or all global config variables
*/
/**
* Returns a single or all global config variables
*
* @param string $varname variable name or null
* @return string variable value or or array of variables
*/
function Get_Config_Vars($smarty, $varname = null)
{
if (isset($varname)) {
if (isset($smarty->config_vars[$varname])) {
return $smarty->config_vars[$varname];
} else {
return '';
}
} else {
return $smarty->config_vars;
}
}
?>