Fixed an error that occured when adding privileges to non-existant or wildcarded tables.
This commit is contained in:
@@ -9,6 +9,8 @@ $Source$
|
|||||||
* Documentation.html, README:
|
* Documentation.html, README:
|
||||||
- The MySQL 4.1 support is not experimental anymore;
|
- The MySQL 4.1 support is not experimental anymore;
|
||||||
- Updated credits.
|
- Updated credits.
|
||||||
|
* server_privileges.php: Fixed an error that occured when adding
|
||||||
|
privileges to non-existant or wildcarded tables.
|
||||||
|
|
||||||
2004-04-20 Marc Delisle <lem9@users.sourceforge.net>
|
2004-04-20 Marc Delisle <lem9@users.sourceforge.net>
|
||||||
* libraries/tbl_change.js: was always returning current day
|
* libraries/tbl_change.js: was always returning current day
|
||||||
|
@@ -193,8 +193,9 @@ function PMA_displayPrivTable($db = '*', $table = '*', $submit = TRUE, $indent =
|
|||||||
$row[$current_grant . '_priv'] = in_array($current_grant, $users_grants) ? 'Y' : 'N';
|
$row[$current_grant . '_priv'] = in_array($current_grant, $users_grants) ? 'Y' : 'N';
|
||||||
}
|
}
|
||||||
unset($row['Table_priv'], $current_grant, $av_grants, $users_grants);
|
unset($row['Table_priv'], $current_grant, $av_grants, $users_grants);
|
||||||
$res = PMA_DBI_query('SHOW COLUMNS FROM `' . $db . '`.`' . $table . '`;');
|
$res = PMA_DBI_try_query('SHOW COLUMNS FROM `' . $db . '`.`' . $table . '`;');
|
||||||
$columns = array();
|
$columns = array();
|
||||||
|
if ($res) {
|
||||||
while ($row1 = PMA_DBI_fetch_row($res)) {
|
while ($row1 = PMA_DBI_fetch_row($res)) {
|
||||||
$columns[$row1[0]] = array(
|
$columns[$row1[0]] = array(
|
||||||
'Select' => FALSE,
|
'Select' => FALSE,
|
||||||
@@ -204,6 +205,7 @@ function PMA_displayPrivTable($db = '*', $table = '*', $submit = TRUE, $indent =
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
PMA_DBI_free_result($res);
|
PMA_DBI_free_result($res);
|
||||||
|
}
|
||||||
unset($res, $row1);
|
unset($res, $row1);
|
||||||
}
|
}
|
||||||
if (!empty($columns)) {
|
if (!empty($columns)) {
|
||||||
|
Reference in New Issue
Block a user