From b6af0de21782a9784fad5a4636a9835d3308cef1 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Fri, 27 Jul 2007 11:58:41 +0000 Subject: [PATCH] improve the patch for truncated list of tables, thanks to Juergen Wind --- navigation.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/navigation.php b/navigation.php index 3a482c06f..03fdcc866 100644 --- a/navigation.php +++ b/navigation.php @@ -287,17 +287,16 @@ if ($GLOBALS['cfg']['LeftFrameLight'] && strlen($GLOBALS['db'])) { * or the pos of tables. */ $table_list = PMA_getTableList($GLOBALS['db'], null, 0, $cfg['MaxTableList']); - $count_table_list = count($table_list); - if ($count_table_list > 0) { + if (! empty($table_list)) { PMA_displayTableList($table_list, true, '', $GLOBALS['db']); // hint user that the table list is larger, until the todo is done - if ($count_table_list == $GLOBALS['cfg']['MaxTableList']) { + if (count($table_list) <= $GLOBALS['cfg']['MaxTableList'] && PMA_getTableCount($GLOBALS['db']) > $GLOBALS['cfg']['MaxTableList']) { echo '  ( 1 .. ', $GLOBALS['cfg']['MaxTableList'], ' / ', PMA_getTableCount($GLOBALS['db']), ' )'; } } else { echo $GLOBALS['strNoTablesFound']; } - unset($table_list, $count_table_list); + unset($table_list); } elseif ($GLOBALS['cfg']['LeftFrameLight']) { echo '

' . $GLOBALS['strSelectADb'] . '

' . "\n"; } else {