From 07e38bcecbbc4fe3fa47bbf8c716839915c461aa Mon Sep 17 00:00:00 2001 From: seek3r Date: Mon, 31 Dec 2001 16:10:12 +0000 Subject: [PATCH] fixed my new sorting so that admin will always be on top --- phpgwapi/inc/class.common.inc.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/phpgwapi/inc/class.common.inc.php b/phpgwapi/inc/class.common.inc.php index ce4aa3ae87..b1c743f9e0 100644 --- a/phpgwapi/inc/class.common.inc.php +++ b/phpgwapi/inc/class.common.inc.php @@ -892,6 +892,24 @@ reset($GLOBALS['phpgw_info']['user']['apps']); asort($GLOBALS['phpgw_info']['user']['apps']); + + if(is_array($GLOBALS['phpgw_info']['user']['apps']['admin'])) + { + $newarray['admin'] = $GLOBALS['phpgw_info']['user']['apps']['admin']; + while(list($index,$value) = each($GLOBALS['phpgw_info']['user']['apps'])) + { + if($index != 'admin') + { + $newarray[$index] = $value; + } + } + $GLOBALS['phpgw_info']['user']['apps'] = $newarray; + reset($GLOBALS['phpgw_info']['user']['apps']); + } + unset($index); + unset($value); + unset($newarray); + while ($permission = each($GLOBALS['phpgw_info']['user']['apps'])) { if (is_long($permission[0]))