diff options
author | Martín Palombo <martin-palombo@launchpad> | 2011-05-04 12:05:15 +0400 |
---|---|---|
committer | Michal Čihař <mcihar@novell.com> | 2011-05-04 12:06:17 +0400 |
commit | 8262e36f3d5bdf3252aa28c8660f545c3e1071f2 (patch) | |
tree | d8b49802509d8990fec6e2fe24e0efda20e5a3e6 /navigation.php | |
parent | 73c57b099e8b2d2c99fcb4d0888dcc40f4dd366a (diff) |
Do not load all tables into memory, we need only slice.
Reported with patch at
https://bugs.launchpad.net/ubuntu/+source/phpmyadmin/+bug/754647
Diffstat (limited to 'navigation.php')
-rw-r--r-- | navigation.php | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/navigation.php b/navigation.php index 167c060d3d..ea774899a8 100644 --- a/navigation.php +++ b/navigation.php @@ -246,8 +246,8 @@ $element_counter = 0; if ($GLOBALS['cfg']['LeftFrameLight'] && strlen($GLOBALS['db'])) { - $table_list = PMA_getTableList($GLOBALS['db']); - $table_count = count($table_list); + $table_list = PMA_getTableList($GLOBALS['db'], null, $tpos, $cfg['MaxTableList']); + $table_count = PMA_getTableCount($GLOBALS['db']); // show selected databasename as link to DefaultTabDatabase-page // with table count in () @@ -284,7 +284,6 @@ if ($GLOBALS['cfg']['LeftFrameLight'] && strlen($GLOBALS['db'])) { * user can find a navigator to page thru all tables. * */ - $table_list = array_slice($table_list, $tpos, $cfg['MaxTableList']); if (! empty($table_list)) { // upper table list paginator if (count($table_list) <= $GLOBALS['cfg']['MaxTableList'] && $table_count > $GLOBALS['cfg']['MaxTableList']) { |