bug #688360
This commit is contained in:
@@ -5,6 +5,11 @@ phpMyAdmin - Changelog
|
|||||||
$Id$
|
$Id$
|
||||||
$Source$
|
$Source$
|
||||||
|
|
||||||
|
2003-02-18 Alexander M. Turek <rabus@users.sourceforge.net>
|
||||||
|
* server_databases.php3:
|
||||||
|
- Fixed bug #688360 (Database privileges and AllowUserDropDatabase);
|
||||||
|
- The link "check privileges" is now only displayed to superusers.
|
||||||
|
|
||||||
2003-02-17 Michal Cihar <nijel@users.sourceforge.net>
|
2003-02-17 Michal Cihar <nijel@users.sourceforge.net>
|
||||||
* lang/czech: Updated.
|
* lang/czech: Updated.
|
||||||
* Documentation.html: Removed obsolete FAQ 6.17 about binary upload.
|
* Documentation.html: Removed obsolete FAQ 6.17 about binary upload.
|
||||||
|
@@ -7,9 +7,6 @@
|
|||||||
* Checks if the left frame has to be reloaded
|
* Checks if the left frame has to be reloaded
|
||||||
*/
|
*/
|
||||||
require('./libraries/grab_globals.lib.php3');
|
require('./libraries/grab_globals.lib.php3');
|
||||||
if (!empty($drop_selected_dbs)) {
|
|
||||||
$reload = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -57,7 +54,7 @@ if ($server > 0 && empty($dblist)) {
|
|||||||
/**
|
/**
|
||||||
* Drops multiple databases
|
* Drops multiple databases
|
||||||
*/
|
*/
|
||||||
if (!empty($drop_selected_dbs)) {
|
if (!empty($drop_selected_dbs) && ($is_superuser || $cfg['AllowUserDropDatabase'])) {
|
||||||
if (empty($selected_db)) {
|
if (empty($selected_db)) {
|
||||||
$message = $strNoDatabasesSelected;
|
$message = $strNoDatabasesSelected;
|
||||||
} else {
|
} else {
|
||||||
@@ -76,6 +73,7 @@ if (!empty($drop_selected_dbs)) {
|
|||||||
$message = sprintf($strDatabasesDropped, count($selected_db));
|
$message = sprintf($strDatabasesDropped, count($selected_db));
|
||||||
// we need to reload the database list now.
|
// we need to reload the database list now.
|
||||||
PMA_availableDatabases();
|
PMA_availableDatabases();
|
||||||
|
$reload = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -155,7 +153,7 @@ if (count($statistics) > 0) {
|
|||||||
. ' <input type="hidden" name="sort_order" value="' . $sort_order . '" />' . "\n"
|
. ' <input type="hidden" name="sort_order" value="' . $sort_order . '" />' . "\n"
|
||||||
. ' <table border="0">' . "\n"
|
. ' <table border="0">' . "\n"
|
||||||
. ' <tr>' . "\n"
|
. ' <tr>' . "\n"
|
||||||
. ' <th> </th>' . "\n"
|
. ($is_superuser || $cfg['AllowUserDropDatabase'] ? ' <th> </th>' . "\n" : '')
|
||||||
. ' <th>' . "\n"
|
. ' <th>' . "\n"
|
||||||
. ' ';
|
. ' ';
|
||||||
if (empty($dbstats)) {
|
if (empty($dbstats)) {
|
||||||
@@ -204,10 +202,12 @@ if (count($statistics) > 0) {
|
|||||||
. ' ' . "\n"
|
. ' ' . "\n"
|
||||||
. ' </th>' . "\n";
|
. ' </th>' . "\n";
|
||||||
}
|
}
|
||||||
|
if ($is_superuser) {
|
||||||
echo ' <th>' . "\n"
|
echo ' <th>' . "\n"
|
||||||
. ' ' . $strAction . ' ' . "\n"
|
. ' ' . $strAction . ' ' . "\n"
|
||||||
. ' </th>' . "\n"
|
. ' </th>' . "\n";
|
||||||
. ' </tr>' . "\n";
|
}
|
||||||
|
echo ' </tr>' . "\n";
|
||||||
$useBgcolorOne = TRUE;
|
$useBgcolorOne = TRUE;
|
||||||
$total_calc = array(
|
$total_calc = array(
|
||||||
'db_cnt' => 0,
|
'db_cnt' => 0,
|
||||||
@@ -225,11 +225,13 @@ if (count($statistics) > 0) {
|
|||||||
$total_calc['data_sz'] += $current['data_sz'];
|
$total_calc['data_sz'] += $current['data_sz'];
|
||||||
$total_calc['idx_sz'] += $current['idx_sz'];
|
$total_calc['idx_sz'] += $current['idx_sz'];
|
||||||
$total_calc['tot_sz'] += $current['tot_sz'];
|
$total_calc['tot_sz'] += $current['tot_sz'];
|
||||||
echo ' <tr>' . "\n"
|
echo ' <tr>' . "\n";
|
||||||
. ' <td bgcolor="' . ($useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']) . '">' . "\n"
|
if ($is_superuser || $cfg['AllowUserDropDatabase']) {
|
||||||
|
echo ' <td bgcolor="' . ($useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']) . '">' . "\n"
|
||||||
. ' <input type="checkbox" name="selected_db[]" title="' . htmlspecialchars($current['db_name']) . '" value="' . htmlspecialchars($current['db_name']) . '" ' . (empty($checkall) ? '' : 'checked="checked" ') . '/>' . "\n"
|
. ' <input type="checkbox" name="selected_db[]" title="' . htmlspecialchars($current['db_name']) . '" value="' . htmlspecialchars($current['db_name']) . '" ' . (empty($checkall) ? '' : 'checked="checked" ') . '/>' . "\n"
|
||||||
. ' </td>' . "\n"
|
. ' </td>' . "\n";
|
||||||
. ' <td bgcolor="' . ($useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']) . '">' . "\n"
|
}
|
||||||
|
echo ' <td bgcolor="' . ($useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']) . '">' . "\n"
|
||||||
. ' <a href="' . $cfg['DefaultTabDatabase'] . '?' . $url_query . '&db=' . urlencode($current['db_name']) . '" title="' . sprintf($strJumpToDB, htmlspecialchars($current['db_name'])) . '">' . "\n"
|
. ' <a href="' . $cfg['DefaultTabDatabase'] . '?' . $url_query . '&db=' . urlencode($current['db_name']) . '" title="' . sprintf($strJumpToDB, htmlspecialchars($current['db_name'])) . '">' . "\n"
|
||||||
. ' ' . htmlspecialchars($current['db_name']) . "\n"
|
. ' ' . htmlspecialchars($current['db_name']) . "\n"
|
||||||
. ' </a>' . "\n"
|
. ' </a>' . "\n"
|
||||||
@@ -261,12 +263,14 @@ if (count($statistics) > 0) {
|
|||||||
. ' </b>' . "\n"
|
. ' </b>' . "\n"
|
||||||
. ' </td>' . "\n";
|
. ' </td>' . "\n";
|
||||||
}
|
}
|
||||||
|
if ($is_superuser) {
|
||||||
echo ' <td bgcolor="' . ($useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']) . '">' . "\n"
|
echo ' <td bgcolor="' . ($useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']) . '">' . "\n"
|
||||||
. ' <a href="./server_privileges.php3?' . $url_query . '&checkprivs=' . urlencode($current['db_name']) . '" title="' . sprintf($strCheckPrivsLong, htmlspecialchars($current['db_name'])) . '">'. "\n"
|
. ' <a href="./server_privileges.php3?' . $url_query . '&checkprivs=' . urlencode($current['db_name']) . '" title="' . sprintf($strCheckPrivsLong, htmlspecialchars($current['db_name'])) . '">'. "\n"
|
||||||
. ' ' . $strCheckPrivs . "\n"
|
. ' ' . $strCheckPrivs . "\n"
|
||||||
. ' </a>' . "\n"
|
. ' </a>' . "\n"
|
||||||
. ' </td>' . "\n"
|
. ' </td>' . "\n";
|
||||||
. ' </tr>' . "\n";
|
}
|
||||||
|
echo ' </tr>' . "\n";
|
||||||
$useBgcolorOne = !$useBgcolorOne;
|
$useBgcolorOne = !$useBgcolorOne;
|
||||||
} // end while
|
} // end while
|
||||||
if (!empty($dbstats)) {
|
if (!empty($dbstats)) {
|
||||||
@@ -337,14 +341,16 @@ if (count($statistics) > 0) {
|
|||||||
. ' </a>' . "\n"
|
. ' </a>' . "\n"
|
||||||
. ' </b>' . "\n";
|
. ' </b>' . "\n";
|
||||||
}
|
}
|
||||||
|
if ($is_superuser || $cfg['AllowUserDropDatabase']) {
|
||||||
echo ' </li><br /><br />' . "\n"
|
echo ' </li><br /><br />' . "\n"
|
||||||
. ' <li>' . "\n"
|
. ' <li>' . "\n"
|
||||||
. ' <b>' . "\n"
|
. ' <b>' . "\n"
|
||||||
. ' ' . $strDropSelectedDatabases . "\n"
|
. ' ' . $strDropSelectedDatabases . "\n"
|
||||||
. ' </b><br />' . "\n"
|
. ' </b><br />' . "\n"
|
||||||
. ' <input type="submit" name="drop_selected_dbs" value="' . $strGo . '" />' . "\n"
|
. ' <input type="submit" name="drop_selected_dbs" value="' . $strGo . '" />' . "\n"
|
||||||
. ' </li>' . "\n"
|
. ' </li>' . "\n";
|
||||||
. ' </ul>' . "\n"
|
}
|
||||||
|
echo ' </ul>' . "\n"
|
||||||
. '</form>' . "\n";
|
. '</form>' . "\n";
|
||||||
} else {
|
} else {
|
||||||
echo $strNoDatabases . "\n";
|
echo $strNoDatabases . "\n";
|
||||||
|
Reference in New Issue
Block a user