until home works again, we use default_app from prefs (if set and not home) or calendar, if allowed, or first app found

This commit is contained in:
Ralf Becker 2014-02-13 13:18:48 +00:00
parent 62a559e498
commit 476f33af23
2 changed files with 10 additions and 0 deletions

View File

@ -96,6 +96,14 @@ if(@file_exists($tpl_info))
} }
} }
// until home works again, we redirect to default_app from prefs (if set and not home) or calendar, if allowed, or first app found
if ($app == 'home')
{
$app = $GLOBALS['egw_info']['user']['preferences']['common']['default_app'];
if (!$app || $app == 'home') $app = isset($GLOBALS['egw_info']['user']['apps']['calendar']) ? 'calendar' : key($GLOBALS['egw_info']['user']['apps']);
egw::redirect(egw_framework::index($app, $app));
}
if($app == 'home' && !$api_requested && !($windowed && $_GET['cd'] == 'yes' && !html::$ua_mobile)) if($app == 'home' && !$api_requested && !($windowed && $_GET['cd'] == 'yes' && !html::$ua_mobile))
{ {
if ($GLOBALS['egw_info']['server']['force_default_app'] && $GLOBALS['egw_info']['server']['force_default_app'] != 'user_choice') if ($GLOBALS['egw_info']['server']['force_default_app'] && $GLOBALS['egw_info']['server']['force_default_app'] != 'user_choice')

View File

@ -894,6 +894,8 @@ abstract class egw_framework
$apps = array(); $apps = array();
foreach($GLOBALS['egw_info']['user']['apps'] as $app => $data) foreach($GLOBALS['egw_info']['user']['apps'] as $app => $data)
{ {
// disable home until we get it working again
if ($app == 'home') continue;
if (is_long($app)) if (is_long($app))
{ {
continue; continue;