aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc/poche/Poche.class.php
diff options
context:
space:
mode:
authortcit <tcit@tcit.fr>2014-03-22 11:09:18 +0100
committertcit <tcit@tcit.fr>2014-03-22 11:09:18 +0100
commita33a3d2afb6a861e194599973e31e5e448617296 (patch)
treea8c846472db8fabe7cadbaad0f87bb420ce228ae /inc/poche/Poche.class.php
parent028e34b6c40c3571d35c49d5a27b7eac19ceb4ef (diff)
downloadwallabag-a33a3d2afb6a861e194599973e31e5e448617296.tar.gz
wallabag-a33a3d2afb6a861e194599973e31e5e448617296.tar.zst
wallabag-a33a3d2afb6a861e194599973e31e5e448617296.zip
Implemented rudimental search engine
Diffstat (limited to 'inc/poche/Poche.class.php')
-rwxr-xr-xinc/poche/Poche.class.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php
index b1143d0b..74a185bd 100755
--- a/inc/poche/Poche.class.php
+++ b/inc/poche/Poche.class.php
@@ -603,6 +603,14 @@ class Poche
603 'tags' => $tags, 603 'tags' => $tags,
604 ); 604 );
605 break; 605 break;
606
607 case 'search':
608 if (isset($_POST['search'])){
609 $search = $_POST['search'];
610 $tpl_vars['entries'] = $this->store->search($search);
611 $tpl_vars['nb_results'] = count($tpl_vars['entries']);
612 }
613 break;
606 case 'view': 614 case 'view':
607 $entry = $this->store->retrieveOneById($id, $this->user->getId()); 615 $entry = $this->store->retrieveOneById($id, $this->user->getId());
608 if ($entry != NULL) { 616 if ($entry != NULL) {
@@ -772,8 +780,7 @@ class Poche
772 $this->emptyCache(); 780 $this->emptyCache();
773 781
774 Tools::redirect('?view=config'); 782 Tools::redirect('?view=config');
775 } 783 }
776
777 /** 784 /**
778 * get credentials from differents sources 785 * get credentials from differents sources
779 * it redirects the user to the $referer link 786 * it redirects the user to the $referer link