From d674b1e46bc418dd9bd25bfbf012dc7e9089e1aa Mon Sep 17 00:00:00 2001 From: skeeter Date: Mon, 8 Jan 2001 01:25:43 +0000 Subject: [PATCH] better way of handling preferences --- phpgwapi/inc/phpgw.inc.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/phpgwapi/inc/phpgw.inc.php b/phpgwapi/inc/phpgw.inc.php index 76c287a518..04f502a428 100644 --- a/phpgwapi/inc/phpgw.inc.php +++ b/phpgwapi/inc/phpgw.inc.php @@ -183,8 +183,8 @@ $this->session = new sessions; if ($phpgw_info["flags"]["currentapp"] == "login") { - $log = explode("@",$login); - $this->preferences = new preferences($log[0]); + $log = explode("@",$login); + $this->preferences = new preferences($log[0]); }else{ if (! $this->session->verify()) { $this->db->query("select config_value from config where config_name='webserver_url'",__LINE__,__FILE__); @@ -192,9 +192,7 @@ Header("Location: " . $this->redirect($this->link($this->db->f("config_value")."/login.php","cd=10"))); exit; } - $this->preferences->preference = $phpgw_info["user"]["preferences"]; - $this->preferences->account_id = $phpgw_info["user"]["account_id"]; - + $this->preferences = new preferences($phpgw_info["user"]["account_id"]); } $this->translation = new translation;