diff options
-rw-r--r-- | inc/poche/Poche.class.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php index d6dbd19a..ffef1c3e 100644 --- a/inc/poche/Poche.class.php +++ b/inc/poche/Poche.class.php | |||
@@ -407,6 +407,12 @@ class Poche | |||
407 | 'page_links' => '', | 407 | 'page_links' => '', |
408 | 'nb_results' => '', | 408 | 'nb_results' => '', |
409 | ); | 409 | ); |
410 | |||
411 | # want to display a page too far? | ||
412 | if ((count($entries) % PAGINATION) + 1 < $_GET['p']) { | ||
413 | Tools::redirect(''); | ||
414 | } | ||
415 | |||
410 | if (count($entries) > 0) { | 416 | if (count($entries) > 0) { |
411 | $this->pagination->set_total(count($entries)); | 417 | $this->pagination->set_total(count($entries)); |
412 | $page_links = $this->pagination->page_links('?view=' . $view . '&sort=' . $_SESSION['sort'] . '&'); | 418 | $page_links = $this->pagination->page_links('?view=' . $view . '&sort=' . $_SESSION['sort'] . '&'); |