summaryrefslogtreecommitdiff
path: root/search.php
diff options
context:
space:
mode:
authormensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2008-03-14 10:32:00 +0000
committermensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2008-03-14 10:32:00 +0000
commit219888d4899fa1704452ed7169b718f6766aaa07 (patch)
tree5584dabf3b28af36af08ebbb55878fdf06103a29 /search.php
parent6ab15b1c291b35bcb2564ae5a20e10ef19a208e9 (diff)
downloadsemanticscuttle-219888d4899fa1704452ed7169b718f6766aaa07.tar.gz
semanticscuttle-219888d4899fa1704452ed7169b718f6766aaa07.tar.bz2
New Feature: save searches (and display a searchhistory box)
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@80 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'search.php')
-rw-r--r--search.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/search.php b/search.php
index 2c88f91..6e002bb 100644
--- a/search.php
+++ b/search.php
@@ -31,6 +31,7 @@ if (isset($_POST['terms'])) {
$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
$templateservice =& ServiceFactory::getServiceInstance('TemplateService');
$userservice =& ServiceFactory::getServiceInstance('UserService');
+ $searchhistoryservice =& ServiceFactory::getServiceInstance('SearchHistoryService');
$logged_on_userid = $userservice->getCurrentUserId();
list($url, $range, $terms, $page) = explode('/', $_SERVER['PATH_INFO']);
@@ -94,11 +95,14 @@ if (isset($_POST['terms'])) {
}
}
$bookmarks =& $bookmarkservice->getBookmarks($start, $perpage, $s_user, NULL, $terms, getSortOrder(), $s_watchlist, $s_start, $s_end);
+
+ // Save search
+ $searchhistoryservice->addSearch($terms, $range, $bookmarks['total'], $logged_on_userid);
$tplVars['page'] = $page;
$tplVars['start'] = $start;
$tplVars['popCount'] = 25;
- $tplVars['sidebar_blocks'] = array('recent');
+ $tplVars['sidebar_blocks'] = array('search', 'recent');
$tplVars['range'] = $range;
$tplVars['terms'] = $terms;
$tplVars['pagetitle'] = T_('Search Bookmarks');