From e00eef0a999c366bbfb7912841bd845f659af649 Mon Sep 17 00:00:00 2001 From: Andreas Unterkircher Date: Sat, 23 Jun 2007 13:48:34 +0000 Subject: renamed search to tagsearch issue16, matching tags are now placed into the selected-tags list git-svn-id: file:///var/lib/svn/phpfspot/trunk@127 fa6a889d-dae6-447d-9e79-4ba9a3039384 --- phpfspot.class.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'phpfspot.class.php') diff --git a/phpfspot.class.php b/phpfspot.class.php index 6800da2..0a59d96 100644 --- a/phpfspot.class.php +++ b/phpfspot.class.php @@ -679,11 +679,17 @@ class PHPFSPOT { } // setTagCondition() - public function startSearch($searchfor) + public function startTagSearch($searchfor) { $_SESSION['searchfor'] = $searchfor; + $_SESSION['selected_tags'] = Array(); - } // startSearch() + foreach($this->avail_tags as $tag) { + if(preg_match('/'. $searchfor .'/i', $this->tags[$tag])) + array_push($_SESSION['selected_tags'], $tag); + } + + } // startTagSearch() private function rotateImage($img, $degrees) { -- cgit v1.2.3-18-g5258