From d4fdf5a6c4b79af845051ac8e2a1b21cca1052bc Mon Sep 17 00:00:00 2001 From: Jo Michael Date: Fri, 20 Apr 2012 23:29:54 +0200 Subject: [PATCH 1/7] Fix undefined variable $cfg in user_password.php --- user_password.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/user_password.php b/user_password.php index d7b8cc03e5..a9e21827b3 100644 --- a/user_password.php +++ b/user_password.php @@ -175,14 +175,14 @@ function PMA_changePassAuthType($_url_params, $password) * Changes password cookie if required * Duration = till the browser is closed for password (we don't want this to be saved) */ - if ($cfg['Server']['auth_type'] == 'cookie') { + if ($GLOBALS['cfg']['Server']['auth_type'] == 'cookie') { $GLOBALS['PMA_Config']->setCookie('pmaPass-' . $server, PMA_blowfish_encrypt($password, $GLOBALS['cfg']['blowfish_secret'])); } /** * For http auth. mode, the "back" link will also enforce new * authentication */ - if ($cfg['Server']['auth_type'] == 'http') { + if ($GLOBALS['cfg']['Server']['auth_type'] == 'http') { $_url_params['old_usr'] = 'relog'; } return $_url_params; From 42959cbde9a60719d1a45912cacd224690d18072 Mon Sep 17 00:00:00 2001 From: Jo Michael Date: Fri, 20 Apr 2012 23:32:44 +0200 Subject: [PATCH 2/7] Fix Undefined index: db in libraries/Tracker.class.php --- libraries/Tracker.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/Tracker.class.php b/libraries/Tracker.class.php index 590b81e376..eee5ffd6a4 100644 --- a/libraries/Tracker.class.php +++ b/libraries/Tracker.class.php @@ -874,7 +874,7 @@ class PMA_Tracker $result = self::parseQuery($query); // Get database name - $dbname = trim($GLOBALS['db'], '`'); + $dbname = trim(isset($GLOBALS['db']) ? $GLOBALS['db'] : '', '`'); // $dbname can be empty, for example when coming from Synchronize // and this is a query for the remote server if (empty($dbname)) { From f1b43c6113e3f569e7dc942aa9773d4f0cacec05 Mon Sep 17 00:00:00 2001 From: Jo Michael Date: Fri, 20 Apr 2012 23:38:26 +0200 Subject: [PATCH 3/7] When adding user in server privileges, autofocus username input --- js/server_privileges.js | 1 + server_privileges.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/js/server_privileges.js b/js/server_privileges.js index 9edd6a71fe..8eefef7280 100644 --- a/js/server_privileges.js +++ b/js/server_privileges.js @@ -263,6 +263,7 @@ $(document).ready(function() { displayPasswordGenerateButton(); PMA_convertFootnotesToTooltips($div); PMA_ajaxRemoveMessage($msgbox); + $div.find("input[autofocus]").focus(); }); // end $.get() });//end of Add New User AJAX event handler diff --git a/server_privileges.php b/server_privileges.php index 749e33e5bd..8c39fc2dff 100644 --- a/server_privileges.php +++ b/server_privileges.php @@ -882,7 +882,7 @@ function PMA_displayLoginInformationFields($mode = 'new') : $GLOBALS['username'] ) . '"' ) - . ' onchange="pred_username.value = \'userdefined\';" />' . "\n" + . ' onchange="pred_username.value = \'userdefined\';" autofocus="autofocus" />' . "\n" . '' . "\n" . '
' . "\n" . '