Avoid a No tables found when deleting the last table of a db and the table limit offset becomes greater than the number of tables
This commit is contained in:
@@ -902,6 +902,11 @@ function PMA_reloadNavigation()
|
|||||||
|
|
||||||
// Reloads the navigation frame via JavaScript if required
|
// Reloads the navigation frame via JavaScript if required
|
||||||
if (isset($GLOBALS['reload']) && $GLOBALS['reload']) {
|
if (isset($GLOBALS['reload']) && $GLOBALS['reload']) {
|
||||||
|
// one of the reasons for a reload is when a table is dropped
|
||||||
|
// in this case, get rid of the table limit offset, otherwise
|
||||||
|
// we have a problem when dropping a table on the last page
|
||||||
|
// and the offset becomes greater than the total number of tables
|
||||||
|
unset($_SESSION['table_limit_offset']);
|
||||||
echo "\n";
|
echo "\n";
|
||||||
$reload_url = './navigation.php?' . PMA_generate_common_url($GLOBALS['db'], '', '&');
|
$reload_url = './navigation.php?' . PMA_generate_common_url($GLOBALS['db'], '', '&');
|
||||||
?>
|
?>
|
||||||
|
4
sql.php
4
sql.php
@@ -204,14 +204,14 @@ if ($do_confirm) {
|
|||||||
|
|
||||||
|
|
||||||
// Defines some variables
|
// Defines some variables
|
||||||
// A table has to be created or renamed -> left frame should be reloaded
|
// A table has to be created, renamed, dropped -> navi frame should be reloaded
|
||||||
/**
|
/**
|
||||||
* @todo use the parser/analyzer
|
* @todo use the parser/analyzer
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (empty($reload)
|
if (empty($reload)
|
||||||
&& preg_match('/^(CREATE|ALTER|DROP)\s+(VIEW|TABLE|DATABASE|SCHEMA)\s+/i', $sql_query)) {
|
&& preg_match('/^(CREATE|ALTER|DROP)\s+(VIEW|TABLE|DATABASE|SCHEMA)\s+/i', $sql_query)) {
|
||||||
$reload = 1;
|
$reload = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// SK -- Patch: $is_group added for use in calculation of total number of
|
// SK -- Patch: $is_group added for use in calculation of total number of
|
||||||
|
Reference in New Issue
Block a user