aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc/poche/Poche.class.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/poche/Poche.class.php')
-rwxr-xr-xinc/poche/Poche.class.php21
1 files changed, 13 insertions, 8 deletions
diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php
index d1b0c945..ee3b2ac2 100755
--- a/inc/poche/Poche.class.php
+++ b/inc/poche/Poche.class.php
@@ -597,14 +597,19 @@ class Poche
597 'tags' => $tags, 597 'tags' => $tags,
598 ); 598 );
599 break; 599 break;
600 600 case 'search':
601 case 'search': 601 if (isset($_GET['search'])) {
602 if (isset($_GET['search'])){ 602 $search = filter_var($_GET['search'], FILTER_SANITIZE_STRING);
603 $search = $_GET['search']; 603 $tpl_vars['entries'] = $this->store->search($search, $this->user->getId());
604 $tpl_vars['entries'] = $this->store->search($search); 604 $count = count($tpl_vars['entries']);
605 $tpl_vars['nb_results'] = count($tpl_vars['entries']); 605 $this->pagination->set_total($count);
606 } 606 $page_links = str_replace(array('previous', 'next'), array(_('previous'), _('next')),
607 break; 607 $this->pagination->page_links('?view=' . $view . '?search=' . $search . '&sort=' . $_SESSION['sort'] . '&' ));
608 $tpl_vars['page_links'] = $page_links;
609 $tpl_vars['nb_results'] = $count;
610 $tpl_vars['search_term'] = $search;
611 }
612 break;
608 case 'view': 613 case 'view':
609 $entry = $this->store->retrieveOneById($id, $this->user->getId()); 614 $entry = $this->store->retrieveOneById($id, $this->user->getId());
610 if ($entry != NULL) { 615 if ($entry != NULL) {