diff --git a/db_structure.php b/db_structure.php
index d711e0e75a..9424391ee0 100644
--- a/db_structure.php
+++ b/db_structure.php
@@ -112,7 +112,7 @@ if (isset($_REQUEST['sort_order'])) {
$_url_params['sort_order'] = $_REQUEST['sort_order'];
}
-PMA_listNavigator(
+echo PMA_getListNavigator(
$total_num_tables, $pos, $_url_params, 'db_structure.php',
'frame_content', $GLOBALS['cfg']['MaxTableList']
);
@@ -727,7 +727,7 @@ if (!$db_is_information_schema && !$cfg['DisableMultiTableMaintenance']) {
' . "\n"
: '';
- echo __('Page number:');
- echo 'frame_navigation' == $frame ? '
' : ' ';
+
+ $list_navigator_html .= __('Page number:');
+
+ $list_navigator_html .= ($frame == 'frame_navigation') ? '
' : ' ';
// Move to the beginning or to the previous page
if ($pos > 0) {
+
// patch #474210 - part 1
if ($GLOBALS['cfg']['NavigationBarIconic']) {
$caption1 = '<<';
@@ -2464,27 +2470,31 @@ function PMA_listNavigator($count, $pos, $_url_params, $script, $frame, $max_cou
$title1 = '';
$title2 = '';
} // end if... else...
+
$_url_params['pos'] = 0;
- echo '' . $caption1 . '';
- $_url_params['pos'] = $pos - $max_count;
- echo '' . $caption2 . '';
}
- echo "\n", '
';
+ $list_navigator_html .= '';
if ($pos + $max_count < $count) {
+
if ($GLOBALS['cfg']['NavigationBarIconic']) {
$caption3 = ' > ';
$caption4 = '>>';
@@ -2496,23 +2506,30 @@ function PMA_listNavigator($count, $pos, $_url_params, $script, $frame, $max_cou
$title3 = '';
$title4 = '';
} // end if... else...
+
$_url_params['pos'] = $pos + $max_count;
- echo '' . $caption3 . '';
+
$_url_params['pos'] = floor($count / $max_count) * $max_count;
if ($_url_params['pos'] == $count) {
$_url_params['pos'] = $count - $max_count;
}
- echo '' . $caption4 . '';
}
- echo "\n";
+
+ $list_navigator_html .= "\n";
if ('frame_navigation' == $frame) {
- echo '' . "\n";
+ $list_navigator_html .= '' . "\n";
}
}
+
+ return $list_navigator_html;
+
}
/**
diff --git a/navigation.php b/navigation.php
index 17d649b6da..cb5901947c 100644
--- a/navigation.php
+++ b/navigation.php
@@ -176,7 +176,7 @@ if (! $GLOBALS['server']) {
}
$_url_params = array('pos' => $pos);
- PMA_listNavigator(count($GLOBALS['pma']->databases), $pos, $_url_params, 'navigation.php', 'frame_navigation', $GLOBALS['cfg']['MaxDbList']);
+ echo PMA_getListNavigator(count($GLOBALS['pma']->databases), $pos, $_url_params, 'navigation.php', 'frame_navigation', $GLOBALS['cfg']['MaxDbList']);
}
?>
@@ -256,7 +256,7 @@ if ($GLOBALS['cfg']['LeftFrameLight'] && strlen($GLOBALS['db'])) {
'pos' => $tpos,
'db' => $GLOBALS['db']
);
- PMA_listNavigator(
+ echo PMA_getListNavigator(
$table_count, $tpos, $_url_params, 'navigation.php',
'frame_navigation', $GLOBALS['cfg']['MaxTableList']
);
@@ -266,7 +266,7 @@ if ($GLOBALS['cfg']['LeftFrameLight'] && strlen($GLOBALS['db'])) {
if (count($table_list) <= $GLOBALS['cfg']['MaxTableList']
&& $table_count > $GLOBALS['cfg']['MaxTableList']
) {
- PMA_listNavigator(
+ echo PMA_getListNavigator(
$table_count, $tpos, $_url_params, 'navigation.php',
'frame_navigation', $GLOBALS['cfg']['MaxTableList']
);
@@ -297,7 +297,7 @@ if ($GLOBALS['cfg']['LeftFrameLight'] && strlen($GLOBALS['db'])) {
} else {
echo '' . "\n";
$_url_params = array('pos' => $pos);
- PMA_listNavigator(
+ echo PMA_getListNavigator(
count($GLOBALS['pma']->databases), $pos, $_url_params, 'navigation.php',
'frame_navigation', $GLOBALS['cfg']['MaxDbList']
);
diff --git a/server_databases.php b/server_databases.php
index a15e2cd178..e95a01f847 100644
--- a/server_databases.php
+++ b/server_databases.php
@@ -172,7 +172,7 @@ if ($databases_count > 0) {
'sort_order' => $sort_order,
);
- PMA_listNavigator($databases_count, $pos, $_url_params, 'server_databases.php', 'frame_content', $GLOBALS['cfg']['MaxDbList']);
+ echo PMA_getListNavigator($databases_count, $pos, $_url_params, 'server_databases.php', 'frame_content', $GLOBALS['cfg']['MaxDbList']);
$_url_params['pos'] = $pos;