aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc/poche/Poche.class.php
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas.loeuillet@gmail.com>2013-10-03 14:46:46 +0200
committerNicolas LÅ“uillet <nicolas.loeuillet@gmail.com>2013-10-03 14:46:46 +0200
commit34d67c835e250c853fc8ff4230abd24ba521b878 (patch)
treea203c2147e6ec1ca0d5ca17b3101b3245757c166 /inc/poche/Poche.class.php
parent7f17a38d358bdec609a98827991108032e9257ee (diff)
downloadwallabag-34d67c835e250c853fc8ff4230abd24ba521b878.tar.gz
wallabag-34d67c835e250c853fc8ff4230abd24ba521b878.tar.zst
wallabag-34d67c835e250c853fc8ff4230abd24ba521b878.zip
bug fix #219: when archive last poched links from a page, redirect to an other page
Diffstat (limited to 'inc/poche/Poche.class.php')
-rw-r--r--inc/poche/Poche.class.php6
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'] . '&');