obey MaxTableList in navi also (Light mode only); move the navigator near the database list
This commit is contained in:
@@ -1094,7 +1094,8 @@ ALTER TABLE `pma_column_comments`
|
||||
|
||||
<dt id="cfg_MaxTableList">$cfg['MaxTableList'] integer</dt>
|
||||
<dd>The maximum number of table names to be displayed in the
|
||||
right panel's list.</dd>
|
||||
main panel's list. This limit is also enforced in the navigation panel
|
||||
when in Light mode.</dd>
|
||||
|
||||
<dt id="cfg_MaxCharactersInDisplayedSQL">$cfg['MaxCharactersInDisplayedSQL'] integer</dt>
|
||||
<dd>The maximum number of characters when a SQL query is displayed. The
|
||||
|
@@ -717,7 +717,7 @@ function PMA_sendHeaderLocation($uri)
|
||||
}
|
||||
|
||||
/**
|
||||
* returns array with tables of given db with extended infomation and grouped
|
||||
* returns array with tables of given db with extended information and grouped
|
||||
*
|
||||
* @uses $cfg['LeftFrameTableSeparator']
|
||||
* @uses $cfg['LeftFrameTableLevel']
|
||||
@@ -730,14 +730,15 @@ function PMA_sendHeaderLocation($uri)
|
||||
* @uses strstr()
|
||||
* @uses explode()
|
||||
* @param string $db name of db
|
||||
* return array (rekursive) grouped table list
|
||||
* @param string $tables name of tables
|
||||
* return array (recursive) grouped table list
|
||||
*/
|
||||
function PMA_getTableList($db, $tables = null)
|
||||
function PMA_getTableList($db, $tables = null, $limit_offset = 0, $limit_count = false)
|
||||
{
|
||||
$sep = $GLOBALS['cfg']['LeftFrameTableSeparator'];
|
||||
|
||||
if (null === $tables) {
|
||||
$tables = PMA_DBI_get_tables_full($db);
|
||||
$tables = PMA_DBI_get_tables_full($db, false, false, null, $limit_offset, $limit_count);
|
||||
if ($GLOBALS['cfg']['NaturalOrder']) {
|
||||
uksort($tables, 'strnatcasecmp');
|
||||
}
|
||||
|
@@ -204,11 +204,14 @@ if (! $GLOBALS['server']) {
|
||||
echo '<noscript>' . "\n"
|
||||
.'<input type="submit" name="Go" value="' . $GLOBALS['strGo'] . '" />' . "\n"
|
||||
.'</noscript>' . "\n"
|
||||
.'</form>' . "\n"
|
||||
.'</div>' . "\n";
|
||||
.'</form>' . "\n";
|
||||
} else {
|
||||
echo '<div id="databaseList">' . "\n";
|
||||
echo $GLOBALS['PMA_List_Database']->getHtmlListGrouped(true, $_SESSION['navi_limit_offset'], $GLOBALS['cfg']['MaxDbList']) . "\n";
|
||||
}
|
||||
$_url_params = array('pos' => $pos);
|
||||
PMA_listNavigator($GLOBALS['PMA_List_Database']->count(), $pos, $_url_params, 'navigation.php', 'frame_navigation', $GLOBALS['cfg']['MaxDbList']);
|
||||
echo '</div>' . "\n";
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -269,7 +272,17 @@ if ($GLOBALS['cfg']['LeftFrameLight'] && strlen($GLOBALS['db'])) {
|
||||
}
|
||||
echo '</a></p>';
|
||||
|
||||
$table_list = PMA_getTableList($GLOBALS['db']);
|
||||
/**
|
||||
* This helps reducing the navi panel size; in the right panel,
|
||||
* user can find a navigator to page thru all tables.
|
||||
*
|
||||
* @todo instead of the 0 parameter, keep track of the
|
||||
* offset in the list of tables ($_SESSION['navi_table_limit_offset'])
|
||||
* and use PMA_listNavigator(); do not just check pos in REQUEST
|
||||
* but add another hidden param to see if it's the pos of databases
|
||||
* or the pos of tables.
|
||||
*/
|
||||
$table_list = PMA_getTableList($GLOBALS['db'], null, 0, $cfg['MaxTableList']);
|
||||
if (count($table_list) > 0) {
|
||||
PMA_displayTableList($table_list, true, '', $GLOBALS['db']);
|
||||
} else {
|
||||
@@ -279,6 +292,11 @@ if ($GLOBALS['cfg']['LeftFrameLight'] && strlen($GLOBALS['db'])) {
|
||||
} elseif ($GLOBALS['cfg']['LeftFrameLight']) {
|
||||
echo '<p>' . $GLOBALS['strSelectADb'] . '</p>' . "\n";
|
||||
} else {
|
||||
echo '<div id="databaseList">' . "\n";
|
||||
$_url_params = array('pos' => $pos);
|
||||
PMA_listNavigator($GLOBALS['PMA_List_Database']->count(), $pos, $_url_params, 'navigation.php', 'frame_navigation', $GLOBALS['cfg']['MaxDbList']);
|
||||
echo '</div>' . "\n";
|
||||
|
||||
$common_url_query = PMA_generate_common_url();
|
||||
PMA_displayDbList($GLOBALS['PMA_List_Database']->getGroupedDetails($_SESSION['navi_limit_offset'],$GLOBALS['cfg']['MaxDbList']), $_SESSION['navi_limit_offset'],$GLOBALS['cfg']['MaxDbList']);
|
||||
}
|
||||
@@ -588,7 +606,5 @@ function PMA_displayTableList($tables, $visible = false,
|
||||
|
||||
echo '</div>' . "\n";
|
||||
|
||||
$_url_params = array('pos' => $pos);
|
||||
PMA_listNavigator($GLOBALS['PMA_List_Database']->count(), $pos, $_url_params, 'navigation.php', 'frame_navigation', $GLOBALS['cfg']['MaxDbList']);
|
||||
PMA_exitNavigationFrame();
|
||||
?>
|
||||
|
@@ -72,7 +72,6 @@ div#pmalogo {
|
||||
}
|
||||
div#pmalogo,
|
||||
div#leftframelinks,
|
||||
div#navidbpageselector,
|
||||
div#databaseList {
|
||||
text-align: center;
|
||||
border-bottom: 0.05em solid <?php echo $GLOBALS['cfg']['NaviColor']; ?>;
|
||||
@@ -202,4 +201,4 @@ div#left_tableList ul ul {
|
||||
border-<?php echo $left; ?>: 0.1em solid <?php echo $GLOBALS['cfg']['NaviColor']; ?>;
|
||||
padding-bottom: 0.1em;
|
||||
border-bottom: 0.1em solid <?php echo $GLOBALS['cfg']['NaviColor']; ?>;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user