Improve full mode navi display when CountTables is false

This commit is contained in:
Marc Delisle
2011-02-18 12:55:51 -05:00
parent aef93ba592
commit 60f85e1934

View File

@@ -423,18 +423,23 @@ function PMA_displayDbList($ext_dblist, $offset, $count) {
. '?' . $common_url_query; ?>', 'main'); . '?' . $common_url_query; ?>', 'main');
return false;"> return false;">
<?php <?php
// Might be unset if CountTables directive is false
if (isset($db['num_tables'])) {
if ($GLOBALS['text_dir'] === 'rtl') { if ($GLOBALS['text_dir'] === 'rtl') {
echo ' <bdo dir="ltr">(' . $db['num_tables'] . ')</bdo> '; echo ' <bdo dir="ltr">(' . $db['num_tables'] . ')</bdo> ';
} }
}
echo htmlspecialchars($db['disp_name']); echo htmlspecialchars($db['disp_name']);
if (isset($db['num_tables'])) {
if ($GLOBALS['text_dir'] === 'ltr') { if ($GLOBALS['text_dir'] === 'ltr') {
echo ' <bdo dir="ltr">(' . $db['num_tables'] . ')</bdo> '; echo ' <bdo dir="ltr">(' . $db['num_tables'] . ')</bdo> ';
} }
}
?> ?>
</a> </a>
<?php <?php
} else { } else {
// with only 1 db available we dont need to refresh left frame // with only 1 db available we dont need to refresh navi frame
// on db selection, only phpmain // on db selection, only phpmain
?> ?>
<a href="<?php echo $GLOBALS['cfg']['DefaultTabDatabase'] <a href="<?php echo $GLOBALS['cfg']['DefaultTabDatabase']
@@ -442,13 +447,17 @@ function PMA_displayDbList($ext_dblist, $offset, $count) {
id="<?php echo htmlspecialchars($db['name']); ?>" id="<?php echo htmlspecialchars($db['name']); ?>"
title="<?php echo htmlspecialchars($db['comment']); ?>"> title="<?php echo htmlspecialchars($db['comment']); ?>">
<?php <?php
if (isset($db['num_tables'])) {
if ($GLOBALS['text_dir'] === 'rtl') { if ($GLOBALS['text_dir'] === 'rtl') {
echo ' <bdo dir="ltr">(' . $db['num_tables'] . ')</bdo> '; echo ' <bdo dir="ltr">(' . $db['num_tables'] . ')</bdo> ';
} }
}
echo htmlspecialchars($db['disp_name']); echo htmlspecialchars($db['disp_name']);
if (isset($db['num_tables'])) {
if ($GLOBALS['text_dir'] === 'ltr') { if ($GLOBALS['text_dir'] === 'ltr') {
echo ' <bdo dir="ltr">(' . $db['num_tables'] . ')</bdo> '; echo ' <bdo dir="ltr">(' . $db['num_tables'] . ')</bdo> ';
} }
}
?> ?>
</a> </a>
<?php <?php