Index: trunk/phase3/includes/Skin.php |
— | — | @@ -1127,7 +1127,7 @@ |
1128 | 1128 | global $wgOut; |
1129 | 1129 | |
1130 | 1130 | $sub = $wgOut->getSubtitle(); |
1131 | | - if ( '' == $sub ) { |
| 1131 | + if ( $sub == '' ) { |
1132 | 1132 | global $wgExtraSubtitle; |
1133 | 1133 | $sub = wfMsgExt( 'tagline', 'parsemag' ) . $wgExtraSubtitle; |
1134 | 1134 | } |
— | — | @@ -1530,7 +1530,7 @@ |
1531 | 1531 | } |
1532 | 1532 | |
1533 | 1533 | function logoText( $align = '' ) { |
1534 | | - if ( '' != $align ) { |
| 1534 | + if ( $align != '' ) { |
1535 | 1535 | $a = " align='{$align}'"; |
1536 | 1536 | } else { |
1537 | 1537 | $a = ''; |
— | — | @@ -1839,7 +1839,7 @@ |
1840 | 1840 | $url = $nt->escapeFullURL(); |
1841 | 1841 | $text = $wgContLang->getLanguageName( $nt->getInterwiki() ); |
1842 | 1842 | |
1843 | | - if ( '' == $text ) { $text = $l; } |
| 1843 | + if ( $text == '' ) { $text = $l; } |
1844 | 1844 | $style = $this->getExternalLinkAttributes(); |
1845 | 1845 | $s .= "<a href=\"{$url}\"{$style}>{$text}</a>"; |
1846 | 1846 | } |
Index: trunk/phase3/includes/ChangesList.php |
— | — | @@ -262,7 +262,7 @@ |
263 | 263 | # Make date header if necessary |
264 | 264 | $date = $wgLang->date( $rc_timestamp, true, true ); |
265 | 265 | if( $date != $this->lastdate ) { |
266 | | - if( '' != $this->lastdate ) { |
| 266 | + if( $this->lastdate != '' ) { |
267 | 267 | $s .= "</ul>\n"; |
268 | 268 | } |
269 | 269 | $s .= Xml::element( 'h4', null, $date ) . "\n<ul class=\"special\">"; |
Index: trunk/phase3/includes/ProtectionForm.php |
— | — | @@ -191,7 +191,7 @@ |
192 | 192 | |
193 | 193 | list( $cascadeSources, /* $restrictions */ ) = $this->mTitle->getCascadeProtectionSources(); |
194 | 194 | |
195 | | - if ( "" != $err ) { |
| 195 | + if ( $err != "" ) { |
196 | 196 | $wgOut->setSubtitle( wfMsgHtml( 'formerror' ) ); |
197 | 197 | $wgOut->addHTML( "<p class='error'>{$err}</p>\n" ); |
198 | 198 | } |
Index: trunk/phase3/includes/Title.php |
— | — | @@ -542,7 +542,7 @@ |
543 | 543 | public function getNsText() { |
544 | 544 | global $wgContLang; |
545 | 545 | |
546 | | - if ( '' != $this->mInterwiki ) { |
| 546 | + if ( $this->mInterwiki != '' ) { |
547 | 547 | // This probably shouldn't even happen. ohh man, oh yuck. |
548 | 548 | // But for interwiki transclusion it sometimes does. |
549 | 549 | // Shit. Shit shit shit. |
— | — | @@ -654,7 +654,7 @@ |
655 | 655 | */ |
656 | 656 | public function getFullText() { |
657 | 657 | $text = $this->getPrefixedText(); |
658 | | - if( '' != $this->mFragment ) { |
| 658 | + if( $this->mFragment != '' ) { |
659 | 659 | $text .= '#' . $this->mFragment; |
660 | 660 | } |
661 | 661 | return $text; |
— | — | @@ -738,7 +738,7 @@ |
739 | 739 | $baseUrl = $interwiki->getURL( ); |
740 | 740 | |
741 | 741 | $namespace = wfUrlencode( $this->getNsText() ); |
742 | | - if ( '' != $namespace ) { |
| 742 | + if ( $namespace != '' ) { |
743 | 743 | # Can this actually happen? Interwikis shouldn't be parsed. |
744 | 744 | # Yes! It can in interwiki transclusion. But... it probably shouldn't. |
745 | 745 | $namespace .= ':'; |
— | — | @@ -910,7 +910,7 @@ |
911 | 911 | * interwiki link |
912 | 912 | */ |
913 | 913 | public function getEditURL() { |
914 | | - if ( '' != $this->mInterwiki ) { return ''; } |
| 914 | + if ( $this->mInterwiki != '' ) { return ''; } |
915 | 915 | $s = $this->getLocalURL( 'action=edit' ); |
916 | 916 | |
917 | 917 | return $s; |
— | — | @@ -929,7 +929,7 @@ |
930 | 930 | * Is this Title interwiki? |
931 | 931 | * @return \type{\bool} |
932 | 932 | */ |
933 | | - public function isExternal() { return ( '' != $this->mInterwiki ); } |
| 933 | + public function isExternal() { return ( $this->mInterwiki != '' ); } |
934 | 934 | |
935 | 935 | /** |
936 | 936 | * Is this page "semi-protected" - the *only* protection is autoconfirm? |
— | — | @@ -1305,7 +1305,7 @@ |
1306 | 1306 | if( $right == 'sysop' ) { |
1307 | 1307 | $right = 'protect'; |
1308 | 1308 | } |
1309 | | - if( '' != $right && !$user->isAllowed( $right ) ) { |
| 1309 | + if( $right != '' && !$user->isAllowed( $right ) ) { |
1310 | 1310 | // Users with 'editprotected' permission can edit protected pages |
1311 | 1311 | if( $action=='edit' && $user->isAllowed( 'editprotected' ) ) { |
1312 | 1312 | // Users with 'editprotected' permission cannot edit protected pages |
— | — | @@ -1337,7 +1337,7 @@ |
1338 | 1338 | if( $cascadingSources > 0 && isset($restrictions[$action]) ) { |
1339 | 1339 | foreach( $restrictions[$action] as $right ) { |
1340 | 1340 | $right = ( $right == 'sysop' ) ? 'protect' : $right; |
1341 | | - if( '' != $right && !$user->isAllowed( $right ) ) { |
| 1341 | + if( $right != '' && !$user->isAllowed( $right ) ) { |
1342 | 1342 | $pages = ''; |
1343 | 1343 | foreach( $cascadingSources as $page ) |
1344 | 1344 | $pages .= '* [[:' . $page->getPrefixedText() . "]]\n"; |
— | — | @@ -2196,7 +2196,7 @@ |
2197 | 2197 | */ |
2198 | 2198 | /* private */ function prefix( $name ) { |
2199 | 2199 | $p = ''; |
2200 | | - if ( '' != $this->mInterwiki ) { |
| 2200 | + if ( $this->mInterwiki != '' ) { |
2201 | 2201 | $p = $this->mInterwiki . ':'; |
2202 | 2202 | } |
2203 | 2203 | if ( 0 != $this->mNamespace ) { |
— | — | @@ -2274,7 +2274,7 @@ |
2275 | 2275 | $dbkey = preg_replace( '/[ _\xA0\x{1680}\x{180E}\x{2000}-\x{200A}\x{2028}\x{2029}\x{202F}\x{205F}\x{3000}]+/u', '_', $dbkey ); |
2276 | 2276 | $dbkey = trim( $dbkey, '_' ); |
2277 | 2277 | |
2278 | | - if ( '' == $dbkey ) { |
| 2278 | + if ( $dbkey == '' ) { |
2279 | 2279 | return false; |
2280 | 2280 | } |
2281 | 2281 | |
— | — | @@ -2349,7 +2349,7 @@ |
2350 | 2350 | |
2351 | 2351 | # We already know that some pages won't be in the database! |
2352 | 2352 | # |
2353 | | - if ( '' != $this->mInterwiki || NS_SPECIAL == $this->mNamespace ) { |
| 2353 | + if ( $this->mInterwiki != '' || NS_SPECIAL == $this->mNamespace ) { |
2354 | 2354 | $this->mArticleID = 0; |
2355 | 2355 | } |
2356 | 2356 | $fragment = strstr( $dbkey, '#' ); |
— | — | @@ -2661,9 +2661,9 @@ |
2662 | 2662 | if ( strlen( $nt->getDBkey() ) < 1 ) { |
2663 | 2663 | $errors[] = array('articleexists'); |
2664 | 2664 | } |
2665 | | - if ( ( '' == $this->getDBkey() ) || |
| 2665 | + if ( ( $this->getDBkey() == '' ) || |
2666 | 2666 | ( !$oldid ) || |
2667 | | - ( '' == $nt->getDBkey() ) ) { |
| 2667 | + ( $nt->getDBkey() == '' ) ) { |
2668 | 2668 | $errors[] = array('badarticleerror'); |
2669 | 2669 | } |
2670 | 2670 | |
Index: trunk/phase3/includes/parser/Parser.php |
— | — | @@ -537,7 +537,7 @@ |
538 | 538 | $taglist = implode( '|', $elements ); |
539 | 539 | $start = "/<($taglist)(\\s+[^>]*?|\\s*?)(\/?" . ">)|<(!--)/i"; |
540 | 540 | |
541 | | - while ( '' != $text ) { |
| 541 | + while ( $text != '' ) { |
542 | 542 | $p = preg_split( $start, $text, 2, PREG_SPLIT_DELIM_CAPTURE ); |
543 | 543 | $stripped .= $p[0]; |
544 | 544 | if( count( $p ) < 5 ) { |
— | — | @@ -1683,7 +1683,7 @@ |
1684 | 1684 | wfProfileOut( __METHOD__."-might_be_img" ); |
1685 | 1685 | } |
1686 | 1686 | |
1687 | | - $wasblank = ( '' == $text ); |
| 1687 | + $wasblank = ( $text == '' ); |
1688 | 1688 | if ( $wasblank ) $text = $link; |
1689 | 1689 | |
1690 | 1690 | # Link not escaped by : , create the various objects |
— | — | @@ -1871,7 +1871,7 @@ |
1872 | 1872 | */ |
1873 | 1873 | /* private */ function closeParagraph() { |
1874 | 1874 | $result = ''; |
1875 | | - if ( '' != $this->mLastSection ) { |
| 1875 | + if ( $this->mLastSection != '' ) { |
1876 | 1876 | $result = '</' . $this->mLastSection . ">\n"; |
1877 | 1877 | } |
1878 | 1878 | $this->mInPre = false; |
— | — | @@ -2081,7 +2081,7 @@ |
2082 | 2082 | $t = substr( $t, 1 ); |
2083 | 2083 | } else { |
2084 | 2084 | // paragraph |
2085 | | - if ( '' == trim($t) ) { |
| 2085 | + if ( trim($t) == '' ) { |
2086 | 2086 | if ( $paragraphStack ) { |
2087 | 2087 | $output .= $paragraphStack.'<br />'; |
2088 | 2088 | $paragraphStack = false; |
— | — | @@ -2121,7 +2121,7 @@ |
2122 | 2122 | $output .= $this->closeList( $prefix2[$prefixLength-1] ); |
2123 | 2123 | --$prefixLength; |
2124 | 2124 | } |
2125 | | - if ( '' != $this->mLastSection ) { |
| 2125 | + if ( $this->mLastSection != '' ) { |
2126 | 2126 | $output .= '</' . $this->mLastSection . '>'; |
2127 | 2127 | $this->mLastSection = ''; |
2128 | 2128 | } |
— | — | @@ -3989,7 +3989,7 @@ |
3990 | 3990 | $m = array(); |
3991 | 3991 | if ( preg_match( "/^($nc+:|)$tc+?( \\($tc+\\))$/", $t, $m ) ) { |
3992 | 3992 | $text = preg_replace( $p2, "[[$m[1]\\1$m[2]|\\1]]", $text ); |
3993 | | - } elseif ( preg_match( "/^($nc+:|)$tc+?(, $tc+|)$/", $t, $m ) && '' != "$m[1]$m[2]" ) { |
| 3993 | + } elseif ( preg_match( "/^($nc+:|)$tc+?(, $tc+|)$/", $t, $m ) && "$m[1]$m[2]" != '' ) { |
3994 | 3994 | $text = preg_replace( $p2, "[[$m[1]\\1$m[2]|\\1]]", $text ); |
3995 | 3995 | } else { |
3996 | 3996 | # if there's no context, don't bother duplicating the title |
Index: trunk/phase3/includes/Linker.php |
— | — | @@ -350,7 +350,7 @@ |
351 | 351 | * despite $query not being used. |
352 | 352 | */ |
353 | 353 | function makeSelfLinkObj( $nt, $text = '', $query = '', $trail = '', $prefix = '' ) { |
354 | | - if ( '' == $text ) { |
| 354 | + if ( $text == '' ) { |
355 | 355 | $text = htmlspecialchars( $nt->getPrefixedText() ); |
356 | 356 | } |
357 | 357 | list( $inside, $trail ) = Linker::splitTrail( $trail ); |
— | — | @@ -388,7 +388,7 @@ |
389 | 389 | * via Parser::maybeMakeExternalImage(). |
390 | 390 | */ |
391 | 391 | function makeExternalImage( $url, $alt = '' ) { |
392 | | - if ( '' == $alt ) { |
| 392 | + if ( $alt == '' ) { |
393 | 393 | $alt = $this->fnamePart( $url ); |
394 | 394 | } |
395 | 395 | $img = ''; |
— | — | @@ -541,7 +541,7 @@ |
542 | 542 | |
543 | 543 | $s = $thumb->toHtml( $params ); |
544 | 544 | } |
545 | | - if ( '' != $fp['align'] ) { |
| 545 | + if ( $fp['align'] != '' ) { |
546 | 546 | $s = "<div class=\"float{$fp['align']}\">{$s}</div>"; |
547 | 547 | } |
548 | 548 | return str_replace("\n", ' ',$prefix.$s.$postfix); |
— | — | @@ -748,7 +748,7 @@ |
749 | 749 | function specialLink( $name, $key = '' ) { |
750 | 750 | global $wgContLang; |
751 | 751 | |
752 | | - if ( '' == $key ) { $key = strtolower( $name ); } |
| 752 | + if ( $key == '' ) { $key = strtolower( $name ); } |
753 | 753 | $pn = $wgContLang->ucfirst( $name ); |
754 | 754 | return $this->makeKnownLink( $wgContLang->specialPage( $pn ), |
755 | 755 | wfMsg( $key ) ); |
— | — | @@ -1068,7 +1068,7 @@ |
1069 | 1069 | } |
1070 | 1070 | |
1071 | 1071 | # Handle link renaming [[foo|text]] will show link as "text" |
1072 | | - if( "" != $match[3] ) { |
| 1072 | + if( $match[3] != "" ) { |
1073 | 1073 | $text = $match[3]; |
1074 | 1074 | } else { |
1075 | 1075 | $text = $match[1]; |
— | — | @@ -1153,7 +1153,7 @@ |
1154 | 1154 | } |
1155 | 1155 | |
1156 | 1156 | $ret = $contextTitle->getPrefixedText(). '/' . trim($noslash) . $suffix; |
1157 | | - if( '' === $text ) { |
| 1157 | + if( $text === '' ) { |
1158 | 1158 | $text = $target . $suffix; |
1159 | 1159 | } # this might be changed for ugliness reasons |
1160 | 1160 | } else { |
— | — | @@ -1171,7 +1171,7 @@ |
1172 | 1172 | # / at the end means don't show full path |
1173 | 1173 | if( substr( $nodotdot, -1, 1 ) === '/' ) { |
1174 | 1174 | $nodotdot = substr( $nodotdot, 0, -1 ); |
1175 | | - if( '' === $text ) { |
| 1175 | + if( $text === '' ) { |
1176 | 1176 | $text = $nodotdot . $suffix; |
1177 | 1177 | } |
1178 | 1178 | } |
— | — | @@ -1422,7 +1422,7 @@ |
1423 | 1423 | $regex = $wgContLang->linkTrail(); |
1424 | 1424 | } |
1425 | 1425 | $inside = ''; |
1426 | | - if ( '' != $trail ) { |
| 1426 | + if ( $trail != '' ) { |
1427 | 1427 | $m = array(); |
1428 | 1428 | if ( preg_match( $regex, $trail, $m ) ) { |
1429 | 1429 | $inside = $m[1]; |
Index: trunk/phase3/includes/db/Database.php |
— | — | @@ -2223,7 +2223,7 @@ |
2224 | 2224 | } |
2225 | 2225 | } |
2226 | 2226 | |
2227 | | - if ( '' != $cmd ) { $cmd .= ' '; } |
| 2227 | + if ( $cmd != '' ) { $cmd .= ' '; } |
2228 | 2228 | $cmd .= "$line\n"; |
2229 | 2229 | |
2230 | 2230 | if ( $done ) { |
Index: trunk/phase3/includes/db/DatabaseOracle.php |
— | — | @@ -955,7 +955,7 @@ |
956 | 956 | } |
957 | 957 | } |
958 | 958 | |
959 | | - if ( '' != $cmd ) { |
| 959 | + if ( $cmd != '' ) { |
960 | 960 | $cmd .= ' '; |
961 | 961 | } |
962 | 962 | $cmd .= "$line\n"; |
Index: trunk/phase3/includes/LogPage.php |
— | — | @@ -104,7 +104,7 @@ |
105 | 105 | */ |
106 | 106 | public function getRcComment() { |
107 | 107 | $rcComment = $this->actionText; |
108 | | - if( '' != $this->comment ) { |
| 108 | + if( $this->comment != '' ) { |
109 | 109 | if ($rcComment == '') |
110 | 110 | $rcComment = $this->comment; |
111 | 111 | else |
Index: trunk/phase3/includes/Export.php |
— | — | @@ -449,7 +449,7 @@ |
450 | 450 | if( $row->page_is_redirect ) { |
451 | 451 | $out .= ' ' . Xml::element( 'redirect', array() ) . "\n"; |
452 | 452 | } |
453 | | - if( '' != $row->page_restrictions ) { |
| 453 | + if( $row->page_restrictions != '' ) { |
454 | 454 | $out .= ' ' . Xml::element( 'restrictions', array(), |
455 | 455 | strval( $row->page_restrictions ) ) . "\n"; |
456 | 456 | } |
Index: trunk/phase3/includes/EditPage.php |
— | — | @@ -934,7 +934,7 @@ |
935 | 935 | } |
936 | 936 | |
937 | 937 | # Don't save a new article if it's blank. |
938 | | - if ( '' == $this->textbox1 ) { |
| 938 | + if ( $this->textbox1 == '' ) { |
939 | 939 | wfProfileOut( __METHOD__ ); |
940 | 940 | return self::AS_BLANK_ARTICLE; |
941 | 941 | } |
Index: trunk/phase3/includes/OutputPage.php |
— | — | @@ -1004,7 +1004,7 @@ |
1005 | 1005 | return; |
1006 | 1006 | } |
1007 | 1007 | wfProfileIn( __METHOD__ ); |
1008 | | - if ( '' != $this->mRedirect ) { |
| 1008 | + if ( $this->mRedirect != '' ) { |
1009 | 1009 | # Standards require redirect URLs to be absolute |
1010 | 1010 | $this->mRedirect = wfExpandUrl( $this->mRedirect ); |
1011 | 1011 | if( $this->mRedirectCode == '301' || $this->mRedirectCode == '303' ) { |
— | — | @@ -1569,7 +1569,7 @@ |
1570 | 1570 | $returntoquery = $wgRequest->getText( 'returntoquery' ); |
1571 | 1571 | } |
1572 | 1572 | |
1573 | | - if ( '' === $returnto ) { |
| 1573 | + if ( $returnto === '' ) { |
1574 | 1574 | $returnto = Title::newMainPage(); |
1575 | 1575 | } |
1576 | 1576 | |
— | — | @@ -1607,7 +1607,7 @@ |
1608 | 1608 | $ret .= "<?xml version=\"1.0\" encoding=\"$wgOutputEncoding\" ?" . ">\n"; |
1609 | 1609 | } |
1610 | 1610 | |
1611 | | - if ( '' == $this->getHTMLTitle() ) { |
| 1611 | + if ( $this->getHTMLTitle() == '' ) { |
1612 | 1612 | $this->setHTMLTitle( wfMsg( 'pagetitle', $this->getPageTitle() )); |
1613 | 1613 | } |
1614 | 1614 | |
Index: trunk/phase3/includes/Wiki.php |
— | — | @@ -113,7 +113,7 @@ |
114 | 114 | if( $curid = $wgRequest->getInt( 'curid' ) ) { |
115 | 115 | # URLs like this are generated by RC, because rc_title isn't always accurate |
116 | 116 | $ret = Title::newFromID( $curid ); |
117 | | - } elseif( '' == $title && 'delete' != $action ) { |
| 117 | + } elseif( $title == '' && 'delete' != $action ) { |
118 | 118 | $ret = Title::newMainPage(); |
119 | 119 | } else { |
120 | 120 | $ret = Title::newFromURL( $title ); |
Index: trunk/phase3/includes/GlobalFunctions.php |
— | — | @@ -337,7 +337,7 @@ |
338 | 338 | array_map( array( $wgOut, 'debug' ), $cache ); |
339 | 339 | $cache = array(); |
340 | 340 | } |
341 | | - if ( '' != $wgDebugLogFile && !$wgProfileOnly ) { |
| 341 | + if ( $wgDebugLogFile != '' && !$wgProfileOnly ) { |
342 | 342 | # Strip unprintables; they can switch terminal modes when binary data |
343 | 343 | # gets dumped, which is pretty annoying. |
344 | 344 | $text = preg_replace( '![\x00-\x08\x0b\x0c\x0e-\x1f]!', ' ', $text ); |
— | — | @@ -480,7 +480,7 @@ |
481 | 481 | $log = sprintf( "%s\t%04.3f\t%s\n", |
482 | 482 | gmdate( 'YmdHis' ), $elapsed, |
483 | 483 | urldecode( $wgRequest->getRequestURL() . $forward ) ); |
484 | | - if ( '' != $wgDebugLogFile && ( $wgRequest->getVal('action') != 'raw' || $wgDebugRawPage ) ) { |
| 484 | + if ( $wgDebugLogFile != '' && ( $wgRequest->getVal('action') != 'raw' || $wgDebugRawPage ) ) { |
485 | 485 | wfErrorLog( $log . $prof, $wgDebugLogFile ); |
486 | 486 | } |
487 | 487 | } |
— | — | @@ -497,7 +497,7 @@ |
498 | 498 | if ( !is_null( $wgReadOnly ) ) { |
499 | 499 | return (bool)$wgReadOnly; |
500 | 500 | } |
501 | | - if ( '' == $wgReadOnlyFile ) { |
| 501 | + if ( $wgReadOnlyFile == '' ) { |
502 | 502 | return false; |
503 | 503 | } |
504 | 504 | // Set $wgReadOnly for faster access next time |
— | — | @@ -1285,8 +1285,8 @@ |
1286 | 1286 | |
1287 | 1287 | $cgi = ''; |
1288 | 1288 | foreach ( $array1 as $key => $value ) { |
1289 | | - if ( '' !== $value ) { |
1290 | | - if ( '' != $cgi ) { |
| 1289 | + if ( $value != '' ) { |
| 1290 | + if ( $cgi != '' ) { |
1291 | 1291 | $cgi .= '&'; |
1292 | 1292 | } |
1293 | 1293 | if ( is_array( $value ) ) { |
Index: trunk/phase3/includes/SkinTemplate.php |
— | — | @@ -744,10 +744,10 @@ |
745 | 745 | $urlArgs = 'action=edit§ion=new'; |
746 | 746 | $preloadMsg = wfMsgForContent( 'talk-addsection-preload' ); |
747 | 747 | $editintroMsg = wfMsgForContent( 'talk-addsection-editintro' ); |
748 | | - if( '' != $preloadMsg ) { |
| 748 | + if( $preloadMsg != '' ) { |
749 | 749 | $urlArgs .= '&preload=' . urlencode( $preloadMsg ); |
750 | 750 | } |
751 | | - if( '' != $editintroMsg ) { |
| 751 | + if( $editintroMsg != '' ) { |
752 | 752 | $urlArgs .= '&editintro=' . urlencode( $editintroMsg ); |
753 | 753 | } |
754 | 754 | $content_actions['addsection'] = array( |
Index: trunk/phase3/includes/specials/SpecialUserlogin.php |
— | — | @@ -122,7 +122,7 @@ |
123 | 123 | function addNewAccountMailPassword() { |
124 | 124 | global $wgOut; |
125 | 125 | |
126 | | - if ('' == $this->mEmail) { |
| 126 | + if ( $this->mEmail == '' ) { |
127 | 127 | $this->mainLoginForm( wfMsg( 'noemail', htmlspecialchars( $this->mName ) ) ); |
128 | 128 | return; |
129 | 129 | } |
— | — | @@ -234,7 +234,7 @@ |
235 | 235 | // cation server before they create an account (otherwise, they can |
236 | 236 | // create a local account and login as any domain user). We only need |
237 | 237 | // to check this for domains that aren't local. |
238 | | - if( 'local' != $this->mDomain && '' != $this->mDomain ) { |
| 238 | + if( 'local' != $this->mDomain && $this->mDomain != '' ) { |
239 | 239 | if( !$wgAuth->canCreateAccounts() && ( !$wgAuth->userExists( $this->mName ) || !$wgAuth->authenticate( $this->mName, $this->mPassword ) ) ) { |
240 | 240 | $this->mainLoginForm( wfMsg( 'wrongpassword' ) ); |
241 | 241 | return false; |
— | — | @@ -394,7 +394,7 @@ |
395 | 395 | */ |
396 | 396 | public function authenticateUserData() { |
397 | 397 | global $wgUser, $wgAuth; |
398 | | - if ( '' == $this->mName ) { |
| 398 | + if ( $this->mName == '' ) { |
399 | 399 | return self::NO_NAME; |
400 | 400 | } |
401 | 401 | |
— | — | @@ -492,7 +492,7 @@ |
493 | 493 | // faces etc will probably just fail cleanly here. |
494 | 494 | $retval = self::RESET_PASS; |
495 | 495 | } else { |
496 | | - $retval = '' == $this->mPassword ? self::EMPTY_PASS : self::WRONG_PASS; |
| 496 | + $retval = ($this->mPassword == '') ? self::EMPTY_PASS : self::WRONG_PASS; |
497 | 497 | } |
498 | 498 | } else { |
499 | 499 | $wgAuth->updateUser( $u ); |
— | — | @@ -670,7 +670,7 @@ |
671 | 671 | return; |
672 | 672 | } |
673 | 673 | |
674 | | - if ( '' == $this->mName ) { |
| 674 | + if ( $this->mName == '' ) { |
675 | 675 | $this->mainLoginForm( wfMsg( 'noname' ) ); |
676 | 676 | return; |
677 | 677 | } |
— | — | @@ -714,7 +714,7 @@ |
715 | 715 | function mailPasswordInternal( $u, $throttle = true, $emailTitle = 'passwordremindertitle', $emailText = 'passwordremindertext' ) { |
716 | 716 | global $wgServer, $wgScript, $wgUser, $wgNewPasswordExpiry; |
717 | 717 | |
718 | | - if ( '' == $u->getEmail() ) { |
| 718 | + if ( $u->getEmail() == '' ) { |
719 | 719 | return new WikiError( wfMsg( 'noemail', $u->getName() ) ); |
720 | 720 | } |
721 | 721 | $ip = wfGetIP(); |
— | — | @@ -868,7 +868,7 @@ |
869 | 869 | } |
870 | 870 | } |
871 | 871 | |
872 | | - if ( '' == $this->mName ) { |
| 872 | + if ( $this->mName == '' ) { |
873 | 873 | if ( $wgUser->isLoggedIn() ) { |
874 | 874 | $this->mName = $wgUser->getName(); |
875 | 875 | } else { |
Index: trunk/phase3/includes/specials/SpecialLockdb.php |
— | — | @@ -53,7 +53,7 @@ |
54 | 54 | $wgOut->setPagetitle( wfMsg( 'lockdb' ) ); |
55 | 55 | $wgOut->addWikiMsg( 'lockdbtext' ); |
56 | 56 | |
57 | | - if ( "" != $err ) { |
| 57 | + if ( $err != "" ) { |
58 | 58 | $wgOut->setSubtitle( wfMsg( 'formerror' ) ); |
59 | 59 | $wgOut->addHTML( '<p class="error">' . htmlspecialchars( $err ) . "</p>\n" ); |
60 | 60 | } |
Index: trunk/phase3/includes/specials/SpecialIpblocklist.php |
— | — | @@ -95,7 +95,7 @@ |
96 | 96 | $titleObj = SpecialPage::getTitleFor( "Ipblocklist" ); |
97 | 97 | $action = $titleObj->getLocalURL( "action=submit" ); |
98 | 98 | |
99 | | - if ( "" != $err ) { |
| 99 | + if ( $err != "" ) { |
100 | 100 | $wgOut->setSubtitle( wfMsg( "formerror" ) ); |
101 | 101 | $wgOut->addWikiText( Xml::tags( 'span', array( 'class' => 'error' ), $err ) . "\n" ); |
102 | 102 | } |
— | — | @@ -236,7 +236,7 @@ |
237 | 237 | global $wgOut, $wgUser; |
238 | 238 | |
239 | 239 | $wgOut->setPagetitle( wfMsg( "ipblocklist" ) ); |
240 | | - if ( "" != $msg ) { |
| 240 | + if ( $msg != "" ) { |
241 | 241 | $wgOut->setSubtitle( $msg ); |
242 | 242 | } |
243 | 243 | |
Index: trunk/phase3/includes/specials/SpecialProtectedtitles.php |
— | — | @@ -16,7 +16,7 @@ |
17 | 17 | function showList( $msg = '' ) { |
18 | 18 | global $wgOut, $wgRequest; |
19 | 19 | |
20 | | - if ( "" != $msg ) { |
| 20 | + if ( $msg != "" ) { |
21 | 21 | $wgOut->setSubtitle( $msg ); |
22 | 22 | } |
23 | 23 | |
Index: trunk/phase3/includes/specials/SpecialEmailuser.php |
— | — | @@ -262,7 +262,7 @@ |
263 | 263 | |
264 | 264 | } |
265 | 265 | static function validateEmailTarget ( $target ) { |
266 | | - if ( "" == $target ) { |
| 266 | + if ( $target == "" ) { |
267 | 267 | wfDebug( "Target is empty.\n" ); |
268 | 268 | return "notarget"; |
269 | 269 | } |
Index: trunk/phase3/includes/specials/SpecialUnlockdb.php |
— | — | @@ -45,7 +45,7 @@ |
46 | 46 | $wgOut->setPagetitle( wfMsg( "unlockdb" ) ); |
47 | 47 | $wgOut->addWikiMsg( "unlockdbtext" ); |
48 | 48 | |
49 | | - if ( "" != $err ) { |
| 49 | + if ( $err != "" ) { |
50 | 50 | $wgOut->setSubtitle( wfMsg( "formerror" ) ); |
51 | 51 | $wgOut->addHTML( '<p class="error">' . htmlspecialchars( $err ) . "</p>\n" ); |
52 | 52 | } |
Index: trunk/phase3/includes/specials/SpecialSearch.php |
— | — | @@ -219,7 +219,7 @@ |
220 | 220 | } |
221 | 221 | |
222 | 222 | $filePrefix = $wgContLang->getFormattedNsText(NS_FILE).':'; |
223 | | - if( '' === trim( $term ) || $filePrefix === trim( $term ) ) { |
| 223 | + if( trim( $term ) === '' || $filePrefix === trim( $term ) ) { |
224 | 224 | $wgOut->addHTML( $this->searchFocus() ); |
225 | 225 | $wgOut->addHTML( $this->formHeader($term, 0, 0)); |
226 | 226 | if( $this->searchAdvanced ) { |
Index: trunk/phase3/includes/specials/SpecialProtectedpages.php |
— | — | @@ -16,7 +16,7 @@ |
17 | 17 | public function showList( $msg = '' ) { |
18 | 18 | global $wgOut, $wgRequest; |
19 | 19 | |
20 | | - if( "" != $msg ) { |
| 20 | + if( $msg != "" ) { |
21 | 21 | $wgOut->setSubtitle( $msg ); |
22 | 22 | } |
23 | 23 | |
Index: trunk/phase3/skins/CologneBlue.php |
— | — | @@ -228,13 +228,13 @@ |
229 | 229 | } |
230 | 230 | if ( $wgUser->isAllowed( 'delete' ) ) { |
231 | 231 | $dtp = $this->deleteThisPage(); |
232 | | - if ( '' != $dtp ) { |
| 232 | + if ( $dtp != '' ) { |
233 | 233 | $s .= $sep . $dtp; |
234 | 234 | } |
235 | 235 | } |
236 | 236 | if ( $wgUser->isAllowed( 'protect' ) ) { |
237 | 237 | $ptp = $this->protectThisPage(); |
238 | | - if ( '' != $ptp ) { |
| 238 | + if ( $ptp != '' ) { |
239 | 239 | $s .= $sep . $ptp; |
240 | 240 | } |
241 | 241 | } |
— | — | @@ -341,7 +341,7 @@ |
342 | 342 | $search = $wgRequest->getText( 'search' ); |
343 | 343 | $action = $this->escapeSearchLink(); |
344 | 344 | $s = "<form id=\"searchform{$this->searchboxes}\" method=\"get\" class=\"inline\" action=\"$action\">"; |
345 | | - if( '' != $label ) { |
| 345 | + if( $label != '' ) { |
346 | 346 | $s .= "{$label}: "; |
347 | 347 | } |
348 | 348 | |