From 37d5278dbc944c278005d94e60ce23bbf9e82cda Mon Sep 17 00:00:00 2001 From: kink Date: Sat, 24 Jul 2004 11:39:46 +0000 Subject: [PATCH] When checking for prefs_are_cached we should retrieve this from the session the proper way. Closes #995102 git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@7764 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- ChangeLog | 1 + functions/db_prefs.php | 2 ++ functions/file_prefs.php | 4 ++++ 3 files changed, 7 insertions(+) diff --git a/ChangeLog b/ChangeLog index 37b8cf29..8850355d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -66,6 +66,7 @@ Version 1.5.1 -- CVS - Get alternating row colors of addressbook in sync with mailbox list. - Give proper error when PEAR DB not found. - Remove inappropriate strip_tags() from add-to-addressbook (#968475). + - Prefs caching didn't work properly with register_globals off (#995102). Version 1.5.0 -------------------- diff --git a/functions/db_prefs.php b/functions/db_prefs.php index 065080f3..2e54bed2 100644 --- a/functions/db_prefs.php +++ b/functions/db_prefs.php @@ -56,7 +56,9 @@ global $prefs_are_cached, $prefs_cache; function cachePrefValues($username) { global $prefs_are_cached, $prefs_cache; + sqgetGlobalVar('prefs_are_cached', $prefs_are_cached, SQ_SESSION ); if ($prefs_are_cached) { + sqgetGlobalVar('prefs_cache', $prefs_cache, SQ_SESSION ); return; } diff --git a/functions/file_prefs.php b/functions/file_prefs.php index d8a5cc97..2cc152d1 100644 --- a/functions/file_prefs.php +++ b/functions/file_prefs.php @@ -21,7 +21,9 @@ include_once(SM_PATH . 'functions/display_messages.php'); function cachePrefValues($data_dir, $username) { global $prefs_are_cached, $prefs_cache; + sqgetGlobalVar('prefs_are_cached', $prefs_are_cached, SQ_SESSION ); if ( isset($prefs_are_cached) && $prefs_are_cached) { + sqgetGlobalVar('prefs_cache', $prefs_cache, SQ_SESSION ); return; } @@ -261,3 +263,5 @@ function getSig($data_dir, $username, $number) { } return $sig; } + +// vim: et ts=4 -- 2.25.1