diff --git a/ChangeLog b/ChangeLog
index b96d202b4..fcd674337 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -59,6 +59,7 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA
+ RFE #1704779 [gui] link documentation from login page
+ RFE #1513345 [setup] check control user connection during setup
+ [structure] TRIGGERS: display/edit/drop/SQL export
++ [browse] store browse state in session per query
2.10.2.0 (not yet released)
diff --git a/import.php b/import.php
index 89f8a292f..bf5725526 100644
--- a/import.php
+++ b/import.php
@@ -407,13 +407,6 @@ if (isset($my_die)) {
}
if ($go_sql) {
- if (isset($_GET['pos'])) {
- // comes from the Refresh link
- $pos = $_GET['pos'];
- } else {
- // Set pos to zero to possibly append limit
- $pos = 0;
- }
require './sql.php';
} else {
$active_page = $goto;
diff --git a/libraries/common.lib.php b/libraries/common.lib.php
index cc9641766..60958e5f0 100644
--- a/libraries/common.lib.php
+++ b/libraries/common.lib.php
@@ -1200,7 +1200,6 @@ function PMA_showMessage($message, $sql_query = null)
$refresh_link = 'import.php'
. $url_qpart
. '&show_query=1'
- . (isset($_GET['pos']) ? '&pos=' . $_GET['pos'] : '')
. '&sql_query=' . urlencode($sql_query);
$refresh_link = ' [' . PMA_linkOrButton($refresh_link, $GLOBALS['strRefresh']) . ']';
} else {
diff --git a/libraries/display_tbl.lib.php b/libraries/display_tbl.lib.php
index 75f3b54f4..ad4727f54 100644
--- a/libraries/display_tbl.lib.php
+++ b/libraries/display_tbl.lib.php
@@ -14,16 +14,6 @@ require_once './libraries/Table.class.php';
* Set of functions used to display the records returned by a SQL query
*/
-/**
- * Avoids undefined variables
- */
-if (!isset($pos)) {
- $pos = 0;
-} else {
- /* We need this to be a integer */
- $pos = (int)$pos;
-}
-
/**
* Defines the display mode to use for the results of a SQL query
*
@@ -197,6 +187,10 @@ function PMA_setDisplayMode(&$the_disp_mode, &$the_total)
/**
* Displays a navigation bar to browse among the results of a SQL query
*
+ * @uses $_SESSION['userconf']['disp_direction']
+ * @uses $_SESSION['userconf']['repeat_cells']
+ * @uses $_SESSION['userconf']['max_rows']
+ * @uses $_SESSION['userconf']['pos']
* @param integer the offset for the "next" page
* @param integer the offset for the "previous" page
* @param string the URL-encoded query
@@ -204,19 +198,10 @@ function PMA_setDisplayMode(&$the_disp_mode, &$the_total)
* @global string $db the database name
* @global string $table the table name
* @global string $goto the URL to go back in case of errors
- * @global boolean $dontlimitchars whether to limit the number of displayed
- * characters of text type fields or not
* @global integer $num_rows the total number of rows returned by the
* SQL query
* @global integer $unlim_num_rows the total number of rows returned by the
* SQL any programmatically appended "LIMIT" clause
- * @global integer $pos the current position in results
- * @global mixed $session_max_rows the maximum number of rows per page
- * ('all' = no limit)
- * @global string $disp_direction the display mode
- * (horizontal / vertical / horizontalflipped)
- * @global integer $repeat_cells the number of row to display between two
- * table headers
* @global boolean $is_innodb whether its InnoDB or not
* @global array $showtable table definitions
*
@@ -226,9 +211,8 @@ function PMA_setDisplayMode(&$the_disp_mode, &$the_total)
*/
function PMA_displayTableNavigation($pos_next, $pos_prev, $sql_query)
{
- global $db, $table, $goto, $dontlimitchars;
- global $num_rows, $unlim_num_rows, $pos, $session_max_rows;
- global $disp_direction, $repeat_cells;
+ global $db, $table, $goto;
+ global $num_rows, $unlim_num_rows;
global $is_innodb;
global $showtable;
@@ -247,7 +231,7 @@ function PMA_displayTableNavigation($pos_next, $pos_prev, $sql_query)
@@ -379,8 +346,8 @@ function PMA_displayTableNavigation($pos_next, $pos_prev, $sql_query)
//page redirection
- $pageNow = @floor($pos / $session_max_rows) + 1;
- $nbTotalPage = @ceil($unlim_num_rows / $session_max_rows);
+ $pageNow = @floor($_SESSION['userconf']['pos'] / $_SESSION['userconf']['max_rows']) + 1;
+ $nbTotalPage = @ceil($unlim_num_rows / $_SESSION['userconf']['max_rows']);
if ($nbTotalPage > 1){ //if1
?>
@@ -392,14 +359,10 @@ function PMA_displayTableNavigation($pos_next, $pos_prev, $sql_query)
@@ -444,6 +404,10 @@ function PMA_displayTableNavigation($pos_next, $pos_prev, $sql_query)
/**
* Displays the headers of the results table
*
+ * @uses $_SESSION['userconf']['disp_direction']
+ * @uses $_SESSION['userconf']['repeat_cells']
+ * @uses $_SESSION['userconf']['max_rows']
+ * @uses $_SESSION['userconf']['dontlimitchars']
* @param array which elements to display
* @param array the list of fields properties
* @param integer the total number of fields returned by the SQL query
@@ -454,19 +418,11 @@ function PMA_displayTableNavigation($pos_next, $pos_prev, $sql_query)
* @global string $db the database name
* @global string $table the table name
* @global string $goto the URL to go back in case of errors
- * @global boolean $dontlimitchars whether to limit the number of displayed
- * characters of text type fields or not
- * @global string $sql_query the sql query
+ * @global string $sql_query the SQL query
* @global integer $num_rows the total number of rows returned by the
* SQL query
- * @global integer $pos the current position in results
- * @global integer $session_max_rows the maximum number of rows per page
* @global array $vertical_display informations used with vertical display
* mode
- * @global string $disp_direction the display mode
- * (horizontal/vertical/horizontalflipped)
- * @global integer $repeat_cellsthe number of row to display between two
- * table headers
*
* @access private
*
@@ -474,9 +430,9 @@ function PMA_displayTableNavigation($pos_next, $pos_prev, $sql_query)
*/
function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $analyzed_sql = '')
{
- global $db, $table, $goto, $dontlimitchars;
- global $sql_query, $num_rows, $pos, $session_max_rows;
- global $vertical_display, $disp_direction, $repeat_cells, $highlight_columns;
+ global $db, $table, $goto;
+ global $sql_query, $num_rows;
+ global $vertical_display, $highlight_columns;
if ($analyzed_sql == '') {
$analyzed_sql = array();
@@ -544,7 +500,8 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
// do we have any index?
if (isset($indexes_data)) {
- if ($disp_direction == 'horizontal' || $disp_direction == 'horizontalflipped') {
+ if ($_SESSION['userconf']['disp_direction'] == 'horizontal'
+ || $_SESSION['userconf']['disp_direction'] == 'horizontalflipped') {
$span = $fields_cnt;
if ($is_display['edit_lnk'] != 'nn') {
$span++;
@@ -556,16 +513,11 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
$span++;
}
} else {
- $span = $num_rows + floor($num_rows/$repeat_cells) + 1;
+ $span = $num_rows + floor($num_rows/$_SESSION['userconf']['repeat_cells']) + 1;
}
echo '