From e0cf9c169daf2c0e9d2e091b7a97f77d880cfdfa Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Fri, 13 Jun 2014 09:47:29 +0000 Subject: [PATCH] try to cope silently with removed app felamimail set as default_app --- index.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/index.php b/index.php index 8fe752e196..42ba018232 100755 --- a/index.php +++ b/index.php @@ -114,6 +114,17 @@ if($app == 'home' && !$api_requested && !($windowed && $_GET['cd'] == 'yes' && ! } if($GLOBALS['egw_info']['user']['preferences']['common']['default_app'] && !$hasupdates) { + // try to switch to mail on startup, if felamimail was called + if ($GLOBALS['egw_info']['user']['preferences']['common']['default_app']=='felamimail' && !isset($GLOBALS['egw_info']['user']['apps']['felamimail']) && isset($GLOBALS['egw_info']['user']['apps']['mail'])) + { + $GLOBALS['egw_info']['user']['preferences']['common']['default_app'] ='mail'; + if (isset($GLOBALS['egw']->preferences)) + { + $GLOBALS['egw']->preferences->add('common','default_app','mail','user'); + // save prefs + $GLOBALS['egw']->preferences->save_repository(true); + } + } egw::redirect(egw_framework::index($GLOBALS['egw_info']['user']['preferences']['common']['default_app']),$GLOBALS['egw_info']['user']['preferences']['common']['default_app']); } else