diff --git a/ChangeLog b/ChangeLog index 24103f87d..f71bb44c1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -53,6 +53,7 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA 3.3.2.0 (not yet released) - patch #2969449 [core] Name for MERGE engine varies depending on the MySQL version, thanks to Dieter Adriaenssens - ruleant +- bug #2966078 [browse] Incorrect LIMIT is saved and sticks while browsing 3.3.1.0 (not yet released) - bug #2941037 [core] Database structure not sorted by table correctly diff --git a/libraries/display_tbl.lib.php b/libraries/display_tbl.lib.php index 16569640e..602ed9515 100644 --- a/libraries/display_tbl.lib.php +++ b/libraries/display_tbl.lib.php @@ -1674,7 +1674,11 @@ function PMA_displayTable_checkConfigParams() $_SESSION['tmp_user_values']['query'][$sql_key]['repeat_cells'] = $GLOBALS['cfg']['RepeatCells']; } - if (PMA_isValid($_REQUEST['session_max_rows'], 'numeric') || $_REQUEST['session_max_rows'] == 'all') { + // as this is a form value, the type is always string so we cannot + // use PMA_isValid($_REQUEST['session_max_rows'], 'integer') + if ((PMA_isValid($_REQUEST['session_max_rows'], 'numeric') + && (int) $_REQUEST['session_max_rows'] == $_REQUEST['session_max_rows']) + || $_REQUEST['session_max_rows'] == 'all') { $_SESSION['tmp_user_values']['query'][$sql_key]['max_rows'] = $_REQUEST['session_max_rows']; unset($_REQUEST['session_max_rows']); } elseif (empty($_SESSION['tmp_user_values']['query'][$sql_key]['max_rows'])) {