From 1cc3e273086d6ecadfd33073b3a345ce6ff4126d Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Sat, 21 Dec 2013 10:09:55 -0500 Subject: [PATCH] bug #2961 Relations settings not updated on config change Signed-off-by: Marc Delisle --- ChangeLog | 1 + libraries/relation.lib.php | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 2e5c239487..c0545990e0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,7 @@ phpMyAdmin - ChangeLog - bug #2760 Warn about incomplete exports - bug #4190 Fractional seconds cause row update even if the value is not changed - bug #4170 Overflow scroll for table grid is not a good solution +- bug #2961 Relations settings not updated on config change 4.1.1.0 (2013-12-17) - bug #4154 Error using UNION query diff --git a/libraries/relation.lib.php b/libraries/relation.lib.php index 467def2847..3f06bd67a5 100644 --- a/libraries/relation.lib.php +++ b/libraries/relation.lib.php @@ -59,6 +59,10 @@ function PMA_queryAsControlUser($sql, $show_error = true, $options = 0) */ function PMA_getRelationsParam() { + // avoid breakage if pmadb got unconfigured after login + if (empty($GLOBALS['cfg']['Server']['pmadb'])) { + unset($_SESSION['relation'][$GLOBALS['server']]); + } if (empty($_SESSION['relation'][$GLOBALS['server']])) { $_SESSION['relation'][$GLOBALS['server']] = PMA_checkRelationsParam(); } @@ -527,7 +531,7 @@ function PMA_checkRelationsParam() ) { $cfgRelation['allworks'] = true; } - +error_log(var_export($cfgRelation, true)); return $cfgRelation; } // end of the 'PMA_getRelationsParam()' function