mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-01-22 16:28:10 -05:00
Tom git-svn-id: svn+ssh://jekkos@svn.code.sf.net/p/opensourcepos/code/@24 c3eb156b-1dc0-44e1-88ae-e38439141b53
25 lines
512 B
PHP
25 lines
512 B
PHP
<?php
|
|
//Loads configuration from database into global CI config
|
|
function load_config()
|
|
{
|
|
$CI =& get_instance();
|
|
foreach($CI->Appconfig->get_all()->result() as $app_config)
|
|
{
|
|
$CI->config->set_item($app_config->key,$app_config->value);
|
|
}
|
|
|
|
if ($CI->config->item('language'))
|
|
{
|
|
//$CI->lang->switch_to($CI->config->item('language'));
|
|
}
|
|
|
|
if ($CI->config->item('timezone'))
|
|
{
|
|
date_default_timezone_set($CI->config->item('timezone'));
|
|
}
|
|
else
|
|
{
|
|
date_default_timezone_set('America/New_York');
|
|
}
|
|
}
|
|
?>
|