Limit the current page to the available pages
This commit is contained in:
@@ -709,6 +709,11 @@ class ObjectManager
|
|||||||
$iPage = isset($aClean['iPage']) ? $aClean['iPage'] : 1;
|
$iPage = isset($aClean['iPage']) ? $aClean['iPage'] : 1;
|
||||||
$iCurrentPage = min($iPage, $iNumPages);
|
$iCurrentPage = min($iPage, $iNumPages);
|
||||||
|
|
||||||
|
// if iPage is beyond the maximum number of pages, make it the
|
||||||
|
// highest page number
|
||||||
|
if($iPage > $iNumPages)
|
||||||
|
$iPage = $iNumPages;
|
||||||
|
|
||||||
/* Display selectors and info */
|
/* Display selectors and info */
|
||||||
echo '<div align="center">';
|
echo '<div align="center">';
|
||||||
echo "<b>Page $iPage of $iNumPages</b><br />";
|
echo "<b>Page $iPage of $iNumPages</b><br />";
|
||||||
|
|||||||
Reference in New Issue
Block a user