Index: trunk/extensions/OAI/OAIRepo_body.php |
— | — | @@ -460,7 +460,8 @@ |
461 | 461 | $rows[] = $row; |
462 | 462 | $this->_lastSequence = $row->up_sequence; |
463 | 463 | } |
464 | | - if( $row = $resultSet->fetchObject() ) { |
| 464 | + $row = $resultSet->fetchObject(); |
| 465 | + if( $row ) { |
465 | 466 | $limit = wfTimestamp( TS_MW, $until ); |
466 | 467 | if( $until ) |
467 | 468 | $nextToken = "$metadataPrefix:$row->up_sequence:$limit"; |
Index: trunk/extensions/OAI/OAIHarvest.php |
— | — | @@ -94,9 +94,10 @@ |
95 | 95 | |
96 | 96 | $xp = new DOMXPath( $doc ); |
97 | 97 | $xp->registerNamespace( 'oai', 'http://www.openarchives.org/OAI/2.0/' ); |
98 | | - |
99 | | - if( $errors = $this->checkResponseErrors( $xp ) ) |
| 98 | + $errors = $this->checkResponseErrors( $xp ); |
| 99 | + if( $errors ) { |
100 | 100 | return $errors; |
| 101 | + } |
101 | 102 | |
102 | 103 | $resultSet = $xp->query( '/oai:OAI-PMH/oai:ListRecords/oai:record' ); |
103 | 104 | foreach( $resultSet as $node ) { |
Index: trunk/extensions/ProofreadPage/ProofreadPage_body.php |
— | — | @@ -1226,7 +1226,8 @@ |
1227 | 1227 | $pr_index = $dbr->tableName( 'pr_index' ); |
1228 | 1228 | $query = "SELECT * FROM $pr_index WHERE pr_page_id=" . $index_id; |
1229 | 1229 | $res = $dbr->query( $query, __METHOD__ ); |
1230 | | - if( $x = $dbr->fetchObject( $res ) ) { |
| 1230 | + $x = $dbr->fetchObject( $res ); |
| 1231 | + if( $x ) { |
1231 | 1232 | $n = $x->pr_count; |
1232 | 1233 | $n0 = $x->pr_q0; |
1233 | 1234 | $n1 = $x->pr_q1; |
Index: trunk/extensions/wikihiero/wh_table.php |
— | — | @@ -72,8 +72,8 @@ |
73 | 73 | <?php |
74 | 74 | |
75 | 75 | echo "<b>" . htmlspecialchars( $table ) . "</b> - ".WH_Text($table)."<br /><br />"; |
76 | | - |
77 | | - if($dh = opendir(WH_IMG_DIR)) { |
| 76 | + $dh = opendir(WH_IMG_DIR); |
| 77 | + if( $dh ) { |
78 | 78 | while(($file = readdir($dh)) !== false) { |
79 | 79 | if($table == "All") |
80 | 80 | { |
Index: trunk/extensions/wikihiero/index.php |
— | — | @@ -154,7 +154,8 @@ |
155 | 155 | else |
156 | 156 | echo "<a href=\"javascript:LangLink('".key($wh_language['Lang'])."');\">$l</a>"; |
157 | 157 | next($wh_language['Lang']); |
158 | | - if($l = current($wh_language['Lang'])) |
| 158 | + $l = current($wh_language['Lang']); |
| 159 | + if( $l ) |
159 | 160 | echo " | "; |
160 | 161 | } |
161 | 162 | ?>]</SMALL> |
Index: trunk/extensions/wikihiero/wh_generate.php |
— | — | @@ -57,7 +57,8 @@ |
58 | 58 | |
59 | 59 | if(is_dir($img_dir)) |
60 | 60 | { |
61 | | - if ($dh = opendir($img_dir)) |
| 61 | + $dh = opendir($img_dir); |
| 62 | + if ( $dh ) |
62 | 63 | { |
63 | 64 | while (($file = readdir($dh)) !== false) |
64 | 65 | { |
Index: trunk/extensions/CentralAuth/SpecialGlobalUsers.php |
— | — | @@ -14,10 +14,12 @@ |
15 | 15 | if ( $par ) { |
16 | 16 | $pg->setGroup( $par ); |
17 | 17 | } |
18 | | - if ( $rqGroup = $wgRequest->getVal( 'group' ) ) { |
| 18 | + $rqGroup = $wgRequest->getVal( 'group' ); |
| 19 | + if ( $rqGroup ) { |
19 | 20 | $pg->setGroup( $rqGroup ); |
20 | 21 | } |
21 | | - if ( $rqUsername = $wgContLang->ucfirst( $wgRequest->getVal( 'username' ) ) ) { |
| 22 | + $rqUsername = $wgContLang->ucfirst( $wgRequest->getVal( 'username' ) ) |
| 23 | + if ( $rqUsername ) { |
22 | 24 | $pg->setUsername( $rqUsername ); |
23 | 25 | } |
24 | 26 | |
Index: trunk/extensions/FlaggedRevs/forms/RevisionReviewForm.php |
— | — | @@ -213,7 +213,8 @@ |
214 | 214 | return 'review_param_missing'; // user didn't say |
215 | 215 | } |
216 | 216 | # Fill in implicit tag data for binary flag case |
217 | | - if ( $iDims = $this->implicitDims() ) { |
| 217 | + $iDims = $this->implicitDims(); |
| 218 | + if ( $iDims ) { |
218 | 219 | $this->dims = $iDims; |
219 | 220 | } else { |
220 | 221 | foreach ( FlaggedRevs::getDimensions() as $tag => $levels ) { |
Index: trunk/extensions/FlaggedRevs/FlaggedArticleView.php |
— | — | @@ -777,7 +777,8 @@ |
778 | 778 | # Determine timestamp. A reviewed version may have explicitly been requested... |
779 | 779 | $frev = null; |
780 | 780 | $time = false; |
781 | | - if ( $reqId = $wgRequest->getVal( 'stableid' ) ) { |
| 781 | + $reqId = $wgRequest->getVal( 'stableid' ); |
| 782 | + if ( $reqId ) { |
782 | 783 | $frev = FlaggedRevision::newFromTitle( $this->article->getTitle(), $reqId ); |
783 | 784 | } elseif ( $this->pageOverride() ) { |
784 | 785 | $frev = $this->article->getStableRev(); |
Index: trunk/extensions/ReaderFeedback/specialpages/RatingHistory_body.php |
— | — | @@ -169,8 +169,11 @@ |
170 | 170 | $table = fread( $fp, filesize($filePath) ); |
171 | 171 | fclose( $fp ); |
172 | 172 | $html .= '<h2>' . wfMsgHtml("readerfeedback-$tag") . '</h2>' . $table . "\n"; |
173 | | - } elseif( $table = $this->makeHTMLTable( $tag, $filePath ) ) { |
174 | | - $html .= '<h2>' . wfMsgHtml("readerfeedback-$tag") . '</h2>' . $table . "\n"; |
| 173 | + } else { |
| 174 | + $table = $this->makeHTMLTable( $tag, $filePath ); |
| 175 | + if( $table ) { |
| 176 | + $html .= '<h2>' . wfMsgHtml("readerfeedback-$tag") . '</h2>' . $table . "\n"; |
| 177 | + } |
175 | 178 | } |
176 | 179 | break; |
177 | 180 | } |