diff --git a/home.php b/home.php index f0be05bc8d..9cb762c95e 100755 --- a/home.php +++ b/home.php @@ -27,14 +27,27 @@ exit; } + if ($GLOBALS['phpgw_info']['server']['force_default_app'] && $GLOBALS['phpgw_info']['server']['force_default_app'] != 'user_choice') + { + $GLOBALS['phpgw_info']['user']['preferences']['common']['default_app'] = $GLOBALS['phpgw_info']['server']['force_default_app']; + } + + if ($GLOBALS['HTTP_GET_VARS']['cd']=='yes' && $GLOBALS['phpgw_info']['user']['preferences']['common']['default_app'] + && $GLOBALS['phpgw_info']['user']['apps'][$GLOBALS['phpgw_info']['user']['preferences']['common']['default_app']]) + { + //$GLOBALS['phpgw']->redirect($GLOBALS['phpgw']->link('/' . $GLOBALS['phpgw_info']['user']['preferences']['common']['default_app'] . '/' . 'index.php')); + Header('Location: ' . $GLOBALS['phpgw']->link('/' . $GLOBALS['phpgw_info']['user']['preferences']['common']['default_app'] . '/' . 'index.php')); + } + else + { $GLOBALS['phpgw_info']['flags'] = array ( - 'noheader' => True, - 'nonavbar' => True, - 'currentapp' => 'home', - 'enable_network_class' => True, - 'enable_contacts_class' => True, - 'enable_nextmatchs_class' => True + 'noheader' => True, + 'nonavbar' => True, + 'currentapp' => 'home', + 'enable_network_class' => True, + 'enable_contacts_class' => True, + 'enable_nextmatchs_class' => True ); include('header.inc.php'); @@ -50,45 +63,34 @@ $GLOBALS['phpgw']->redirect($GLOBALS['phpgw']->link($GLOBALS['phpgw_forward'],$extra_vars)); } - if ($GLOBALS['phpgw_info']['server']['force_default_app'] && $GLOBALS['phpgw_info']['server']['force_default_app'] != 'user_choice') + $GLOBALS['phpgw']->translation->add_app('mainscreen'); + if (lang('mainscreen_message') != 'mainscreen_message'.lang_char()) { - $GLOBALS['phpgw_info']['user']['preferences']['common']['default_app'] = $GLOBALS['phpgw_info']['server']['force_default_app']; + echo '
There is a new version of phpGroupWare available. http://www.phpgroupware.org'; - $GLOBALS['phpgw_info']['flags']['msgbox_data'][$message]=True; - } + $GLOBALS['phpgw_info']['flags']['msgbox_data'][$message]=True; + } - $_found = False; + $_found = False; $GLOBALS['phpgw']->db->query("select app_name,app_version from phpgw_applications",__LINE__,__FILE__); while($GLOBALS['phpgw']->db->next_record()) { @@ -211,8 +213,6 @@ $GLOBALS['phpgw']->preferences->save_repository(); } - if (!$GLOBALS['phpgw_info']['user']['preferences']['common']['default_app']) - { - $GLOBALS['phpgw']->xslttpl->set_var('phpgw',$GLOBALS['phpgw']->portalbox->output); + $GLOBALS['phpgw']->xslttpl->set_var('phpgw',$GLOBALS['phpgw']->portalbox->output); } ?> diff --git a/phpgwapi/inc/class.common.inc.php b/phpgwapi/inc/class.common.inc.php index 3a8e1fbb25..832e62a594 100644 --- a/phpgwapi/inc/class.common.inc.php +++ b/phpgwapi/inc/class.common.inc.php @@ -1240,10 +1240,7 @@ if (!@is_file(PHPGW_SERVER_ROOT . '/phpgwapi/templates/' . $GLOBALS['phpgw_info' switch($GLOBALS['phpgw_info']['flags']['currentapp']) { case 'home': - if (!$GLOBALS['phpgw_info']['user']['preferences']['common']['default_app']) - { - $var['home'] = True; - } + $var['home'] = True; break; case 'about': $var['about'] = True;