[display] Division by zero when showing all records (page selector)
This commit is contained in:
@@ -37,6 +37,7 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA
|
||||
- bug #1789988 [display] space before SHOW COLUMNS
|
||||
- bug #1831646 [table creation] Error in CREATE TABLE with multiple primary
|
||||
keys and AUTO_INCREMENT
|
||||
- [display] Division by zero when showing all records (page selector)
|
||||
|
||||
2.11.2.1 (2007-11-11)
|
||||
- fixed possible SQL injection using database name
|
||||
|
@@ -352,10 +352,12 @@ onsubmit="return (checkFormElementInRange(this, 'session_max_rows', '<?php echo
|
||||
|
||||
|
||||
//page redirection
|
||||
$pageNow = @floor($_SESSION['userconf']['pos'] / $_SESSION['userconf']['max_rows']) + 1;
|
||||
$nbTotalPage = @ceil($unlim_num_rows / $_SESSION['userconf']['max_rows']);
|
||||
// (unless we are showing all records)
|
||||
if ('all' != $_SESSION['userconf']['max_rows']) { //if1
|
||||
$pageNow = @floor($_SESSION['userconf']['pos'] / $_SESSION['userconf']['max_rows']) + 1;
|
||||
$nbTotalPage = @ceil($unlim_num_rows / $_SESSION['userconf']['max_rows']);
|
||||
|
||||
if ($nbTotalPage > 1){ //if1
|
||||
if ($nbTotalPage > 1){ //if2
|
||||
?>
|
||||
<td>
|
||||
|
||||
@@ -364,32 +366,32 @@ onsubmit="return (checkFormElementInRange(this, 'session_max_rows', '<?php echo
|
||||
<?php //<form> for keep the form alignment of button < and << ?>
|
||||
<form action="none">
|
||||
<?php
|
||||
$_url_params = array(
|
||||
'db' => $db,
|
||||
'table' => $table,
|
||||
'sql_query' => $sql_query,
|
||||
'goto' => $goto,
|
||||
);
|
||||
echo PMA_pageselector(
|
||||
'sql.php' . PMA_generate_common_url($_url_params) . PMA_get_arg_separator('js'),
|
||||
$_SESSION['userconf']['max_rows'],
|
||||
$pageNow,
|
||||
$nbTotalPage,
|
||||
200,
|
||||
5,
|
||||
5,
|
||||
20,
|
||||
10,
|
||||
$GLOBALS['strPageNumber']
|
||||
);
|
||||
$_url_params = array(
|
||||
'db' => $db,
|
||||
'table' => $table,
|
||||
'sql_query' => $sql_query,
|
||||
'goto' => $goto,
|
||||
);
|
||||
echo PMA_pageselector(
|
||||
'sql.php' . PMA_generate_common_url($_url_params) . PMA_get_arg_separator('js'),
|
||||
$_SESSION['userconf']['max_rows'],
|
||||
$pageNow,
|
||||
$nbTotalPage,
|
||||
200,
|
||||
5,
|
||||
5,
|
||||
20,
|
||||
10,
|
||||
$GLOBALS['strPageNumber']
|
||||
);
|
||||
?>
|
||||
</form>
|
||||
</td>
|
||||
<?php
|
||||
} //_if2
|
||||
} //_if1
|
||||
|
||||
|
||||
// Show all the records if allowed
|
||||
// Display the "Show all" button if allowed
|
||||
if ($GLOBALS['cfg']['ShowAll'] && ($num_rows < $unlim_num_rows)) {
|
||||
echo "\n";
|
||||
?>
|
||||
|
Reference in New Issue
Block a user