Merge pull request #13262 from udan11/fix_13241
Redirect user to last page that has any tables to display.
This commit is contained in:
commit
8674361e46
@ -22,6 +22,7 @@ phpMyAdmin - ChangeLog
|
||||
- issue #13256 Fixed password check on server replication
|
||||
- issue #13252 Fixed grid editing time column
|
||||
- issue #13258 Fixed detection of Amazon RDS
|
||||
- issue #13241 Redirect user to last page that has any tables to display
|
||||
|
||||
4.7.0 (2017-03-28)
|
||||
- patch #12233 [Display] Improve message when renaming database to same name
|
||||
|
||||
@ -146,6 +146,18 @@ class DatabaseStructureController extends DatabaseController
|
||||
// Gets the database structure
|
||||
$this->_getDbInfo('_structure');
|
||||
|
||||
// Checks if there are any tables to be shown on current page.
|
||||
// If there are no tables, the user is redirected to the last page
|
||||
// having any.
|
||||
if ($this->_total_num_tables > 0 && $this->_pos > $this->_total_num_tables) {
|
||||
$uri = './db_structure.php' . URL::getCommonRaw(array(
|
||||
'db' => $this->db,
|
||||
'pos' => max(0, $this->_total_num_tables - $GLOBALS['cfg']['MaxTableList']),
|
||||
'reload' => 1
|
||||
));
|
||||
PMA_sendHeaderLocation($uri);
|
||||
}
|
||||
|
||||
include_once 'libraries/replication.inc.php';
|
||||
|
||||
PageSettings::showGroup('DbStructure');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user