From 70c6e5a32c2da720b05a9c75e1e90fef1dd86171 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Mon, 4 May 2009 16:32:16 +0000 Subject: [PATCH] rfe #2657696 Automatically copy generated password --- ChangeLog | 1 + js/server_privileges.js | 19 +++---------------- libraries/display_change_password.lib.php | 1 - server_privileges.php | 1 - 4 files changed, 4 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8fcf1ae7d..ae633a14e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -59,6 +59,7 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA thanks to Tomas Srnka - tomassrnka + patch #2745215 [edit] Multi-row change with "]" improved, thanks to Virsacer - virsacer ++ rfe #2657696 Automatically copy generated password 3.1.5.0 (not yet released) - patch #2739001 [export] XML does not allow spaces in element names, diff --git a/js/server_privileges.js b/js/server_privileges.js index ac9396d86..a6270165c 100644 --- a/js/server_privileges.js +++ b/js/server_privileges.js @@ -71,8 +71,7 @@ function checkAddUser(the_form) /** - * Generate a new password, which may then be copied to the form - * with suggestPasswordCopy(). + * Generate a new password and copy it to the password input areas * * @param string the form name * @@ -90,19 +89,7 @@ function suggestPassword() { for ( i = 0; i < passwordlength; i++ ) { passwd.value += pwchars.charAt( Math.floor( Math.random() * pwchars.length ) ) } - return passwd.value; -} - - -/** - * Copy the generated password (or anything in the field) to the form - * - * @param string the form name - * - * @return boolean always true - */ -function suggestPasswordCopy() { - document.getElementById('text_pma_pw').value = document.getElementById('generated_pw').value; - document.getElementById('text_pma_pw2').value = document.getElementById('generated_pw').value; + document.getElementById('text_pma_pw').value = passwd.value; + document.getElementById('text_pma_pw2').value = passwd.value; return true; } diff --git a/libraries/display_change_password.lib.php b/libraries/display_change_password.lib.php index a324b7f57..35960ecb7 100644 --- a/libraries/display_change_password.lib.php +++ b/libraries/display_change_password.lib.php @@ -73,7 +73,6 @@ $chg_evt_handler = (PMA_USR_BROWSER_AGENT == 'IE' && PMA_USR_BROWSER_VER >= 5) - diff --git a/server_privileges.php b/server_privileges.php index 69d0ffeae..acad908f7 100644 --- a/server_privileges.php +++ b/server_privileges.php @@ -784,7 +784,6 @@ function PMA_displayLoginInformationFields($mode = 'new') . '' . "\n" . '' . "\n" . ' ' . "\n" - . ' ' . "\n" . '' . "\n" . '' . "\n" . '' . "\n"