@@ -331,7 +331,7 @@ discard block |
||
| 331 | 331 | // - no truncation (truncating risks producing invalid html) |
| 332 | 332 | if (!$this->rawFieldContent) { |
| 333 | 333 | $result = ""; |
| 334 | - } elseif ($this->syndicateHtml) { |
|
| 334 | + } elseif ($this->syndicateHtml) { |
|
| 335 | 335 | $result = "<![CDATA[".$this->rawFieldContent."]]>"; |
| 336 | 336 | } else { |
| 337 | 337 | if ($this->truncSize and is_int($this->truncSize)) { |
@@ -616,8 +616,12 @@ discard block |
||
| 616 | 616 | |
| 617 | 617 | function _createStylesheetReferences() { |
| 618 | 618 | $xml = ""; |
| 619 | - if ($this->cssStyleSheet) $xml .= "<?xml-stylesheet href=\"".$this->cssStyleSheet."\" type=\"text/css\"?>\n"; |
|
| 620 | - if ($this->xslStyleSheet) $xml .= "<?xml-stylesheet href=\"".$this->xslStyleSheet."\" type=\"text/xsl\"?>\n"; |
|
| 619 | + if ($this->cssStyleSheet) { |
|
| 620 | + $xml .= "<?xml-stylesheet href=\"".$this->cssStyleSheet."\" type=\"text/css\"?>\n"; |
|
| 621 | + } |
|
| 622 | + if ($this->xslStyleSheet) { |
|
| 623 | + $xml .= "<?xml-stylesheet href=\"".$this->xslStyleSheet."\" type=\"text/xsl\"?>\n"; |
|
| 624 | + } |
|
| 621 | 625 | return $xml; |
| 622 | 626 | } |
| 623 | 627 | |
@@ -738,7 +742,9 @@ discard block |
||
| 738 | 742 | */ |
| 739 | 743 | function FeedDate($dateString="") { |
| 740 | 744 | $tzOffset = 0; |
| 741 | - if ($dateString=="") $dateString = date("r"); |
|
| 745 | + if ($dateString=="") { |
|
| 746 | + $dateString = date("r"); |
|
| 747 | + } |
|
| 742 | 748 | |
| 743 | 749 | //if (is_integer($dateString)) { |
| 744 | 750 | if (is_numeric($dateString)) { |
@@ -793,7 +799,9 @@ discard block |
||
| 793 | 799 | function rfc822() { |
| 794 | 800 | //return gmdate("r",$this->unix); |
| 795 | 801 | $date = gmdate("D, d M Y H:i:s", $this->unix); |
| 796 | - if (TIME_ZONE!="") $date .= " ".str_replace(":","",TIME_ZONE); |
|
| 802 | + if (TIME_ZONE!="") { |
|
| 803 | + $date .= " ".str_replace(":","",TIME_ZONE); |
|
| 804 | + } |
|
| 797 | 805 | return $date; |
| 798 | 806 | } |
| 799 | 807 | |
@@ -805,7 +813,9 @@ discard block |
||
| 805 | 813 | function iso8601() { |
| 806 | 814 | $date = gmdate("Y-m-d\TH:i:sO",$this->unix); |
| 807 | 815 | $date = substr($date,0,22) . ':' . substr($date,-2); |
| 808 | - if (TIME_ZONE!="") $date = str_replace("+00:00",TIME_ZONE,$date); |
|
| 816 | + if (TIME_ZONE!="") { |
|
| 817 | + $date = str_replace("+00:00",TIME_ZONE,$date); |
|
| 818 | + } |
|
| 809 | 819 | return $date; |
| 810 | 820 | } |
| 811 | 821 | |
@@ -26,8 +26,12 @@ |
||
| 26 | 26 | // ------------------------------------------------------------------------ // |
| 27 | 27 | include "header.php"; |
| 28 | 28 | $article_id = empty($_GET['article'])?0:intval($_GET['article']); |
| 29 | -if(empty($article_id)) return; |
|
| 30 | -if(planet_getcookie("art_".$article_id)>0) return; |
|
| 29 | +if(empty($article_id)) { |
|
| 30 | + return; |
|
| 31 | +} |
|
| 32 | +if(planet_getcookie("art_".$article_id)>0) { |
|
| 33 | + return; |
|
| 34 | +} |
|
| 31 | 35 | $article_handler =& xoops_getmodulehandler('article', $xoopsModule->getVar("dirname")); |
| 32 | 36 | $article_obj =& $article_handler->get($article_id); |
| 33 | 37 | $article_obj->setVar("art_views", $article_obj->getVar("art_views")+1, true); |
@@ -97,7 +97,7 @@ |
||
| 97 | 97 | |
| 98 | 98 | $xoopsTpl -> assign("user_level", !is_object($xoopsUser)?0:($xoopsUser->isAdmin()?2:1)); |
| 99 | 99 | if(empty($xoopsModuleConfig["anonymous_rate"]) && !is_object($xoopsUser)){ |
| 100 | -}else{ |
|
| 100 | +} else{ |
|
| 101 | 101 | $xoopsTpl -> assign("canrate", 1); |
| 102 | 102 | } |
| 103 | 103 | |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | */ |
| 97 | 97 | if (!empty($time)) { |
| 98 | 98 | $extra = ""; |
| 99 | - }else{ |
|
| 99 | + } else{ |
|
| 100 | 100 | $extra = ""; |
| 101 | 101 | } |
| 102 | 102 | |
@@ -116,9 +116,13 @@ discard block |
||
| 116 | 116 | if(count($next_search)>0){ |
| 117 | 117 | $items = array(); |
| 118 | 118 | foreach($next_search as $para => $val){ |
| 119 | - if(!empty($val)) $items[] = "$para=$val"; |
|
| 119 | + if(!empty($val)) { |
|
| 120 | + $items[] = "$para=$val"; |
|
| 121 | + } |
|
| 122 | + } |
|
| 123 | + if(count($items)>0) { |
|
| 124 | + $paras = implode("&",$items); |
|
| 120 | 125 | } |
| 121 | - if(count($items)>0) $paras = implode("&",$items); |
|
| 122 | 126 | unset($next_search); |
| 123 | 127 | unset($items); |
| 124 | 128 | } |
@@ -157,54 +161,82 @@ discard block |
||
| 157 | 161 | /* type */ |
| 158 | 162 | $type_select = "<select name=\"andor\">"; |
| 159 | 163 | $type_select .= "<option value=\"OR\""; |
| 160 | - if("OR" == $andor) $type_select .= " selected=\"selected\""; |
|
| 164 | + if("OR" == $andor) { |
|
| 165 | + $type_select .= " selected=\"selected\""; |
|
| 166 | + } |
|
| 161 | 167 | $type_select .= ">"._SR_ANY."</option>"; |
| 162 | 168 | $type_select .= "<option value=\"AND\""; |
| 163 | - if("AND" == $andor) $type_select .= " selected=\"selected\""; |
|
| 169 | + if("AND" == $andor) { |
|
| 170 | + $type_select .= " selected=\"selected\""; |
|
| 171 | + } |
|
| 164 | 172 | $type_select .= ">"._SR_ALL."</option>"; |
| 165 | 173 | $type_select .= "<option value=\"EXACT\""; |
| 166 | - if("exact" == $andor) $type_select .= " selected=\"selected\""; |
|
| 174 | + if("exact" == $andor) { |
|
| 175 | + $type_select .= " selected=\"selected\""; |
|
| 176 | + } |
|
| 167 | 177 | $type_select .= ">"._SR_EXACT."</option>"; |
| 168 | 178 | $type_select .= "</select>"; |
| 169 | 179 | |
| 170 | 180 | /* scope */ |
| 171 | 181 | $searchin_select = ""; |
| 172 | 182 | $searchin_select .= "<input type=\"checkbox\" name=\"searchin[]\" value=\"title\""; |
| 173 | - if(in_array("title", $searchin)) $searchin_select .= " checked"; |
|
| 183 | + if(in_array("title", $searchin)) { |
|
| 184 | + $searchin_select .= " checked"; |
|
| 185 | + } |
|
| 174 | 186 | $searchin_select .= " />".planet_constant("MD_TITLE")." "; |
| 175 | 187 | $searchin_select .= "<input type=\"checkbox\" name=\"searchin[]\" value=\"text\""; |
| 176 | - if(in_array("text", $searchin)) $searchin_select .= " checked"; |
|
| 188 | + if(in_array("text", $searchin)) { |
|
| 189 | + $searchin_select .= " checked"; |
|
| 190 | + } |
|
| 177 | 191 | $searchin_select .= " />".planet_constant("MD_BODY")." || "; |
| 178 | 192 | $searchin_select .= "<input type=\"checkbox\" name=\"searchin[]\" value=\"blog\""; |
| 179 | - if(in_array("blog", $searchin)) $searchin_select .= " checked"; |
|
| 193 | + if(in_array("blog", $searchin)) { |
|
| 194 | + $searchin_select .= " checked"; |
|
| 195 | + } |
|
| 180 | 196 | $searchin_select .= " />".planet_constant("MD_BLOG")." "; |
| 181 | 197 | $searchin_select .= "<input type=\"checkbox\" name=\"searchin[]\" value=\"feed\""; |
| 182 | - if(in_array("feed", $searchin)) $searchin_select .= " checked"; |
|
| 198 | + if(in_array("feed", $searchin)) { |
|
| 199 | + $searchin_select .= " checked"; |
|
| 200 | + } |
|
| 183 | 201 | $searchin_select .= " />".planet_constant("MD_FEED")." "; |
| 184 | 202 | $searchin_select .= "<input type=\"checkbox\" name=\"searchin[]\" value=\"desc\""; |
| 185 | - if(in_array("desc", $searchin)) $searchin_select .= " checked"; |
|
| 203 | + if(in_array("desc", $searchin)) { |
|
| 204 | + $searchin_select .= " checked"; |
|
| 205 | + } |
|
| 186 | 206 | $searchin_select .= " />".planet_constant("MD_DESC")." "; |
| 187 | 207 | $searchin_select .= "<input type=\"checkbox\" name=\"searchin[]\" value=\"all\""; |
| 188 | - if(empty($searchin)) $searchin_select .= " checked"; |
|
| 208 | + if(empty($searchin)) { |
|
| 209 | + $searchin_select .= " checked"; |
|
| 210 | + } |
|
| 189 | 211 | $searchin_select .= " />"._ALL." "; |
| 190 | 212 | |
| 191 | 213 | /* sortby */ |
| 192 | 214 | $sortby_select = "<select name=\"sortby\">"; |
| 193 | 215 | $sortby_select .= "<option value=\"\""; |
| 194 | - if(empty($sortby)) $sortby_select .= " selected=\"selected\""; |
|
| 216 | + if(empty($sortby)) { |
|
| 217 | + $sortby_select .= " selected=\"selected\""; |
|
| 218 | + } |
|
| 195 | 219 | $sortby_select .= ">"._NONE."</option>"; |
| 196 | 220 | $sortby_select .= "<option value=\"a.art_time\""; |
| 197 | - if("a.art_time" == $sortby) $sortby_select .= " selected=\"selected\""; |
|
| 221 | + if("a.art_time" == $sortby) { |
|
| 222 | + $sortby_select .= " selected=\"selected\""; |
|
| 223 | + } |
|
| 198 | 224 | $sortby_select .= ">".planet_constant("MD_TIME")."</option>"; |
| 199 | 225 | $sortby_select .= "<option value=\"a.art_title\""; |
| 200 | - if("a.art_title" == $sortby) $sortby_select .= " selected=\"selected\""; |
|
| 226 | + if("a.art_title" == $sortby) { |
|
| 227 | + $sortby_select .= " selected=\"selected\""; |
|
| 228 | + } |
|
| 201 | 229 | $sortby_select .= ">".planet_constant("MD_TITLE")."</option>"; |
| 202 | 230 | $sortby_select .= "<option value=\"\"> ---- </option>"; |
| 203 | 231 | $sortby_select .= "<option value=\"a.blog_title\""; |
| 204 | - if("a.blog_title" == $sortby) $sortby_select .= " selected=\"selected\""; |
|
| 232 | + if("a.blog_title" == $sortby) { |
|
| 233 | + $sortby_select .= " selected=\"selected\""; |
|
| 234 | + } |
|
| 205 | 235 | $sortby_select .= ">".planet_constant("MD_BLOG")."</option>"; |
| 206 | 236 | $sortby_select .= "<option value=\"a.blog_time\""; |
| 207 | - if("b.blog_time" == $sortby) $sortby_select .= " selected=\"selected\""; |
|
| 237 | + if("b.blog_time" == $sortby) { |
|
| 238 | + $sortby_select .= " selected=\"selected\""; |
|
| 239 | + } |
|
| 208 | 240 | $sortby_select .= ">".planet_constant("MD_UPDATE")."</option>"; |
| 209 | 241 | $sortby_select .= "</select>"; |
| 210 | 242 | |