summaryrefslogtreecommitdiff
path: root/search.php
diff options
context:
space:
mode:
authorcweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>2009-09-17 12:34:00 +0000
committercweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>2009-09-17 12:34:00 +0000
commit9ca54929cee7606048310b5084830a8771a1d202 (patch)
tree621ff2fb259b1567f79c1b087fa1fec951079ae8 /search.php
parentbf02d85a46525bdd9df1d8c1ec3f2fa34ef74288 (diff)
downloadsemanticscuttle-9ca54929cee7606048310b5084830a8771a1d202.tar.gz
semanticscuttle-9ca54929cee7606048310b5084830a8771a1d202.tar.bz2
fix bug #2834097: Patch for errors when using search without terms
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@347 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'search.php')
-rw-r--r--search.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/search.php b/search.php
index 75d6d7a..a1e12c9 100644
--- a/search.php
+++ b/search.php
@@ -46,6 +46,9 @@ if (POST_TERMS != '') {
$exploded = explode('/', $_SERVER['PATH_INFO']);
if(count($exploded) == 4) {
list($url, $range, $terms, $page) = $exploded;
+ } else if (count($exploded) == 2) {
+ list($url, $range) = $exploded;
+ $terms = $page= NULL;
} else {
list($url, $range, $terms) = $exploded;
$page= NULL;
@@ -71,8 +74,8 @@ if (POST_TERMS != '') {
// No search terms
if (is_null($terms)) {
$tplVars['subtitle'] = T_('Search Bookmarks');
- $s_start = date('Y-m-d H:i:s', strtotime($dtend .' -'. $defaultRecentDays .' days'));
$s_end = date('Y-m-d H:i:s', strtotime('tomorrow'));
+ $s_start = date('Y-m-d H:i:s', strtotime($s_end .' -'. $defaultRecentDays .' days'));
// Search terms
} else {