Feature request #522450 - Wildcard db privileges
This commit is contained in:
@@ -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 <om@omnis.ch>
|
||||
* created the phpmyadmin-cvs mailing list, following the instructions
|
||||
|
@@ -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
|
||||
|
@@ -313,6 +313,7 @@ $strLogUsername = 'Username:';
|
||||
$strMoveTable = 'Move table to (database<b>.</b>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 <b>frames-capable</b> browser.';
|
||||
$strNoQuery = 'No SQL query!'; //to translate
|
||||
$strQueryOnDb = 'SQL-query on database <b>%s</b>:';
|
||||
|
@@ -346,4 +346,5 @@ $strYes = '
|
||||
$strZip = '"zip-<2D><><EFBFBD><EFBFBD>"';
|
||||
|
||||
// To translate
|
||||
$strNewDb = 'New database:'; //to translate
|
||||
?>
|
||||
|
@@ -346,4 +346,5 @@ $strYes = '
|
||||
$strZip = '"zip-<2D><><EFBFBD><EFBFBD>"';
|
||||
|
||||
// To translate
|
||||
$strNewDb = 'New database:'; //to translate
|
||||
?>
|
||||
|
@@ -345,4 +345,5 @@ $strYes = 'Si';
|
||||
$strZip = '"comprimit amb zip"';
|
||||
|
||||
// To translate
|
||||
$strNewDb = 'New database:'; //to translate
|
||||
?>
|
||||
|
@@ -347,4 +347,5 @@ $strYes = '
|
||||
$strZip = '"zipped"';
|
||||
|
||||
// To translate
|
||||
$strNewDb = 'New database:'; //to translate
|
||||
?>
|
||||
|
@@ -300,6 +300,7 @@ $strMoveTable = 'Move table to (database<b>.</b>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 <b>frames-capable</b> browser.';
|
||||
|
@@ -343,4 +343,7 @@ $strWrongUser = '
|
||||
$strYes = 'Ano';
|
||||
|
||||
$strZip = '"zazipov<6F>no"';
|
||||
// To translate
|
||||
$strNewDb = 'New database:'; //to translate
|
||||
|
||||
?>
|
||||
|
@@ -343,4 +343,8 @@ $strWrongUser = '
|
||||
$strYes = 'Ano';
|
||||
|
||||
$strZip = '"zazipov<6F>no"';
|
||||
|
||||
// To translate
|
||||
$strNewDb = 'New database:'; //to translate
|
||||
|
||||
?>
|
||||
|
@@ -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" <b>must</b> be the name of and <b>only of</b> a primary key!)';
|
||||
$strSelectADb = 'Please select a database';
|
||||
|
@@ -306,6 +306,7 @@ $strLogUsername = 'Username:';
|
||||
$strMoveTable = 'Move table to (database<b>.</b>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 <b>frames-capable</b> browser.';
|
||||
$strNoQuery = 'No SQL query!'; //to translate
|
||||
|
@@ -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';
|
||||
|
@@ -349,4 +349,5 @@ $strYes = 'Kyll
|
||||
$strZip = '"zip-pakattu"';
|
||||
|
||||
// To translate
|
||||
$strNewDb = 'New database:'; //to translate
|
||||
?>
|
||||
|
@@ -190,6 +190,7 @@ $strMySQLShowVars = 'Afficher les variables du serveur MySQL';
|
||||
|
||||
$strName = 'Nom';
|
||||
$strNbRecords = 'nb. d\'enregistrements';
|
||||
$strNewDb = 'Nouvelle base de donn<6E>es :';
|
||||
$strNext = 'Suivant';
|
||||
$strNo = 'Non';
|
||||
$strNoDropDatabases = 'La commande "DROP DATABASE" est d<>sactiv<69>e.';
|
||||
|
@@ -349,4 +349,5 @@ $strCardinality = 'Cardinality';
|
||||
$strLogin = 'Login';
|
||||
$strLogPassword = 'Password:';
|
||||
$strLogUsername = 'Username:';
|
||||
$strNewDb = 'New database:'; //to translate
|
||||
?>
|
||||
|
@@ -345,5 +345,6 @@ $strYes = 'Ja';
|
||||
$strZip = '"Zip komprimiert"';
|
||||
|
||||
// To translate
|
||||
$strNewDb = 'New database:'; //to translate
|
||||
|
||||
?>
|
||||
|
@@ -311,6 +311,7 @@ $strLogUsername = 'Username:';
|
||||
$strMoveTable = 'Move table to (database<b>.</b>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 <b>frames-capable</b> browser.';
|
||||
$strNoQuery = 'No SQL query!'; //to translate
|
||||
$strPrimaryKeyHasBeenDropped = 'The primary key has been dropped';//to translate
|
||||
|
@@ -347,4 +347,6 @@ $strYes = '
|
||||
|
||||
$strZip = '"zipped"';
|
||||
|
||||
// To translate
|
||||
$strNewDb = 'New database:'; //to translate
|
||||
?>
|
||||
|
@@ -345,4 +345,6 @@ $strYes = 'Igen';
|
||||
|
||||
$strZip = '"zippel t<>m<EFBFBD>r<EFBFBD>tve"';
|
||||
|
||||
// To translate
|
||||
$strNewDb = 'New database:'; //to translate
|
||||
?>
|
||||
|
@@ -348,4 +348,5 @@ $strZip = '"compresso con zip"';
|
||||
|
||||
|
||||
// To translate
|
||||
$strNewDb = 'New database:'; //to translate
|
||||
?>
|
||||
|
@@ -350,4 +350,5 @@ $strKanjiEncodConvert = '
|
||||
$strXkana = '<27><><EFBFBD>ѥ<EFBFBD><D1A5>ʤ<EFBFBD><CAA4>Ѵ<EFBFBD><D1B4><EFBFBD><EFBFBD><EFBFBD>'; // convert to X208-kana
|
||||
|
||||
// To translate
|
||||
$strNewDb = 'New database:'; //to translate
|
||||
?>
|
||||
|
@@ -350,4 +350,5 @@ $strKanjiEncodConvert = '
|
||||
$strXkana = '<27>S<EFBFBD>p<EFBFBD>J<EFBFBD>i<EFBFBD>֕ϊ<D695><CF8A><EFBFBD><EFBFBD><EFBFBD>'; // convert to X208-kana
|
||||
|
||||
// To translate
|
||||
$strNewDb = 'New database:'; //to translate
|
||||
?>
|
||||
|
@@ -299,6 +299,7 @@ $strMoveTable = 'Move table to (database<b>.</b>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 <b>frames-capable</b> browser.';
|
||||
|
@@ -344,4 +344,5 @@ $strYes = 'Ja';
|
||||
$strZip = '"komprimert (zip)"';
|
||||
|
||||
// To translate
|
||||
$strNewDb = 'New database:'; //to translate
|
||||
?>
|
||||
|
@@ -345,4 +345,5 @@ $strYes = 'Tak';
|
||||
$strZip = '".zip"';
|
||||
|
||||
// To translate
|
||||
$strNewDb = 'New database:'; //to translate
|
||||
?>
|
||||
|
@@ -345,4 +345,5 @@ $strYes = 'Sim';
|
||||
$strZip = '"zipped"'; //to translate
|
||||
|
||||
// To translate
|
||||
$strNewDb = 'New database:'; //to translate
|
||||
?>
|
||||
|
@@ -345,4 +345,5 @@ $strYes = 'Da';
|
||||
$strZip = '"zipped"';
|
||||
|
||||
// To translate
|
||||
$strNewDb = 'New database:'; //to translate
|
||||
?>
|
||||
|
@@ -345,4 +345,5 @@ $strYes = '
|
||||
$strZip = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> "zip"';
|
||||
|
||||
// To translate
|
||||
$strNewDb = 'New database:'; //to translate
|
||||
?>
|
||||
|
@@ -345,4 +345,5 @@ $strYes = '
|
||||
$strZip = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> "zip"';
|
||||
|
||||
// To translate
|
||||
$strNewDb = 'New database:'; //to translate
|
||||
?>
|
||||
|
@@ -348,4 +348,5 @@ $strZip = '"zo zipovan
|
||||
|
||||
|
||||
// To translate
|
||||
$strNewDb = 'New database:'; //to translate
|
||||
?>
|
||||
|
@@ -345,5 +345,6 @@ $strZip = '"zozipovan
|
||||
|
||||
|
||||
// To translate
|
||||
$strNewDb = 'New database:'; //to translate
|
||||
|
||||
?>
|
||||
|
@@ -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 <b>frames-capable</b> browser.';
|
||||
$strPartialText = 'Partial Texts';
|
||||
$strRowsModeHorizontal = 'horizontal'; //to translate
|
||||
|
@@ -345,4 +345,5 @@ $strYes = 'Ja';
|
||||
$strZip = '"zippad"';
|
||||
|
||||
// To translate
|
||||
$strNewDb = 'New database:'; //to translate
|
||||
?>
|
||||
|
@@ -300,6 +300,7 @@ $strMoveTable = 'Move table to (database<b>.</b>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 <b>frames-capable</b> browser.';
|
||||
|
@@ -345,4 +345,5 @@ $strYes = 'Evet';
|
||||
$strZip = '"ziplenmi<6D>"';
|
||||
|
||||
// To translate
|
||||
$strNewDb = 'New database:'; //to translate
|
||||
?>
|
||||
|
@@ -344,4 +344,6 @@ $strYes = '
|
||||
|
||||
$strZip = '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> "zip"';
|
||||
|
||||
// To translate
|
||||
$strNewDb = 'New database:'; //to translate
|
||||
?>
|
||||
|
@@ -121,17 +121,33 @@ function getSelected(the_field) {
|
||||
*/
|
||||
function change(the_field) {
|
||||
var l = location.href;
|
||||
var box_name = the_field.name;
|
||||
|
||||
var lpos = l.indexOf('?lang');
|
||||
if (lpos <= 0) {
|
||||
var box_name = the_field.name;
|
||||
var the_form = the_field.form.elements;
|
||||
var sel_idx = null;
|
||||
|
||||
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;
|
||||
sel_idx = the_form['dbgrant'].selectedIndex;
|
||||
if (sel_idx > 0) {
|
||||
l += '&dbgrant=' + escape(the_form['dbgrant'].options[sel_idx].text);
|
||||
}
|
||||
@@ -147,6 +163,8 @@ function change(the_field) {
|
||||
} // end if
|
||||
|
||||
location.href = l + '&' + box_name + '=' + escape(getSelected(the_field));
|
||||
}
|
||||
|
||||
} // end of the 'change()' function
|
||||
|
||||
|
||||
|
@@ -462,7 +462,7 @@ function PMA_normalOperations()
|
||||
function PMA_grantOperations($grants)
|
||||
{
|
||||
global $lang, $server, $host, $pma_user;
|
||||
global $dbgrant, $tablegrant;
|
||||
global $dbgrant, $tablegrant, $newdb;
|
||||
?>
|
||||
|
||||
<ul>
|
||||
@@ -594,6 +594,17 @@ function PMA_grantOperations($grants)
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="5">
|
||||
<i><?php echo $GLOBALS['strOr']; ?></i>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="5">
|
||||
<?php echo $GLOBALS['strNewDb'] . "\n"; ?>
|
||||
<input type="text" name="newdb" value="" onchange="change(this)" />
|
||||
</td>
|
||||
<tr>
|
||||
</table>
|
||||
|
||||
<table>
|
||||
@@ -1264,7 +1275,7 @@ else if (isset($grants) && $grants) {
|
||||
$sql_query = '';
|
||||
$col_list = '';
|
||||
|
||||
if (isset($colgrant) && !$anycolumn) {
|
||||
if (isset($colgrant) && !$anycolumn && !$newdb) {
|
||||
$colgrant_cnt = count($colgrant);
|
||||
for ($i = 0; $i < $colgrant_cnt; $i++) {
|
||||
if (get_magic_quotes_gpc()) {
|
||||
@@ -1292,17 +1303,25 @@ else if (isset($grants) && $grants) {
|
||||
$priv_grant = (isset($$priv_grant) ? ' WITH GRANT OPTION' : '');
|
||||
|
||||
if (get_magic_quotes_gpc()) {
|
||||
if (isset($dbgrant) && !$anydb) {
|
||||
if ($newdb) {
|
||||
$newdb = stripslashes($newdb);
|
||||
} else {
|
||||
if (isset($dbgrant) && !$anydb && !$newdb) {
|
||||
$dbgrant = stripslashes($dbgrant);
|
||||
}
|
||||
if (isset($tablegrant) && !$anytable) {
|
||||
if (isset($tablegrant) && !$anytable && !$newdb) {
|
||||
$tablegrant = stripslashes($tablegrant);
|
||||
}
|
||||
}
|
||||
} // end if
|
||||
if (!$newdb) {
|
||||
$sql_query .= ' ON '
|
||||
. (($anydb || $dbgrant == '') ? '*' : PMA_backquote($dbgrant))
|
||||
. '.'
|
||||
. (($anytable || $tablegrant == '') ? '*' : PMA_backquote($tablegrant));
|
||||
} else {
|
||||
$sql_query .= ' ON ' . PMA_backquote($newdb) . '.*';
|
||||
}
|
||||
|
||||
$sql_query .= ' TO ' . '\'' . PMA_sqlAddslashes($pma_user) . '\'' . '@' . '\'' . PMA_sqlAddslashes($host) . '\'';
|
||||
|
||||
|
Reference in New Issue
Block a user