From ba66e0718197e2bcbcbc0c2e339a63739230995f Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Wed, 20 Jan 2010 18:10:37 +0000 Subject: [PATCH] bug #2931216 Relations settings not updated on config change --- ChangeLog | 1 + libraries/Config.class.php | 1 + libraries/relation.lib.php | 12 ++++++------ 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 04edd1ba3..859e2fccf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -65,6 +65,7 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA - bug #2926613 [edit] Copy database shows errors when DB has foreign key 3.2.6.0 (not yet released) +- bug #2931216 [config] Relations settings not updated on config change 3.2.5.0 (2010-01-10) - patch #2903400 [bookmarks] Status of bookmark table, diff --git a/libraries/Config.class.php b/libraries/Config.class.php index 83ed2169e..433183b78 100644 --- a/libraries/Config.class.php +++ b/libraries/Config.class.php @@ -311,6 +311,7 @@ class PMA_Config || $this->error_config_file || $this->error_config_default_file) { $this->settings = array(); + unset($_SESSION['relation']); $this->load(); $this->checkSystem(); } diff --git a/libraries/relation.lib.php b/libraries/relation.lib.php index 7e05a07a0..6b1ac6753 100644 --- a/libraries/relation.lib.php +++ b/libraries/relation.lib.php @@ -43,7 +43,7 @@ function PMA_query_as_controluser($sql, $show_error = true, $options = 0) } // end of the "PMA_query_as_controluser()" function /** - * @uses $_SESSION['relation' . $GLOBALS['server']] for caching + * @uses $_SESSION['relation'][$GLOBALS['server']] for caching * @uses $GLOBALS['cfgRelation'] to set it * @uses $GLOBALS['server'] to ensure we are using server-specific pmadb * @uses PMA__getRelationsParam() @@ -53,19 +53,19 @@ function PMA_query_as_controluser($sql, $show_error = true, $options = 0) */ function PMA_getRelationsParam($verbose = false) { - if (empty($_SESSION['relation' . $GLOBALS['server']])) { - $_SESSION['relation' . $GLOBALS['server']] = PMA__getRelationsParam(); + if (empty($_SESSION['relation'][$GLOBALS['server']])) { + $_SESSION['relation'][$GLOBALS['server']] = PMA__getRelationsParam(); } // just for BC but needs to be before PMA_printRelationsParamDiagnostic() // which uses it - $GLOBALS['cfgRelation'] = $_SESSION['relation' . $GLOBALS['server']]; + $GLOBALS['cfgRelation'] = $_SESSION['relation'][$GLOBALS['server']]; if ($verbose) { - PMA_printRelationsParamDiagnostic($_SESSION['relation' . $GLOBALS['server']]); + PMA_printRelationsParamDiagnostic($_SESSION['relation'][$GLOBALS['server']]); } - return $_SESSION['relation' . $GLOBALS['server']]; + return $_SESSION['relation'][$GLOBALS['server']]; } /**