From 1c61949d9cb936788a3bd2ac950d4716ccdb087a Mon Sep 17 00:00:00 2001 From: Lars Kneschke Date: Wed, 27 Dec 2000 22:58:42 +0000 Subject: [PATCH] it was not able to change preferences, because $preferences->account_id as not set --- phpgwapi/inc/phpgw.inc.php | 2 +- phpgwapi/inc/phpgw_accounts_shared.inc.php | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/phpgwapi/inc/phpgw.inc.php b/phpgwapi/inc/phpgw.inc.php index eff6cf59d6..982cc0930b 100644 --- a/phpgwapi/inc/phpgw.inc.php +++ b/phpgwapi/inc/phpgw.inc.php @@ -184,7 +184,7 @@ include($phpgw_info["server"]["api_inc"] . "/phpgw_accounts_".$phpgw_info["server"]["account_repository"].".inc.php"); include($phpgw_info["server"]["api_inc"] . "/phpgw_accounts_shared.inc.php"); $this->auth = new auth; - $this->preferences = new preferences; + $this->preferences = new preferences($phpgw_info["user"]["account_lid"]); } $this->accounts = new accounts; $this->translation = new translation; diff --git a/phpgwapi/inc/phpgw_accounts_shared.inc.php b/phpgwapi/inc/phpgw_accounts_shared.inc.php index d8f240796c..7d74bc5adf 100644 --- a/phpgwapi/inc/phpgw_accounts_shared.inc.php +++ b/phpgwapi/inc/phpgw_accounts_shared.inc.php @@ -199,6 +199,7 @@ function preferences($account_id=0) { global $phpgw; + $db2 = $phpgw->db; $load_pref = True; if (is_long($account_id) && $account_id) { @@ -224,9 +225,10 @@ // This should be called when you are done makeing changes to the preferences function commit($line = "",$file = "") { - //echo "
commit called
Line: $line
File: $file"; - global $phpgw, $phpgw_info; + + //echo "
commit called
Line: $line
File: $file".$phpgw_info["user"]["account_id"]."
"; + if ($this->account_id) { $db = $phpgw->db;