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.php18
1 files changed, 12 insertions, 6 deletions
diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php
index 7d9faed1..42a2dd9a 100755
--- a/inc/poche/Poche.class.php
+++ b/inc/poche/Poche.class.php
@@ -604,12 +604,18 @@ class Poche
604 ); 604 );
605 break; 605 break;
606 606
607 case 'search': 607 case 'search':
608 if (isset($_GET['search'])){ 608 if (isset($_GET['search'])){
609 $search = $_GET['search']; 609 $search = filter_var($_GET['search'], FILTER_SANITIZE_STRING);
610 $tpl_vars['entries'] = $this->store->search($search); 610 $tpl_vars['entries'] = $this->store->search($search,$this->user->getId());
611 $tpl_vars['nb_results'] = count($tpl_vars['entries']); 611 $count = count($tpl_vars['entries']);
612 } 612 $this->pagination->set_total($count);
613 $page_links = str_replace(array('previous', 'next'), array(_('previous'), _('next')),
614 $this->pagination->page_links('?view=' . $view . '?search=' . $search . '&sort=' . $_SESSION['sort'] . '&' ));
615 $tpl_vars['page_links'] = $page_links;
616 $tpl_vars['nb_results'] = $count;
617 $tpl_vars['search_term'] = $search;
618 }
613 break; 619 break;
614 case 'view': 620 case 'view':
615 $entry = $this->store->retrieveOneById($id, $this->user->getId()); 621 $entry = $this->store->retrieveOneById($id, $this->user->getId());