fixed loading of template files. They didnt seem to work at all

This commit is contained in:
seek3r 2001-12-29 08:53:28 +00:00
parent 99e0c1517f
commit a245e7d06c

View File

@ -796,19 +796,24 @@
$GLOBALS['phpgw_info']['user']['preferences']['common']['theme'] = $GLOBALS['phpgw_info']['server']['template_set']; $GLOBALS['phpgw_info']['user']['preferences']['common']['theme'] = $GLOBALS['phpgw_info']['server']['template_set'];
} }
} }
if ($GLOBALS['phpgw_info']['server']['force_theme'] == 'user_choice') if ($GLOBALS['phpgw_info']['server']['force_theme'] == 'user_choice')
{ {
$theme_to_load = (isset($GLOBALS['phpgw_info']['user']['preferences']['common']['theme'])?$GLOBALS['phpgw_info']['user']['preferences']['common']['theme']:'default'); if (!isset($GLOBALS['phpgw_info']['user']['preferences']['common']['theme']))
{
$GLOBALS['phpgw_info']['user']['preferences']['common']['theme'] = 'default';
}
} }
else else
{ {
$theme_to_load = (isset($GLOBALS['phpgw_info']['server']['force_theme'])?$GLOBALS['phpgw_info']['server']['force_theme']:'default'); if (isset($GLOBALS['phpgw_info']['server']['force_theme']))
{
$GLOBALS['phpgw_info']['user']['preferences']['common']['theme'] = $GLOBALS['phpgw_info']['server']['force_theme'];
}
} }
if(@file_exists(PHPGW_SERVER_ROOT . '/phpgwapi/themes/' . $theme_to_load . '.theme')) if(@file_exists(PHPGW_SERVER_ROOT . '/phpgwapi/themes/' . $GLOBALS['phpgw_info']['user']['preferences']['common']['theme'] . '.theme'))
{ {
include(PHPGW_SERVER_ROOT . '/phpgwapi/themes/' . $theme_to_load . '.theme'); include(PHPGW_SERVER_ROOT . '/phpgwapi/themes/' . $GLOBALS['phpgw_info']['user']['preferences']['common']['theme'] . '.theme');
} }
elseif(@file_exists(PHPGW_SERVER_ROOT . '/phpgwapi/themes/default.theme')) elseif(@file_exists(PHPGW_SERVER_ROOT . '/phpgwapi/themes/default.theme'))
{ {
@ -853,6 +858,7 @@
{ {
echo parse_navbar(); echo parse_navbar();
} }
echo 'navbar_bg = '. $GLOBALS['phpgw_info']['theme']['navbar_bg'].'<br>';
$GLOBALS['phpgw']->log->write(array('text'=>'W-Permissions, Attempted to access %1','p1'=>$GLOBALS['phpgw_info']['flags']['currentapp'])); $GLOBALS['phpgw']->log->write(array('text'=>'W-Permissions, Attempted to access %1','p1'=>$GLOBALS['phpgw_info']['flags']['currentapp']));