improve the patch for truncated list of tables, thanks to Juergen Wind

This commit is contained in:
Marc Delisle
2007-07-27 11:58:41 +00:00
parent 9c405e4615
commit b6af0de217

View File

@@ -287,17 +287,16 @@ if ($GLOBALS['cfg']['LeftFrameLight'] && strlen($GLOBALS['db'])) {
* or the pos of tables. * or the pos of tables.
*/ */
$table_list = PMA_getTableList($GLOBALS['db'], null, 0, $cfg['MaxTableList']); $table_list = PMA_getTableList($GLOBALS['db'], null, 0, $cfg['MaxTableList']);
$count_table_list = count($table_list); if (! empty($table_list)) {
if ($count_table_list > 0) {
PMA_displayTableList($table_list, true, '', $GLOBALS['db']); PMA_displayTableList($table_list, true, '', $GLOBALS['db']);
// hint user that the table list is larger, until the todo is done // 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 '&nbsp; ( 1 .. ', $GLOBALS['cfg']['MaxTableList'], ' / ', PMA_getTableCount($GLOBALS['db']), ' )'; echo '&nbsp; ( 1 .. ', $GLOBALS['cfg']['MaxTableList'], ' / ', PMA_getTableCount($GLOBALS['db']), ' )';
} }
} else { } else {
echo $GLOBALS['strNoTablesFound']; echo $GLOBALS['strNoTablesFound'];
} }
unset($table_list, $count_table_list); unset($table_list);
} elseif ($GLOBALS['cfg']['LeftFrameLight']) { } elseif ($GLOBALS['cfg']['LeftFrameLight']) {
echo '<p>' . $GLOBALS['strSelectADb'] . '</p>' . "\n"; echo '<p>' . $GLOBALS['strSelectADb'] . '</p>' . "\n";
} else { } else {