bug #2931216 Relations settings not updated on config change

This commit is contained in:
Marc Delisle
2010-01-20 18:10:37 +00:00
parent 8cae0a1d0f
commit ba66e07181
3 changed files with 8 additions and 6 deletions

View File

@@ -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 - bug #2926613 [edit] Copy database shows errors when DB has foreign key
3.2.6.0 (not yet released) 3.2.6.0 (not yet released)
- bug #2931216 [config] Relations settings not updated on config change
3.2.5.0 (2010-01-10) 3.2.5.0 (2010-01-10)
- patch #2903400 [bookmarks] Status of bookmark table, - patch #2903400 [bookmarks] Status of bookmark table,

View File

@@ -311,6 +311,7 @@ class PMA_Config
|| $this->error_config_file || $this->error_config_file
|| $this->error_config_default_file) { || $this->error_config_default_file) {
$this->settings = array(); $this->settings = array();
unset($_SESSION['relation']);
$this->load(); $this->load();
$this->checkSystem(); $this->checkSystem();
} }

View File

@@ -43,7 +43,7 @@ function PMA_query_as_controluser($sql, $show_error = true, $options = 0)
} // end of the "PMA_query_as_controluser()" function } // 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['cfgRelation'] to set it
* @uses $GLOBALS['server'] to ensure we are using server-specific pmadb * @uses $GLOBALS['server'] to ensure we are using server-specific pmadb
* @uses PMA__getRelationsParam() * @uses PMA__getRelationsParam()
@@ -53,19 +53,19 @@ function PMA_query_as_controluser($sql, $show_error = true, $options = 0)
*/ */
function PMA_getRelationsParam($verbose = false) function PMA_getRelationsParam($verbose = false)
{ {
if (empty($_SESSION['relation' . $GLOBALS['server']])) { if (empty($_SESSION['relation'][$GLOBALS['server']])) {
$_SESSION['relation' . $GLOBALS['server']] = PMA__getRelationsParam(); $_SESSION['relation'][$GLOBALS['server']] = PMA__getRelationsParam();
} }
// just for BC but needs to be before PMA_printRelationsParamDiagnostic() // just for BC but needs to be before PMA_printRelationsParamDiagnostic()
// which uses it // which uses it
$GLOBALS['cfgRelation'] = $_SESSION['relation' . $GLOBALS['server']]; $GLOBALS['cfgRelation'] = $_SESSION['relation'][$GLOBALS['server']];
if ($verbose) { if ($verbose) {
PMA_printRelationsParamDiagnostic($_SESSION['relation' . $GLOBALS['server']]); PMA_printRelationsParamDiagnostic($_SESSION['relation'][$GLOBALS['server']]);
} }
return $_SESSION['relation' . $GLOBALS['server']]; return $_SESSION['relation'][$GLOBALS['server']];
} }
/** /**