From 956315e0b2e06a90544f721763894708b427bb66 Mon Sep 17 00:00:00 2001 From: Crack Date: Sat, 10 Jul 2010 21:51:54 +0200 Subject: [PATCH] bugfix: show warning only when pmadb is unavailable --- libraries/user_preferences.inc.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libraries/user_preferences.inc.php b/libraries/user_preferences.inc.php index 1bdbe3a91..ad69848d9 100644 --- a/libraries/user_preferences.inc.php +++ b/libraries/user_preferences.inc.php @@ -75,9 +75,12 @@ $msg = PMA_Message::notice('Debug: ' . $arr2); $msg->display(); // warn about using session storage for settings -$msg = __('Your preferences will be saved only for current session. Storing them permanently requires %spmadb%s.'); -$msg = PMA_sanitize(sprintf($msg, '[a@http://wiki.phpmyadmin.net/pma/pmadb@_blank]', '[/a]')); -PMA_Message::notice($msg)->display(); +$cfgRelation = PMA_getRelationsParam(); +if (!$cfgRelation['userconfigwork']) { + $msg = __('Your preferences will be saved only for current session. Storing them permanently requires %spmadb%s.'); + $msg = PMA_sanitize(sprintf($msg, '[a@http://wiki.phpmyadmin.net/pma/pmadb@_blank]', '[/a]')); + PMA_Message::notice($msg)->display(); +} if (isset($error) && $error) { if (!$error instanceof PMA_Message) {