mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-24 23:08:53 +01:00
Fix for bug #435743.
This commit is contained in:
parent
21cdde3247
commit
a704591312
@ -436,40 +436,30 @@
|
||||
|
||||
if ($phpgw_info['server']['force_theme'] == 'user_choice')
|
||||
{
|
||||
include(PHPGW_SERVER_ROOT . '/phpgwapi/themes/' . $phpgw_info['user']['preferences']['common']['theme'] . '.theme');
|
||||
|
||||
if ($phpgw_info['theme']['bg_color'] == '')
|
||||
{
|
||||
/* Looks like there was a problem finding that theme. Try the default */
|
||||
echo 'Warning: error locating selected theme';
|
||||
include (PHPGW_SERVER_ROOT . '/phpgwapi/themes/default.theme');
|
||||
if ($phpgw_info['theme']['bg_color'] == '')
|
||||
{
|
||||
/* Hope we don't get to this point. Better then the user seeing a */
|
||||
/* complety back screen and not know whats going on */
|
||||
echo '<body bgcolor="FFFFFF"><b>Fatal error: no themes found</b>';
|
||||
exit;
|
||||
}
|
||||
}
|
||||
$theme_to_load = $phpgw_info['user']['preferences']['common']['theme'];
|
||||
}
|
||||
else
|
||||
{
|
||||
include(PHPGW_SERVER_ROOT . '/phpgwapi/themes/' . $phpgw_info['server']['force_theme'] . '.theme');
|
||||
if ($phpgw_info['theme']['bg_color'] == '')
|
||||
{
|
||||
/* Looks like there was a problem finding that theme. Try the default */
|
||||
echo 'Warning: error locating selected theme';
|
||||
include (PHPGW_SERVER_ROOT . '/phpgwapi/themes/default.theme');
|
||||
if ($phpgw_info['theme']['bg_color'] == '')
|
||||
{
|
||||
/* Hope we don't get to this point. Better then the user seeing a */
|
||||
/* complety back screen and not know whats going on */
|
||||
echo '<body bgcolor="FFFFFF"><b>Fatal error: no themes found</b>';
|
||||
exit;
|
||||
}
|
||||
}
|
||||
$theme_to_load = $phpgw_info['server']['force_theme'];
|
||||
}
|
||||
|
||||
if(@file_exists(PHPGW_SERVER_ROOT . '/phpgwapi/themes/' . $theme_to_load . '.theme'))
|
||||
{
|
||||
include(PHPGW_SERVER_ROOT . '/phpgwapi/themes/' . $theme_to_load . '.theme');
|
||||
}
|
||||
elseif(@file_exists(PHPGW_SERVER_ROOT . '/phpgwapi/themes/default.theme'))
|
||||
{
|
||||
include(PHPGW_SERVER_ROOT . '/phpgwapi/themes/default.theme');
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Hope we don't get to this point. Better then the user seeing a */
|
||||
/* complety back screen and not know whats going on */
|
||||
echo '<body bgcolor="FFFFFF"><b>Fatal error: no themes found</b>';
|
||||
exit;
|
||||
}
|
||||
unset($theme_to_load);
|
||||
|
||||
/*************************************************************************\
|
||||
* If they are using frames, we need to set some variables *
|
||||
\*************************************************************************/
|
||||
|
Loading…
Reference in New Issue
Block a user