diff --git a/phpgwapi/inc/class.accounts_shared.inc.php b/phpgwapi/inc/class.accounts_shared.inc.php index 25b2052755..52219a132e 100644 --- a/phpgwapi/inc/class.accounts_shared.inc.php +++ b/phpgwapi/inc/class.accounts_shared.inc.php @@ -38,8 +38,8 @@ } $phpgw_info["user"]["preferences"] = $phpgw->preferences->get_preferences(); $this->groups = $this->read_groups($phpgw_info["user"]["userid"]); - $apps = CreateObject('phpgwapi.applications',intval($phpgw_info["user"]["account_id"])); - //$phpgw_info["user"]["apps"] = $apps->apps_enabled(); + $apps = CreateObject('phpgwapi.applications'); + $phpgw_info["user"]["apps"] = $apps->users_enabled_apps(); } // use this if you make any changes to phpgw_info, including preferences, config table changes, etc diff --git a/phpgwapi/inc/class.applications.inc.php b/phpgwapi/inc/class.applications.inc.php index be1a6bc7b2..bc871242a2 100755 --- a/phpgwapi/inc/class.applications.inc.php +++ b/phpgwapi/inc/class.applications.inc.php @@ -28,13 +28,6 @@ var $user_apps = Array(); var $group_apps = Array(); - function applications($var = ""){ - global $phpgw, $phpgw_info; - if ($var != ""){ - $this->users_enabled_apps(); - } - } - function users_enabled_apps() { global $phpgw, $phpgw_info; diff --git a/phpgwapi/inc/class.phpgw.inc.php b/phpgwapi/inc/class.phpgw.inc.php index a01bbe7676..c572e1d128 100644 --- a/phpgwapi/inc/class.phpgw.inc.php +++ b/phpgwapi/inc/class.phpgw.inc.php @@ -119,7 +119,7 @@ if ($phpgw_info["flags"]["currentapp"] == "login") { $log = explode("@",$login); $this->preferences = CreateObject("phpgwapi.preferences", $log[0]); - $this->applications = CreateObject("phpgwapi.applications", $log[0]); + $this->applications = CreateObject("phpgwapi.applications"); }else{ if (! $this->session->verify()) { $this->db->query("select config_value from config where config_name='webserver_url'",__LINE__,__FILE__); @@ -128,7 +128,8 @@ exit; } $this->preferences = CreateObject("phpgwapi.preferences", intval($phpgw_info["user"]["account_id"])); - $this->applications = CreateObject("phpgwapi.applications", intval($phpgw_info["user"]["account_id"])); + $this->applications = CreateObject("phpgwapi.applications"); + $this->applications->users_enabled_apps(); } $this->translation = CreateObject("phpgwapi.translation");