diff --git a/phpgwapi/inc/class.applications.inc.php b/phpgwapi/inc/class.applications.inc.php index 80c299fe32..be1a6bc7b2 100755 --- a/phpgwapi/inc/class.applications.inc.php +++ b/phpgwapi/inc/class.applications.inc.php @@ -29,11 +29,10 @@ var $group_apps = Array(); function applications($var = ""){ - global $phpgw, $phpgw_info; + global $phpgw, $phpgw_info; if ($var != ""){ $this->users_enabled_apps(); } - } function users_enabled_apps() @@ -43,7 +42,6 @@ if (gettype($phpgw_info["apps"]) != "array") { $this->read_installed_apps(); } - reset ($phpgw_info["apps"]); while (list($app) = each($phpgw_info["apps"])) { if ($phpgw->acl->check("run",1,$app)) { $phpgw_info["user"]["apps"][$app] = array("title" => $phpgw_info["apps"][$app]["title"], "name" => $app, "enabled" => True, "status" => $phpgw_info["apps"][$app]["status"]); @@ -53,7 +51,7 @@ function read_installed_apps(){ global $phpgw, $phpgw_info; - $phpgw->db->query("select * from applications where app_enabled != '0' order by app_order",__LINE__,__FILE__); + $phpgw->db->query("select * from applications where app_enabled != '0' order by app_order asc",__LINE__,__FILE__); if($phpgw->db->num_rows()) { while ($phpgw->db->next_record()) { // echo "
TEST: " . $phpgw->db->f("app_order") . " - " . $phpgw->db->f("app_name"); diff --git a/phpgwapi/inc/class.phpgw.inc.php b/phpgwapi/inc/class.phpgw.inc.php index dd29569653..a01bbe7676 100644 --- a/phpgwapi/inc/class.phpgw.inc.php +++ b/phpgwapi/inc/class.phpgw.inc.php @@ -113,9 +113,9 @@ if (empty($phpgw_info["server"]["account_repository"])){$phpgw_info["server"]["account_repository"] = $phpgw_info["server"]["auth_type"];} $this->accounts = CreateObject("phpgwapi.accounts"); $this->preferences = CreateObject("phpgwapi.preferences"); - $this->applications = CreateObject("phpgwapi.applications"); $this->session = CreateObject("phpgwapi.sessions"); $this->acl = CreateObject("phpgwapi.acl"); + $this->applications = CreateObject("phpgwapi.applications"); if ($phpgw_info["flags"]["currentapp"] == "login") { $log = explode("@",$login); $this->preferences = CreateObject("phpgwapi.preferences", $log[0]);