From 8262e36f3d5bdf3252aa28c8660f545c3e1071f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Palombo?= Date: Wed, 4 May 2011 10:05:15 +0200 Subject: [PATCH] Do not load all tables into memory, we need only slice. Reported with patch at https://bugs.launchpad.net/ubuntu/+source/phpmyadmin/+bug/754647 --- navigation.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/navigation.php b/navigation.php index 167c060d3..ea774899a 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']) {