From a8282cbfa3f17059ca276dfa7769a0efaedea88f Mon Sep 17 00:00:00 2001 From: Janusz Dobrowolski Date: Tue, 2 Feb 2010 12:01:49 +0000 Subject: [PATCH] Small fixes in sys_prefs update/retrieval. --- CHANGELOG.txt | 2 ++ admin/db/company_db.inc | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 1946e0f0..d31867ae 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -22,6 +22,8 @@ $ -> Affected files 02-Feb-2010 Janusz Dobrowolski # Missing closing bracket $ /sql/alter2.3.php +# Small fixes in sys_prefs update/retrieve +$ /admin/db/company_db.inc 02-Feb-2010 Merged changes from main trunk 2.2.4-2.2.5 as follows ------------------------------- Release 2.2.5 ---------------------------------- diff --git a/admin/db/company_db.inc b/admin/db/company_db.inc index bca6a1cc..632bab18 100644 --- a/admin/db/company_db.inc +++ b/admin/db/company_db.inc @@ -19,6 +19,8 @@ function update_company_prefs( $params ) if (!db_query($sql. db_escape($value). " WHERE name=".db_escape($name), "The company prefferences could not be updated ")) return false; + // update cached value + $_SESSION['SysPrefs']->prefs[$name] = $value; } return true; } @@ -57,7 +59,7 @@ function get_company_pref($prefs = null, $tbpref = TB_PREF) if (!$prefs) return $all; elseif (is_string($prefs)) - return $all[$prefs]; + return @$all[$prefs]; $ret = array(); foreach($prefs as $name) -- 2.30.2