diff --git a/libraries/DisplayResults.class.php b/libraries/DisplayResults.class.php index 7a7ddb4735..5432625747 100644 --- a/libraries/DisplayResults.class.php +++ b/libraries/DisplayResults.class.php @@ -968,6 +968,11 @@ class PMA_DisplayResults // Do not change the position when changing the number of rows . $_SESSION['tmpval']['pos'] . '" />'; + $numberOfRowsPlaceholder = null; + if ($_SESSION['tmpval']['max_rows'] == self::ALL_ROWS) { + $numberOfRowsPlaceholder = 'All'; + } + $numberOfRowsChoices = array( '25' => 25, '50' => 50, @@ -978,7 +983,7 @@ class PMA_DisplayResults $additional_fields_html .= __('Number of rows:') . ' '; $additional_fields_html .= PMA_Util::getDropdown( 'session_max_rows', $numberOfRowsChoices, - $_SESSION['tmpval']['max_rows'], '', 'autosubmit' + $_SESSION['tmpval']['max_rows'], '', 'autosubmit', $numberOfRowsPlaceholder ); if ($GLOBALS['cfg']['ShowDisplayDirection']) { diff --git a/libraries/Util.class.php b/libraries/Util.class.php index da039bf6c5..21ad22ef35 100644 --- a/libraries/Util.class.php +++ b/libraries/Util.class.php @@ -2689,13 +2689,14 @@ class PMA_Util * case the dropdown is present more than once * on the page * @param string $class class for the select element + * @param string $placeholder Placeholder for dropdown if nothing else is selected * * @return string html content * * @todo support titles */ public static function getDropdown( - $select_name, $choices, $active_choice, $id, $class = '' + $select_name, $choices, $active_choice, $id, $class = '', $placeholder = null ) { $result = ''; + if (!empty($placeholder)) { + $result .= ''; + } + foreach ($choices as $one_choice_value => $one_choice_label) { $result .= '