diff --git a/ChangeLog b/ChangeLog index 86041d764..f267179fe 100755 --- a/ChangeLog +++ b/ChangeLog @@ -12,6 +12,8 @@ $Source$ * Documentation.html, line 557: extended the "relation" feature to PHP3. * libraries/common.lib.php3: tried to fix bug #520282 - mysql safe_show_database=on support. Must be fully tested now. + * user_details.php3; libraries/user_details.js; lang/*: feature request + #522450 - Wildcard db privileges. 2002-03-01 Olivier Müller * created the phpmyadmin-cvs mailing list, following the instructions diff --git a/lang/arabic.inc.php3 b/lang/arabic.inc.php3 index ae47ab078..0b6e7091a 100644 --- a/lang/arabic.inc.php3 +++ b/lang/arabic.inc.php3 @@ -344,6 +344,7 @@ $strCookiesRequired = 'Cookies must be enabled past this point.'; $strLogin = 'Login'; $strLogPassword = 'Password:'; $strLogUsername = 'Username:'; +$strNewDb = 'New database:'; //to translate $strRowsModeVertical = 'vertical'; //to translate $strRowsModeHorizontal = 'horizontal'; //to translate $strRowsModeOptions = ' in %s mode and repeat headers after %s cells'; //to translate diff --git a/lang/brazilian_portuguese.inc.php3 b/lang/brazilian_portuguese.inc.php3 index 7cc18db9a..5e1e5b58a 100644 --- a/lang/brazilian_portuguese.inc.php3 +++ b/lang/brazilian_portuguese.inc.php3 @@ -313,6 +313,7 @@ $strLogUsername = 'Username:'; $strMoveTable = 'Move table to (database.table):'; $strMoveTableOK = 'Table %s has been moved to %s.'; $strMySQLServerProcess = 'MySQL %pma_s1% running on %pma_s2% as %pma_s3%'; +$strNewDb = 'New database:'; //to translate $strNoFrames = 'phpMyAdmin is more friendly with a frames-capable browser.'; $strNoQuery = 'No SQL query!'; //to translate $strQueryOnDb = 'SQL-query on database %s:'; diff --git a/lang/bulgarian-koi8.inc.php3 b/lang/bulgarian-koi8.inc.php3 index 12088bb3e..185691880 100644 --- a/lang/bulgarian-koi8.inc.php3 +++ b/lang/bulgarian-koi8.inc.php3 @@ -346,4 +346,5 @@ $strYes = ' $strZip = '"zip-ÎÁÔÏ"'; // To translate +$strNewDb = 'New database:'; //to translate ?> diff --git a/lang/bulgarian-win1251.inc.php3 b/lang/bulgarian-win1251.inc.php3 index 2b2766f1a..902c6dad2 100644 --- a/lang/bulgarian-win1251.inc.php3 +++ b/lang/bulgarian-win1251.inc.php3 @@ -346,4 +346,5 @@ $strYes = ' $strZip = '"zip-íàòî"'; // To translate +$strNewDb = 'New database:'; //to translate ?> diff --git a/lang/catala.inc.php3 b/lang/catala.inc.php3 index 3a5ecdcd0..41487a404 100644 --- a/lang/catala.inc.php3 +++ b/lang/catala.inc.php3 @@ -345,4 +345,5 @@ $strYes = 'Si'; $strZip = '"comprimit amb zip"'; // To translate +$strNewDb = 'New database:'; //to translate ?> diff --git a/lang/chinese_big5.inc.php3 b/lang/chinese_big5.inc.php3 index b25b217f3..1df403086 100644 --- a/lang/chinese_big5.inc.php3 +++ b/lang/chinese_big5.inc.php3 @@ -347,4 +347,5 @@ $strYes = ' $strZip = '"zipped"'; // To translate +$strNewDb = 'New database:'; //to translate ?> diff --git a/lang/chinese_gb.inc.php3 b/lang/chinese_gb.inc.php3 index c8f4ab12e..8c52a9bcf 100644 --- a/lang/chinese_gb.inc.php3 +++ b/lang/chinese_gb.inc.php3 @@ -300,6 +300,7 @@ $strMoveTable = 'Move table to (database.table):'; $strMoveTableOK = 'Table %s has been moved to %s.'; $strMySQLServerProcess = 'MySQL %pma_s1% running on %pma_s2% as %pma_s3%'; $strNbRecords = 'no. of records'; +$strNewDb = 'New database:'; //to translate $strNoDatabases = 'No databases'; $strNoDropDatabases = '"DROP DATABASE" statements are disabled.'; $strNoFrames = 'phpMyAdmin is more friendly with a frames-capable browser.'; diff --git a/lang/czech-iso.inc.php3 b/lang/czech-iso.inc.php3 index b1354abc6..8c8fa9694 100644 --- a/lang/czech-iso.inc.php3 +++ b/lang/czech-iso.inc.php3 @@ -343,4 +343,7 @@ $strWrongUser = ' $strYes = 'Ano'; $strZip = '"zazipováno"'; +// To translate +$strNewDb = 'New database:'; //to translate + ?> diff --git a/lang/czech-win1250.inc.php3 b/lang/czech-win1250.inc.php3 index 97869500d..01ee67fc8 100644 --- a/lang/czech-win1250.inc.php3 +++ b/lang/czech-win1250.inc.php3 @@ -343,4 +343,8 @@ $strWrongUser = ' $strYes = 'Ano'; $strZip = '"zazipováno"'; + +// To translate +$strNewDb = 'New database:'; //to translate + ?> diff --git a/lang/danish.inc.php3 b/lang/danish.inc.php3 index ea1c71eaf..006e8839c 100644 --- a/lang/danish.inc.php3 +++ b/lang/danish.inc.php3 @@ -340,6 +340,7 @@ $strZip = '"zipped"'; //to translate $strAddToIndex = 'Add to index  %s column(s)'; $strCantRenameIdxToPrimary = 'Can\'t rename index to PRIMARY!'; $strCreateIndex = 'Create an index on %s columns'; +$strNewDb = 'New database:'; //to translate $strNoIndexPartsDefined = 'No index parts defined!'; $strPrimaryKeyWarning = '("PRIMARY" must be the name of and only of a primary key!)'; $strSelectADb = 'Please select a database'; diff --git a/lang/dutch.inc.php3 b/lang/dutch.inc.php3 index b477bd1dc..00706c8fc 100644 --- a/lang/dutch.inc.php3 +++ b/lang/dutch.inc.php3 @@ -306,6 +306,7 @@ $strLogUsername = 'Username:'; $strMoveTable = 'Move table to (database.table):'; $strMoveTableOK = 'Table %s has been moved to %s.'; $strMySQLServerProcess = 'MySQL %pma_s1% running on %pma_s2% as %pma_s3%'; +$strNewDb = 'New database:'; //to translate $strNoDropDatabases = '"DROP DATABASE" statements zijn niet mogelijk.'; //to translate $strNoFrames = 'phpMyAdmin is more friendly with a frames-capable browser.'; $strNoQuery = 'No SQL query!'; //to translate diff --git a/lang/english.inc.php3 b/lang/english.inc.php3 index 3a65719a4..57d4be6a7 100644 --- a/lang/english.inc.php3 +++ b/lang/english.inc.php3 @@ -190,6 +190,7 @@ $strMySQLShowVars = 'Show MySQL system variables'; $strName = 'Name'; $strNbRecords = 'Number of rows'; +$strNewDb = 'New database:'; $strNext = 'Next'; $strNo = 'No'; $strNoDatabases = 'No databases'; diff --git a/lang/finnish.inc.php3 b/lang/finnish.inc.php3 index 9a0ca9115..75e4b8b10 100644 --- a/lang/finnish.inc.php3 +++ b/lang/finnish.inc.php3 @@ -349,4 +349,5 @@ $strYes = 'Kyll $strZip = '"zip-pakattu"'; // To translate +$strNewDb = 'New database:'; //to translate ?> diff --git a/lang/french.inc.php3 b/lang/french.inc.php3 index 14060ce73..873ac4d76 100644 --- a/lang/french.inc.php3 +++ b/lang/french.inc.php3 @@ -190,6 +190,7 @@ $strMySQLShowVars = 'Afficher les variables du serveur MySQL'; $strName = 'Nom'; $strNbRecords = 'nb. d\'enregistrements'; +$strNewDb = 'Nouvelle base de données :'; $strNext = 'Suivant'; $strNo = 'Non'; $strNoDropDatabases = 'La commande "DROP DATABASE" est désactivée.'; diff --git a/lang/galician.inc.php3 b/lang/galician.inc.php3 index 15bf8452f..f8a736bcc 100644 --- a/lang/galician.inc.php3 +++ b/lang/galician.inc.php3 @@ -349,4 +349,5 @@ $strCardinality = 'Cardinality'; $strLogin = 'Login'; $strLogPassword = 'Password:'; $strLogUsername = 'Username:'; +$strNewDb = 'New database:'; //to translate ?> diff --git a/lang/german.inc.php3 b/lang/german.inc.php3 index 785399328..3e95890a7 100644 --- a/lang/german.inc.php3 +++ b/lang/german.inc.php3 @@ -345,5 +345,6 @@ $strYes = 'Ja'; $strZip = '"Zip komprimiert"'; // To translate +$strNewDb = 'New database:'; //to translate ?> diff --git a/lang/greek.inc.php3 b/lang/greek.inc.php3 index eed5e1c56..e6e8ac4f2 100644 --- a/lang/greek.inc.php3 +++ b/lang/greek.inc.php3 @@ -311,6 +311,7 @@ $strLogUsername = 'Username:'; $strMoveTable = 'Move table to (database.table):'; $strMoveTableOK = 'Table %s has been moved to %s.'; $strMySQLServerProcess = 'MySQL %pma_s1% running on %pma_s2% as %pma_s3%'; +$strNewDb = 'New database:'; //to translate $strNoFrames = 'phpMyAdmin is more friendly with a frames-capable browser.'; $strNoQuery = 'No SQL query!'; //to translate $strPrimaryKeyHasBeenDropped = 'The primary key has been dropped';//to translate diff --git a/lang/hebrew.inc.php3 b/lang/hebrew.inc.php3 index 2a9645f1a..b6ca797db 100644 --- a/lang/hebrew.inc.php3 +++ b/lang/hebrew.inc.php3 @@ -347,4 +347,6 @@ $strYes = ' $strZip = '"zipped"'; +// To translate +$strNewDb = 'New database:'; //to translate ?> diff --git a/lang/hungarian.inc.php3 b/lang/hungarian.inc.php3 index da6e8f828..353fcb51f 100644 --- a/lang/hungarian.inc.php3 +++ b/lang/hungarian.inc.php3 @@ -345,4 +345,6 @@ $strYes = 'Igen'; $strZip = '"zippel tömörítve"'; +// To translate +$strNewDb = 'New database:'; //to translate ?> diff --git a/lang/italian.inc.php3 b/lang/italian.inc.php3 index 2d781cdf9..ab79fdade 100644 --- a/lang/italian.inc.php3 +++ b/lang/italian.inc.php3 @@ -348,4 +348,5 @@ $strZip = '"compresso con zip"'; // To translate +$strNewDb = 'New database:'; //to translate ?> diff --git a/lang/japanese-euc.inc.php3 b/lang/japanese-euc.inc.php3 index b6d193b01..dc2e2305d 100644 --- a/lang/japanese-euc.inc.php3 +++ b/lang/japanese-euc.inc.php3 @@ -350,4 +350,5 @@ $strKanjiEncodConvert = ' $strXkana = 'Á´³Ñ¥«¥Ê¤ØÊÑ´¹¤¹¤ë'; // convert to X208-kana // To translate +$strNewDb = 'New database:'; //to translate ?> diff --git a/lang/japanese-sjis.inc.php3 b/lang/japanese-sjis.inc.php3 index 86e84fbcc..f676cd4c1 100644 --- a/lang/japanese-sjis.inc.php3 +++ b/lang/japanese-sjis.inc.php3 @@ -350,4 +350,5 @@ $strKanjiEncodConvert = ' $strXkana = '‘SŠpƒJƒi‚Ö•ÏŠ·‚·‚é'; // convert to X208-kana // To translate +$strNewDb = 'New database:'; //to translate ?> diff --git a/lang/korean.inc.php3 b/lang/korean.inc.php3 index 475d20b09..b4e126063 100644 --- a/lang/korean.inc.php3 +++ b/lang/korean.inc.php3 @@ -299,6 +299,7 @@ $strMoveTable = 'Move table to (database.table):'; $strMoveTableOK = 'Table %s has been moved to %s.'; $strMySQLServerProcess = 'MySQL %pma_s1% running on %pma_s2% as %pma_s3%'; $strNbRecords = 'no. of records'; +$strNewDb = 'New database:'; //to translate $strNoDatabases = 'No databases'; $strNoDropDatabases = '"DROP DATABASE" statements are disabled.'; $strNoFrames = 'phpMyAdmin is more friendly with a frames-capable browser.'; diff --git a/lang/norwegian.inc.php3 b/lang/norwegian.inc.php3 index 3e5cb53ee..8e97323ec 100644 --- a/lang/norwegian.inc.php3 +++ b/lang/norwegian.inc.php3 @@ -344,4 +344,5 @@ $strYes = 'Ja'; $strZip = '"komprimert (zip)"'; // To translate +$strNewDb = 'New database:'; //to translate ?> diff --git a/lang/polish.inc.php3 b/lang/polish.inc.php3 index 0481a1d0a..af6cf50a8 100644 --- a/lang/polish.inc.php3 +++ b/lang/polish.inc.php3 @@ -345,4 +345,5 @@ $strYes = 'Tak'; $strZip = '".zip"'; // To translate +$strNewDb = 'New database:'; //to translate ?> diff --git a/lang/portuguese.inc.php3 b/lang/portuguese.inc.php3 index 297c6a3bc..00cfe045e 100644 --- a/lang/portuguese.inc.php3 +++ b/lang/portuguese.inc.php3 @@ -345,4 +345,5 @@ $strYes = 'Sim'; $strZip = '"zipped"'; //to translate // To translate +$strNewDb = 'New database:'; //to translate ?> diff --git a/lang/romanian.inc.php3 b/lang/romanian.inc.php3 index 972ad24f0..5484d62a2 100644 --- a/lang/romanian.inc.php3 +++ b/lang/romanian.inc.php3 @@ -345,4 +345,5 @@ $strYes = 'Da'; $strZip = '"zipped"'; // To translate +$strNewDb = 'New database:'; //to translate ?> diff --git a/lang/russian-koi8.inc.php3 b/lang/russian-koi8.inc.php3 index 769f5e153..063d5c1e1 100644 --- a/lang/russian-koi8.inc.php3 +++ b/lang/russian-koi8.inc.php3 @@ -345,4 +345,5 @@ $strYes = ' $strZip = 'ÕÐÁËÏ×ÁÔØ × "zip"'; // To translate +$strNewDb = 'New database:'; //to translate ?> diff --git a/lang/russian-win1251.inc.php3 b/lang/russian-win1251.inc.php3 index 3bb4600fc..a5fa0e851 100644 --- a/lang/russian-win1251.inc.php3 +++ b/lang/russian-win1251.inc.php3 @@ -345,4 +345,5 @@ $strYes = ' $strZip = 'óïàêîâàòü â "zip"'; // To translate +$strNewDb = 'New database:'; //to translate ?> diff --git a/lang/slovak-iso.inc.php3 b/lang/slovak-iso.inc.php3 index d426f3f49..66300d6b2 100644 --- a/lang/slovak-iso.inc.php3 +++ b/lang/slovak-iso.inc.php3 @@ -348,4 +348,5 @@ $strZip = '"zo zipovan // To translate +$strNewDb = 'New database:'; //to translate ?> diff --git a/lang/slovak-win1250.inc.php3 b/lang/slovak-win1250.inc.php3 index d9fd31eaa..9562bc6dd 100644 --- a/lang/slovak-win1250.inc.php3 +++ b/lang/slovak-win1250.inc.php3 @@ -345,5 +345,6 @@ $strZip = '"zozipovan // To translate +$strNewDb = 'New database:'; //to translate ?> diff --git a/lang/spanish.inc.php3 b/lang/spanish.inc.php3 index e99649c90..e8043a8f8 100644 --- a/lang/spanish.inc.php3 +++ b/lang/spanish.inc.php3 @@ -325,6 +325,7 @@ $strLogin = 'Login'; $strLogPassword = 'Password:'; $strLogUsername = 'Username:'; $strMySQLServerProcess = 'MySQL %pma_s1% running on %pma_s2% as %pma_s3%'; +$strNewDb = 'New database:'; //to translate $strNoFrames = 'phpMyAdmin is more friendly with a frames-capable browser.'; $strPartialText = 'Partial Texts'; $strRowsModeHorizontal = 'horizontal'; //to translate diff --git a/lang/swedish.inc.php3 b/lang/swedish.inc.php3 index e1a7bec3c..1ffc20819 100644 --- a/lang/swedish.inc.php3 +++ b/lang/swedish.inc.php3 @@ -345,4 +345,5 @@ $strYes = 'Ja'; $strZip = '"zippad"'; // To translate +$strNewDb = 'New database:'; //to translate ?> diff --git a/lang/thai.inc.php3 b/lang/thai.inc.php3 index 8763786b2..cc21956b8 100644 --- a/lang/thai.inc.php3 +++ b/lang/thai.inc.php3 @@ -300,6 +300,7 @@ $strMoveTable = 'Move table to (database.table):'; $strMoveTableOK = 'Table %s has been moved to %s.'; $strMySQLServerProcess = 'MySQL %pma_s1% running on %pma_s2% as %pma_s3%'; $strNbRecords = 'no. of records'; +$strNewDb = 'New database:'; //to translate $strNoDatabases = 'No databases'; $strNoDropDatabases = '"DROP DATABASE" statements are disabled.'; $strNoFrames = 'phpMyAdmin is more friendly with a frames-capable browser.'; diff --git a/lang/turkish.inc.php3 b/lang/turkish.inc.php3 index f02d456ec..f81e5d186 100644 --- a/lang/turkish.inc.php3 +++ b/lang/turkish.inc.php3 @@ -345,4 +345,5 @@ $strYes = 'Evet'; $strZip = '"ziplenmiþ"'; // To translate +$strNewDb = 'New database:'; //to translate ?> diff --git a/lang/ukrainian-win1251.inc.php3 b/lang/ukrainian-win1251.inc.php3 index 13e284577..b30ddcbb1 100644 --- a/lang/ukrainian-win1251.inc.php3 +++ b/lang/ukrainian-win1251.inc.php3 @@ -344,4 +344,6 @@ $strYes = ' $strZip = 'çàïàêóâàòè â "zip"'; +// To translate +$strNewDb = 'New database:'; //to translate ?> diff --git a/libraries/user_details.js b/libraries/user_details.js index 6d0d15f47..0952ecfd4 100644 --- a/libraries/user_details.js +++ b/libraries/user_details.js @@ -121,32 +121,50 @@ function getSelected(the_field) { */ function change(the_field) { var l = location.href; + var lpos = l.indexOf('?lang'); var box_name = the_field.name; + var the_form = the_field.form.elements; + var sel_idx = null; - var lpos = l.indexOf('?lang'); - if (lpos <= 0) { - var the_form = the_field.form.elements; - l += '?lang=' + the_form['lang'].value + if (box_name == 'newdb') { + the_form['anydb'][0].checked = true; + the_form['anytable'][0].checked = true; + the_form['anycolumn'][0].checked = true; + if (typeof(the_form['dbgrant']) != 'undefined') { + the_form['dbgrant'].selectedIndex = -1; + } + if (typeof(the_form['tablegrant']) != 'undefined') { + the_form['tablegrant'].selectedIndex = -1; + } + if (typeof(the_form['colgrant']) != 'undefined') { + the_form['colgrant'].selectedIndex = -1; + } + } + else { + if (lpos <= 0) { + l += '?lang=' + the_form['lang'].value + '&server=' + the_form['server'].value + '&grants=1' + '&host=' + escape(the_form['host'].value) + '&pma_user=' + escape(the_form['pma_user'].value); - var sel_idx = the_form['dbgrant'].selectedIndex; - if (sel_idx > 0) { - l += '&dbgrant=' + escape(the_form['dbgrant'].options[sel_idx].text); - } - sel_idx = the_form['tablegrant'].selectedIndex; - if (sel_idx > 0) { - l += '&tablegrant=' + escape(the_form['tablegrant'].options[sel_idx].text); + sel_idx = the_form['dbgrant'].selectedIndex; + if (sel_idx > 0) { + l += '&dbgrant=' + escape(the_form['dbgrant'].options[sel_idx].text); + } + sel_idx = the_form['tablegrant'].selectedIndex; + if (sel_idx > 0) { + l += '&tablegrant=' + escape(the_form['tablegrant'].options[sel_idx].text); + } } + + var lpos = l.indexOf('&' + box_name); + if (lpos > 0) { + l = l.substring(0, lpos); + } // end if + + location.href = l + '&' + box_name + '=' + escape(getSelected(the_field)); } - var lpos = l.indexOf('&' + box_name); - if (lpos > 0) { - l = l.substring(0, lpos); - } // end if - - location.href = l + '&' + box_name + '=' + escape(getSelected(the_field)); } // end of the 'change()' function diff --git a/user_details.php3 b/user_details.php3 index 3d6cd5662..0e9e06b8f 100644 --- a/user_details.php3 +++ b/user_details.php3 @@ -462,7 +462,7 @@ function PMA_normalOperations() function PMA_grantOperations($grants) { global $lang, $server, $host, $pma_user; - global $dbgrant, $tablegrant; + global $dbgrant, $tablegrant, $newdb; ?>