]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - inc/poche/Poche.class.php
bug fix #219: when archive last poched links from a page, redirect to an other page
[github/wallabag/wallabag.git] / inc / poche / Poche.class.php
index d6dbd19a41832cb97db47565748413131d0c62f4..ffef1c3eea5fa9fccb9fe869bdd6baa6da0dfa7a 100644 (file)
@@ -407,6 +407,12 @@ class Poche
                     'page_links' => '',
                     'nb_results' => '',
                 );
+
+                # want to display a page too far?
+                if ((count($entries) % PAGINATION) + 1 < $_GET['p']) {
+                    Tools::redirect('');
+                }
+                
                 if (count($entries) > 0) {
                     $this->pagination->set_total(count($entries));
                     $page_links = $this->pagination->page_links('?view=' . $view . '&sort=' . $_SESSION['sort'] . '&');