diff --git a/phpgwapi/inc/class.accounts_sql.inc.php b/phpgwapi/inc/class.accounts_sql.inc.php
index 7cdc8bc67b..fcf2ff0319 100644
--- a/phpgwapi/inc/class.accounts_sql.inc.php
+++ b/phpgwapi/inc/class.accounts_sql.inc.php
@@ -47,11 +47,10 @@
. $db2->f("account_lastname");
$phpgw_info["user"]["groups"] = explode (",", $db2->f("account_groups"));
- $apps = CreateObject('phpgwapi.applications',intval($phpgw_info["user"]["account_id"]));
- $prefs = CreateObject('phpgwapi.preferences',intval($phpgw_info["user"]["account_id"]));
- $phpgw_info["user"]["preferences"] = $prefs->get_saved_preferences();
- $phpgw_info["user"]["app_perms"] = $apps->app_perms();
- $phpgw_info["user"]["apps"] = $apps->enabled_apps();
+// $apps = CreateObject('phpgwapi.applications',intval($phpgw_info["user"]["account_id"]));
+// $prefs = CreateObject('phpgwapi.preferences',intval($phpgw_info["user"]["account_id"]));
+// $phpgw_info["user"]["preferences"] = $prefs->get_saved_preferences();
+// $phpgw_info["user"]["apps"] = $apps->enabled_apps();
$phpgw_info["user"]["lastlogin"] = $db2->f("account_lastlogin");
$phpgw_info["user"]["lastloginfrom"] = $db2->f("account_lastloginfrom");
@@ -76,11 +75,10 @@
$userData["fullname"] = $db2->f("account_firstname") . " "
. $db2->f("account_lastname");
$userData["groups"] = explode(",", $db2->f("account_groups"));
- $apps = CreateObject('phpgwapi.applications',intval($phpgw_info["user"]["account_id"]));
- $prefs = CreateObject('phpgwapi.preferences',intval($phpgw_info["user"]["account_id"]));
- $userData["preferences"] = $prefs->get_saved_preferences();
- $userData["app_perms"] = $apps->app_perms();
- $userData["apps"] = $apps->enabled_apps();
+// $apps = CreateObject('phpgwapi.applications',intval($phpgw_info["user"]["account_id"]));
+// $prefs = CreateObject('phpgwapi.preferences',intval($phpgw_info["user"]["account_id"]));
+// $userData["preferences"] = $prefs->get_saved_preferences();
+// $userData["apps"] = $apps->enabled_apps();
$userData["lastlogin"] = $db2->f("account_lastlogin");
$userData["lastloginfrom"] = $db2->f("account_lastloginfrom");
diff --git a/phpgwapi/inc/class.applications.inc.php b/phpgwapi/inc/class.applications.inc.php
index e2c7b2d970..1affaf717f 100755
--- a/phpgwapi/inc/class.applications.inc.php
+++ b/phpgwapi/inc/class.applications.inc.php
@@ -59,9 +59,8 @@
if ($check) {
$this->account_apps[$app] = array("title" => $phpgw_info["apps"][$app]["title"], "name" => $app, "enabled" => True, "status" => $phpgw_info["apps"][$app]["status"]);
}
- return $this->account_apps;
}
- return False;
+ return $this->account_apps;
}
function app_perms()
diff --git a/phpgwapi/inc/class.phpgw.inc.php b/phpgwapi/inc/class.phpgw.inc.php
index f84ca525bb..ef574f32d8 100644
--- a/phpgwapi/inc/class.phpgw.inc.php
+++ b/phpgwapi/inc/class.phpgw.inc.php
@@ -114,29 +114,23 @@
$this->acl = CreateObject("phpgwapi.acl");
$this->accounts = CreateObject("phpgwapi.accounts");
$this->session = CreateObject("phpgwapi.sessions");
-// $this->applications = CreateObject("phpgwapi.applications");
-// $this->preferences = CreateObject("phpgwapi.preferences");
-//echo "check point 1
\n";
if ($phpgw_info["flags"]["currentapp"] == "login") {
-//echo "check point 2
\n";
if ($login != ""){
$log = explode("@",$login);
$this->preferences = CreateObject("phpgwapi.preferences", $log[0]);
-// $this->applications = CreateObject("phpgwapi.applications", $log[0]);
}
}else{
-//echo "check point 3
\n";
if (! $this->session->verify()) {
-//echo "check point 4
\n";
$this->db->query("select config_value from config where config_name='webserver_url'",__LINE__,__FILE__);
$this->db->next_record();
Header("Location: " . $this->redirect($this->link($this->db->f("config_value")."/login.php","cd=10")));
exit;
}
-//echo "check point 5
\n";
$this->preferences = CreateObject("phpgwapi.preferences", intval($phpgw_info["user"]["account_id"]));
$this->applications = CreateObject("phpgwapi.applications", intval($phpgw_info["user"]["account_id"]));
- }
+ $phpgw_info["user"]["preferences"] = $this->preferences->get_saved_preferences();
+ $phpgw_info["user"]["apps"] = $this->applications->enabled_apps();
+ }
$this->translation = CreateObject("phpgwapi.translation");
$sep = $phpgw_info["server"]["dir_separator"];
diff --git a/phpgwapi/inc/class.preferences.inc.php b/phpgwapi/inc/class.preferences.inc.php
index b37714e4aa..0218d68e04 100644
--- a/phpgwapi/inc/class.preferences.inc.php
+++ b/phpgwapi/inc/class.preferences.inc.php
@@ -32,7 +32,6 @@
function preferences($account_id = "")
{
-//echo "Account_id = ".$account_id."
\n";
global $phpgw, $phpgw_info;
$this->db = $phpgw->db;
if ($account_id == ""){
@@ -55,8 +54,6 @@
$this->preference = Array();
$this->preference = unserialize($pref_info);
$this->db->unlock();
-//echo "Account ID (get_saved_pref) = ".$this->account_id."
\n";
-//echo "Preferences = ".$this->preference."
\n";
return $this->preference;
}
@@ -64,8 +61,6 @@
function get_preferences()
{
global $phpgw;
-//echo "Account ID (get_pref) = ".$this->account_id."
\n";
-//echo "Preferences = ".$this->preference."
\n";
return $this->preference;
}