]> gitweb.fluxo.info Git - semanticscuttle.git/commitdiff
fix bug #2834097: Patch for errors when using search without terms
authorcweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>
Thu, 17 Sep 2009 12:34:00 +0000 (12:34 +0000)
committercweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>
Thu, 17 Sep 2009 12:34:00 +0000 (12:34 +0000)
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@347 b3834d28-1941-0410-a4f8-b48e95affb8f

search.php

index 75d6d7a4813490eaaaa71862d52dd1c60fd63f5d..a1e12c92a688b6082da2d0175d647650d5d00a41 100644 (file)
@@ -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 {