2009-03-22 16:09:05 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Smarty methode Config_Load
|
|
|
|
*
|
|
|
|
* Loads a config file
|
|
|
|
*
|
|
|
|
* @package Smarty
|
|
|
|
* @subpackage Config
|
|
|
|
* @author Uwe Tews
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
2009-08-08 17:28:23 +00:00
|
|
|
* load a config file optionally load just selected sections
|
2009-03-22 16:09:05 +00:00
|
|
|
*
|
2009-08-08 17:28:23 +00:00
|
|
|
* @param object $smarty
|
|
|
|
* @param string $config_file filename
|
|
|
|
* @param mixed $sections array of section names, single section or null
|
2009-03-22 16:09:05 +00:00
|
|
|
*/
|
2009-08-08 17:28:23 +00:00
|
|
|
function config_load($smarty, $config_file, $sections = null)
|
|
|
|
{
|
|
|
|
// load Config class
|
|
|
|
$config = new Smarty_Internal_Config($config_file, $smarty);
|
|
|
|
$config->loadConfigVars($sections, $smarty);
|
2009-03-22 16:09:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
?>
|