Completed
Branch master (15a86c)
by Michael
06:07
created
class/feedcreator.class.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -467,8 +467,8 @@  discard block
 block discarded – undo
467 467
     * @param timeout int      optional the timeout in seconds before a cached version is refreshed (defaults to 3600 = 1 hour)
468 468
     */
469 469
    function useCached($format="RSS0.91", $filename="", $timeout=3600) {
470
-      $this->_setFormat($format);
471
-      $this->_feed->useCached($filename, $timeout);
470
+	  $this->_setFormat($format);
471
+	  $this->_feed->useCached($filename, $timeout);
472 472
    }
473 473
 
474 474
 }
@@ -496,9 +496,9 @@  discard block
 block discarded – undo
496 496
 	var $syndicationURL, $image, $language, $copyright, $pubDate, $lastBuildDate, $editor, $editorEmail, $webmaster, $category, $docs, $ttl, $rating, $skipHours, $skipDays;
497 497
 
498 498
 	/**
499
-	* The url of the external xsl stylesheet used to format the naked rss feed.
500
-	* Ignored in the output when empty.
501
-	*/
499
+	 * The url of the external xsl stylesheet used to format the naked rss feed.
500
+	 * Ignored in the output when empty.
501
+	 */
502 502
 	var $xslStyleSheet = "";
503 503
 
504 504
 	var $cssStyleSheet = "";
@@ -1046,9 +1046,9 @@  discard block
 block discarded – undo
1046 1046
  */
1047 1047
 class RSSCreator20 extends RSSCreator091 {
1048 1048
 
1049
-    function RSSCreator20() {
1050
-        parent::_setRSSVersion("2.0");
1051
-    }
1049
+	function RSSCreator20() {
1050
+		parent::_setRSSVersion("2.0");
1051
+	}
1052 1052
 
1053 1053
 }
1054 1054
 
Please login to merge, or discard this patch.
search.php 1 patch
Indentation   +68 added lines, -68 removed lines patch added patch discarded remove patch
@@ -31,8 +31,8 @@  discard block
 block discarded – undo
31 31
 $config_handler =& xoops_gethandler("config");
32 32
 $xoopsConfigSearch =& $config_handler->getConfigsByCat(XOOPS_CONF_SEARCH);
33 33
 if (empty($xoopsConfigSearch["enable_search"])) {
34
-    redirect_header(XOOPS_URL."/modules/".$GLOBALS["moddirname"]."/index.php", 2, planet_constant("MD_NOACCESS"));
35
-    exit();
34
+	redirect_header(XOOPS_URL."/modules/".$GLOBALS["moddirname"]."/index.php", 2, planet_constant("MD_NOACCESS"));
35
+	exit();
36 36
 }
37 37
 
38 38
 $xoopsConfig["module_cache"][$xoopsModule->getVar("mid")] = 0;
@@ -57,41 +57,41 @@  discard block
 block discarded – undo
57 57
 $sortby = (in_array(strtolower($sortby), array("a.art_id desc", "a.art_time desc", "a.art_title", "a.blog_id", "b.blog_id", "b.blog_feed", "b.blog_title", "b.blog_time"))) ? strtolower($sortby) :  "";
58 58
 
59 59
 if ( !( empty($_POST["submit"]) && empty($_GET["term"])) ) {
60
-    $next_search["category"] = $category;
61
-    $next_search["blog"] = $blog;
62
-    $next_search["uid"] = $uid;
63
-    $next_search["andor"] = $andor;
64
-
65
-    $next_search["term"] = $term;
66
-    $query = trim($term);
67
-
68
-    if ( $andor != "EXACT" ) {
69
-        $ignored_queries = array(); // holds kewords that are shorter than allowed minmum length
70
-        $temp_queries = preg_split("/[\s,]+/", $query);
71
-        foreach ($temp_queries as $q) {
72
-            $q = trim($q);
73
-            if (strlen($q) >= $xoopsConfigSearch["keyword_min"]) {
74
-                $queries[] = $myts->addSlashes($q);
75
-            } else {
76
-                $ignored_queries[] = $myts->addSlashes($q);
77
-            }
78
-        }
79
-        if (count($queries) == 0) {
80
-            redirect_header(XOOPS_URL."/modules/".$GLOBALS["moddirname"]."/search.php", 2, sprintf(_SR_KEYTOOSHORT, $xoopsConfigSearch["keyword_min"]));
81
-            exit();
82
-        }
83
-    } else {
84
-        if (strlen($query) < $xoopsConfigSearch["keyword_min"]) {
85
-            redirect_header(XOOPS_URL."/modules/".$GLOBALS["moddirname"]."/search.php", 2, sprintf(_SR_KEYTOOSHORT, $xoopsConfigSearch["keyword_min"]));
86
-            exit();
87
-        }
88
-        $queries = array($myts->addSlashes($query));
89
-    }
60
+	$next_search["category"] = $category;
61
+	$next_search["blog"] = $blog;
62
+	$next_search["uid"] = $uid;
63
+	$next_search["andor"] = $andor;
64
+
65
+	$next_search["term"] = $term;
66
+	$query = trim($term);
67
+
68
+	if ( $andor != "EXACT" ) {
69
+		$ignored_queries = array(); // holds kewords that are shorter than allowed minmum length
70
+		$temp_queries = preg_split("/[\s,]+/", $query);
71
+		foreach ($temp_queries as $q) {
72
+			$q = trim($q);
73
+			if (strlen($q) >= $xoopsConfigSearch["keyword_min"]) {
74
+				$queries[] = $myts->addSlashes($q);
75
+			} else {
76
+				$ignored_queries[] = $myts->addSlashes($q);
77
+			}
78
+		}
79
+		if (count($queries) == 0) {
80
+			redirect_header(XOOPS_URL."/modules/".$GLOBALS["moddirname"]."/search.php", 2, sprintf(_SR_KEYTOOSHORT, $xoopsConfigSearch["keyword_min"]));
81
+			exit();
82
+		}
83
+	} else {
84
+		if (strlen($query) < $xoopsConfigSearch["keyword_min"]) {
85
+			redirect_header(XOOPS_URL."/modules/".$GLOBALS["moddirname"]."/search.php", 2, sprintf(_SR_KEYTOOSHORT, $xoopsConfigSearch["keyword_min"]));
86
+			exit();
87
+		}
88
+		$queries = array($myts->addSlashes($query));
89
+	}
90 90
 
91
-    $next_search["sortby"] = $sortby;
92
-    $next_search["searchin"] = implode("|", $searchin);
91
+	$next_search["sortby"] = $sortby;
92
+	$next_search["searchin"] = implode("|", $searchin);
93 93
     
94
-    /* To be added: year-month 
94
+	/* To be added: year-month 
95 95
      * see view.archive.php
96 96
      */
97 97
 	if (!empty($time)) {
@@ -100,31 +100,31 @@  discard block
 block discarded – undo
100 100
 		$extra = "";
101 101
 	}
102 102
 
103
-    $results = planet_search($queries, $andor, $limit, $start, 
104
-    	$uid, $category, $blog,
105
-    	$sortby, $searchin, $extra);
103
+	$results = planet_search($queries, $andor, $limit, $start, 
104
+		$uid, $category, $blog,
105
+		$sortby, $searchin, $extra);
106 106
 
107
-    /*
107
+	/*
108 108
     if ( count($results) < 1 ) {
109 109
     	redirect_header("javascript:history.go(-1);", 2, _SR_NOMATCH);
110 110
     }
111 111
     else 
112 112
     */
113
-    {
114
-        $xoopsTpl->assign("results", $results);
115
-
116
-        if(count($next_search)>0){
117
-	        $items = array();
118
-	        foreach($next_search as $para => $val){
119
-		        if(!empty($val)) $items[] = "$para=$val";
120
-	        }
121
-	        if(count($items)>0) $paras = implode("&",$items);
122
-	        unset($next_search);
123
-	        unset($items);
124
-        }
125
-      	$search_url = XOOPS_URL."/modules/".$GLOBALS["moddirname"]."/search.php?".$paras;
126
-
127
-      	/*
113
+	{
114
+		$xoopsTpl->assign("results", $results);
115
+
116
+		if(count($next_search)>0){
117
+			$items = array();
118
+			foreach($next_search as $para => $val){
119
+				if(!empty($val)) $items[] = "$para=$val";
120
+			}
121
+			if(count($items)>0) $paras = implode("&",$items);
122
+			unset($next_search);
123
+			unset($items);
124
+		}
125
+	  	$search_url = XOOPS_URL."/modules/".$GLOBALS["moddirname"]."/search.php?".$paras;
126
+
127
+	  	/*
128 128
        	$next_results =& planet_search($queries, $andor, 1, $start + $limit, $uid, $category, $sortby, $searchin, $extra);
129 129
         $next_count = count($next_results);
130 130
         $has_next = false;
@@ -133,23 +133,23 @@  discard block
 block discarded – undo
133 133
         }
134 134
         if (false != $has_next)
135 135
         */
136
-        if (count($results))
137
-        {
138
-            $next = $start + $limit;
139
-            $queries = implode(",",$queries);
140
-            $search_url_next = $search_url."&start=$next";
141
-            $search_next = "<a href=\"".htmlspecialchars($search_url_next)."\">"._SR_NEXT."</a>";
136
+		if (count($results))
137
+		{
138
+			$next = $start + $limit;
139
+			$queries = implode(",",$queries);
140
+			$search_url_next = $search_url."&start=$next";
141
+			$search_next = "<a href=\"".htmlspecialchars($search_url_next)."\">"._SR_NEXT."</a>";
142 142
 			$xoopsTpl->assign("search_next", $search_next);
143
-        }
144
-        if ( $start > 0 ) {
145
-            $prev = $start - $limit;
146
-            $search_url_prev = $search_url."&start=$prev";
147
-            $search_prev = "<a href=\"".htmlspecialchars($search_url_prev)."\">"._SR_PREVIOUS."</a>";
143
+		}
144
+		if ( $start > 0 ) {
145
+			$prev = $start - $limit;
146
+			$search_url_prev = $search_url."&start=$prev";
147
+			$search_prev = "<a href=\"".htmlspecialchars($search_url_prev)."\">"._SR_PREVIOUS."</a>";
148 148
 			$xoopsTpl->assign("search_prev", $search_prev);
149
-        }
150
-    }
149
+		}
150
+	}
151 151
 
152
-    unset($results);
152
+	unset($results);
153 153
 	$search_info = _SR_KEYWORDS.": ".$myts->htmlSpecialChars($term);
154 154
 	$xoopsTpl->assign("search_info", $search_info);
155 155
 }
Please login to merge, or discard this patch.