Merge remote-tracking branch 'origin/QA_3_5'

This commit is contained in:
Michal Čihař 2012-02-08 10:06:34 +01:00
commit e1394f3400
3 changed files with 7 additions and 3 deletions

View File

@ -1658,7 +1658,10 @@ CREATE DATABASE,ALTER DATABASE,DROP DATABASE</pre>
<dt id="cfg_ShowAll">$cfg['ShowAll'] boolean</dt>
<dd>Defines whether a user should be displayed a
&quot;show all (rows)&quot; button in browse mode or not.</dd>
&quot;Show all&quot; button in browse mode or not in all cases.
By default it is shown only on small tables (less than 5 &times;
<a href="#cfg_MaxRows">$cfg['MaxRows']</a> rows) to avoid performance
issues while getting too many rows.</dd>
<dt id="cfg_MaxRows">$cfg['MaxRows'] integer</dt>
<dd>Number of rows displayed when browsing a result set and no LIMIT

View File

@ -308,6 +308,7 @@ function PMA_displayTableNavigation($pos_next, $pos_prev, $sql_query, $id_for_di
} // end move back
$nbTotalPage = 1;
//page redirection
// (unless we are showing all records)
if ('all' != $_SESSION['tmp_user_values']['max_rows']) { //if1
@ -345,7 +346,7 @@ function PMA_displayTableNavigation($pos_next, $pos_prev, $sql_query, $id_for_di
} //_if1
// Display the "Show all" button if allowed
if ($GLOBALS['cfg']['ShowAll'] && ($num_rows < $unlim_num_rows)) {
if (($num_rows < $unlim_num_rows) && ($GLOBALS['cfg']['ShowAll'] || ($GLOBALS['cfg']['MaxRows'] * 5 >= $unlim_num_rows))) {
echo "\n";
?>
<td>

View File

@ -448,7 +448,7 @@ if ($GLOBALS['cfg']['RememberSorting']
}
// Do append a "LIMIT" clause?
if ((! $cfg['ShowAll'] || $_SESSION['tmp_user_values']['max_rows'] != 'all')
if (($_SESSION['tmp_user_values']['max_rows'] != 'all')
&& ! ($is_count || $is_export || $is_func || $is_analyse)
&& isset($analyzed_sql[0]['queryflags']['select_from'])
&& ! isset($analyzed_sql[0]['queryflags']['offset'])