[display] Division by zero when showing all records (page selector)

This commit is contained in:
Marc Delisle
2007-11-15 13:33:35 +00:00
parent a3bdb36ba6
commit fd5243200e
2 changed files with 26 additions and 23 deletions

View File

@@ -37,6 +37,7 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA
- bug #1789988 [display] space before SHOW COLUMNS - bug #1789988 [display] space before SHOW COLUMNS
- bug #1831646 [table creation] Error in CREATE TABLE with multiple primary - bug #1831646 [table creation] Error in CREATE TABLE with multiple primary
keys and AUTO_INCREMENT keys and AUTO_INCREMENT
- [display] Division by zero when showing all records (page selector)
2.11.2.1 (2007-11-11) 2.11.2.1 (2007-11-11)
- fixed possible SQL injection using database name - fixed possible SQL injection using database name

View File

@@ -352,10 +352,12 @@ onsubmit="return (checkFormElementInRange(this, 'session_max_rows', '<?php echo
//page redirection //page redirection
// (unless we are showing all records)
if ('all' != $_SESSION['userconf']['max_rows']) { //if1
$pageNow = @floor($_SESSION['userconf']['pos'] / $_SESSION['userconf']['max_rows']) + 1; $pageNow = @floor($_SESSION['userconf']['pos'] / $_SESSION['userconf']['max_rows']) + 1;
$nbTotalPage = @ceil($unlim_num_rows / $_SESSION['userconf']['max_rows']); $nbTotalPage = @ceil($unlim_num_rows / $_SESSION['userconf']['max_rows']);
if ($nbTotalPage > 1){ //if1 if ($nbTotalPage > 1){ //if2
?> ?>
<td> <td>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
@@ -386,10 +388,10 @@ onsubmit="return (checkFormElementInRange(this, 'session_max_rows', '<?php echo
</form> </form>
</td> </td>
<?php <?php
} //_if2
} //_if1 } //_if1
// Display the "Show all" button if allowed
// Show all the records if allowed
if ($GLOBALS['cfg']['ShowAll'] && ($num_rows < $unlim_num_rows)) { if ($GLOBALS['cfg']['ShowAll'] && ($num_rows < $unlim_num_rows)) {
echo "\n"; echo "\n";
?> ?>