From 11ae5e79ec449704a501c72e1f0736a8b50d102f Mon Sep 17 00:00:00 2001 From: skeeter Date: Sun, 4 Nov 2001 04:08:17 +0000 Subject: [PATCH] Now takes into account if no showmainscreens are active. --- home.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/home.php b/home.php index eb65e369f9..f9bf0e4064 100755 --- a/home.php +++ b/home.php @@ -201,7 +201,7 @@ } /* This initializes the users portal_order preference if it does not exist. */ - if(!is_array($GLOBALS['phpgw_info']['user']['preferences']['portal_order'])) + if(!is_array($GLOBALS['phpgw_info']['user']['preferences']['portal_order']) && $GLOBALS['phpgw_info']['apps']) { $GLOBALS['phpgw']->preferences->delete('portal_order'); @reset($GLOBALS['phpgw_info']['apps']); @@ -243,13 +243,16 @@ @reset($sorted_apps); $GLOBALS['phpgw']->common->hook('home',$sorted_apps); - $GLOBALS['phpgw']->preferences->delete('portal_order'); - @reset($GLOBALS['portal_order']); - while(list($app_order,$app_id) = each($GLOBALS['portal_order'])) + if($GLOBALS['portal_order']) { - $GLOBALS['phpgw']->preferences->add('portal_order',$app_order,$app_id); + $GLOBALS['phpgw']->preferences->delete('portal_order'); + @reset($GLOBALS['portal_order']); + while(list($app_order,$app_id) = each($GLOBALS['portal_order'])) + { + $GLOBALS['phpgw']->preferences->add('portal_order',$app_order,$app_id); + } + $GLOBALS['phpgw']->preferences->save_repository(); } - $GLOBALS['phpgw']->preferences->save_repository(); //$phpgw->common->debug_phpgw_info(); //$phpgw->common->debug_list_core_functions();