Attempt at normalistion of comparison styles - empty string on left and right hand...
authorSam Reed <reedy@users.mediawiki.org>
Wed, 6 Jan 2010 19:59:42 +0000 (19:59 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Wed, 6 Jan 2010 19:59:42 +0000 (19:59 +0000)
Before this change, there were (? being regex 0 or 1)

"" ===? 1
'' ===? 24
"" !==? 8
'' !==? 32

== "" 14
== '' 344
!= "" 9
!== "" 4
!= '' 151
!== '' 85

Rhs was the much more common, and the preferred style by many developers.. (Was a similar discussion in #mediawiki recently.. After that lolbugreport i think)

Where there is a string (non empty) on the lhs, and variable/method call on the rhs still need normalising

24 files changed:
includes/ChangesList.php
includes/EditPage.php
includes/Export.php
includes/GlobalFunctions.php
includes/Linker.php
includes/LogPage.php
includes/OutputPage.php
includes/ProtectionForm.php
includes/Skin.php
includes/SkinTemplate.php
includes/Title.php
includes/Wiki.php
includes/db/Database.php
includes/db/DatabaseOracle.php
includes/parser/Parser.php
includes/specials/SpecialEmailuser.php
includes/specials/SpecialIpblocklist.php
includes/specials/SpecialLockdb.php
includes/specials/SpecialProtectedpages.php
includes/specials/SpecialProtectedtitles.php
includes/specials/SpecialSearch.php
includes/specials/SpecialUnlockdb.php
includes/specials/SpecialUserlogin.php
skins/CologneBlue.php

index bc776fd..ee5611d 100644 (file)
@@ -262,7 +262,7 @@ class ChangesList {
                # Make date header if necessary
                $date = $wgLang->date( $rc_timestamp, true, true );
                if( $date != $this->lastdate ) {
-                       if( '' != $this->lastdate ) {
+                       if( $this->lastdate != '' ) {
                                $s .= "</ul>\n";
                        }
                        $s .= Xml::element( 'h4', null, $date ) . "\n<ul class=\"special\">";
index 3a66869..99cc487 100644 (file)
@@ -934,7 +934,7 @@ class EditPage {
                        }
 
                        # Don't save a new article if it's blank.
-                       if ( '' == $this->textbox1 ) {
+                       if ( $this->textbox1 == '' ) {
                                wfProfileOut( __METHOD__ );
                                return self::AS_BLANK_ARTICLE;
                        }
index 61847ac..e8e7428 100644 (file)
@@ -449,7 +449,7 @@ class XmlDumpWriter {
                if( $row->page_is_redirect ) {
                        $out .= '    ' . Xml::element( 'redirect', array() ) . "\n";
                }
-               if( '' != $row->page_restrictions ) {
+               if( $row->page_restrictions != '' ) {
                        $out .= '    ' . Xml::element( 'restrictions', array(),
                                strval( $row->page_restrictions ) ) . "\n";
                }
index 9664e32..f5b33d7 100644 (file)
@@ -337,7 +337,7 @@ function wfDebug( $text, $logonly = false ) {
                array_map( array( $wgOut, 'debug' ), $cache );
                $cache = array();
        }
-       if ( '' != $wgDebugLogFile && !$wgProfileOnly ) {
+       if ( $wgDebugLogFile != '' && !$wgProfileOnly ) {
                # Strip unprintables; they can switch terminal modes when binary data
                # gets dumped, which is pretty annoying.
                $text = preg_replace( '![\x00-\x08\x0b\x0c\x0e-\x1f]!', ' ', $text );
@@ -480,7 +480,7 @@ function wfLogProfilingData() {
        $log = sprintf( "%s\t%04.3f\t%s\n",
          gmdate( 'YmdHis' ), $elapsed,
          urldecode( $wgRequest->getRequestURL() . $forward ) );
-       if ( '' != $wgDebugLogFile && ( $wgRequest->getVal('action') != 'raw' || $wgDebugRawPage ) ) {
+       if ( $wgDebugLogFile != '' && ( $wgRequest->getVal('action') != 'raw' || $wgDebugRawPage ) ) {
                wfErrorLog( $log . $prof, $wgDebugLogFile );
        }
 }
@@ -497,7 +497,7 @@ function wfReadOnly() {
        if ( !is_null( $wgReadOnly ) ) {
                return (bool)$wgReadOnly;
        }
-       if ( '' == $wgReadOnlyFile ) {
+       if ( $wgReadOnlyFile == '' ) {
                return false;
        }
        // Set $wgReadOnly for faster access next time
@@ -1285,8 +1285,8 @@ function wfArrayToCGI( $array1, $array2 = null )
 
        $cgi = '';
        foreach ( $array1 as $key => $value ) {
-               if ( '' !== $value ) {
-                       if ( '' != $cgi ) {
+               if ( $value != '' ) {
+                       if ( $cgi != '' ) {
                                $cgi .= '&';
                        }
                        if ( is_array( $value ) ) {
index 17a6cea..abab9e3 100644 (file)
@@ -350,7 +350,7 @@ class Linker {
         * despite $query not being used.
         */
        function makeSelfLinkObj( $nt, $text = '', $query = '', $trail = '', $prefix = '' ) {
-               if ( '' == $text ) {
+               if ( $text == '' ) {
                        $text = htmlspecialchars( $nt->getPrefixedText() );
                }
                list( $inside, $trail ) = Linker::splitTrail( $trail );
@@ -388,7 +388,7 @@ class Linker {
         * via Parser::maybeMakeExternalImage().
         */
        function makeExternalImage( $url, $alt = '' ) {
-               if ( '' == $alt ) {
+               if ( $alt == '' ) {
                        $alt = $this->fnamePart( $url );
                }
                $img = '';
@@ -541,7 +541,7 @@ class Linker {
 
                        $s = $thumb->toHtml( $params );
                }
-               if ( '' != $fp['align'] ) {
+               if ( $fp['align'] != '' ) {
                        $s = "<div class=\"float{$fp['align']}\">{$s}</div>";
                }
                return str_replace("\n", ' ',$prefix.$s.$postfix);
@@ -748,7 +748,7 @@ class Linker {
        function specialLink( $name, $key = '' ) {
                global $wgContLang;
 
-               if ( '' == $key ) { $key = strtolower( $name ); }
+               if ( $key == '' ) { $key = strtolower( $name ); }
                $pn = $wgContLang->ucfirst( $name );
                return $this->makeKnownLink( $wgContLang->specialPage( $pn ),
                  wfMsg( $key ) );
@@ -1068,7 +1068,7 @@ class Linker {
                }
 
                # Handle link renaming [[foo|text]] will show link as "text"
-               if( "" != $match[3] ) {
+               if( $match[3] != "" ) {
                        $text = $match[3];
                } else {
                        $text = $match[1];
@@ -1153,7 +1153,7 @@ class Linker {
                                }
 
                                $ret = $contextTitle->getPrefixedText(). '/' . trim($noslash) . $suffix;
-                               if( '' === $text ) {
+                               if( $text === '' ) {
                                        $text = $target . $suffix;
                                } # this might be changed for ugliness reasons
                        } else {
@@ -1171,7 +1171,7 @@ class Linker {
                                                # / at the end means don't show full path
                                                if( substr( $nodotdot, -1, 1 ) === '/' ) {
                                                        $nodotdot = substr( $nodotdot, 0, -1 );
-                                                       if( '' === $text ) {
+                                                       if( $text === '' ) {
                                                                $text = $nodotdot . $suffix;
                                                        }
                                                }
@@ -1422,7 +1422,7 @@ class Linker {
                        $regex = $wgContLang->linkTrail();
                }
                $inside = '';
-               if ( '' != $trail ) {
+               if ( $trail != '' ) {
                        $m = array();
                        if ( preg_match( $regex, $trail, $m ) ) {
                                $inside = $m[1];
index 24a9b09..8b1cb54 100644 (file)
@@ -104,7 +104,7 @@ class LogPage {
         */
        public function getRcComment() {
                $rcComment = $this->actionText;
-               if( '' != $this->comment ) {
+               if( $this->comment != '' ) {
                        if ($rcComment == '')
                                $rcComment = $this->comment;
                        else
index cd02d2c..825439f 100644 (file)
@@ -1004,7 +1004,7 @@ class OutputPage {
                        return;
                }
                wfProfileIn( __METHOD__ );
-               if ( '' != $this->mRedirect ) {
+               if ( $this->mRedirect != '' ) {
                        # Standards require redirect URLs to be absolute
                        $this->mRedirect = wfExpandUrl( $this->mRedirect );
                        if( $this->mRedirectCode == '301' || $this->mRedirectCode == '303' ) {
@@ -1569,7 +1569,7 @@ class OutputPage {
                        $returntoquery = $wgRequest->getText( 'returntoquery' );
                }
 
-               if ( '' === $returnto ) {
+               if ( $returnto === '' ) {
                        $returnto = Title::newMainPage();
                }
 
@@ -1607,7 +1607,7 @@ class OutputPage {
                        $ret .= "<?xml version=\"1.0\" encoding=\"$wgOutputEncoding\" ?" . ">\n";
                }
 
-               if ( '' == $this->getHTMLTitle() ) {
+               if ( $this->getHTMLTitle() == '' ) {
                        $this->setHTMLTitle(  wfMsg( 'pagetitle', $this->getPageTitle() ));
                }
 
index 7dde0d8..28df01a 100644 (file)
@@ -191,7 +191,7 @@ class ProtectionForm {
 
                list( $cascadeSources, /* $restrictions */ ) = $this->mTitle->getCascadeProtectionSources();
 
-               if ( "" != $err ) {
+               if ( $err != "" ) {
                        $wgOut->setSubtitle( wfMsgHtml( 'formerror' ) );
                        $wgOut->addHTML( "<p class='error'>{$err}</p>\n" );
                }
index e9b007b..4c5cca2 100644 (file)
@@ -1127,7 +1127,7 @@ CSS;
                global $wgOut;
 
                $sub = $wgOut->getSubtitle();
-               if ( '' == $sub ) {
+               if ( $sub == '' ) {
                        global $wgExtraSubtitle;
                        $sub = wfMsgExt( 'tagline', 'parsemag' ) . $wgExtraSubtitle;
                }
@@ -1530,7 +1530,7 @@ CSS;
        }
 
        function logoText( $align = '' ) {
-               if ( '' != $align ) {
+               if ( $align != '' ) {
                        $a = " align='{$align}'";
                } else {
                        $a = '';
@@ -1839,7 +1839,7 @@ CSS;
                        $url = $nt->escapeFullURL();
                        $text = $wgContLang->getLanguageName( $nt->getInterwiki() );
 
-                       if ( '' == $text ) { $text = $l; }
+                       if ( $text == '' ) { $text = $l; }
                        $style = $this->getExternalLinkAttributes();
                        $s .= "<a href=\"{$url}\"{$style}>{$text}</a>";
                }
index fca6116..8f98870 100644 (file)
@@ -744,10 +744,10 @@ class SkinTemplate extends Skin {
                                                $urlArgs = 'action=edit&section=new';
                                                $preloadMsg = wfMsgForContent( 'talk-addsection-preload' );
                                                $editintroMsg = wfMsgForContent( 'talk-addsection-editintro' );
-                                               if( '' != $preloadMsg  ) {
+                                               if( $preloadMsg != ''  ) {
                                                        $urlArgs .= '&preload=' . urlencode( $preloadMsg );
                                                }
-                                               if( '' != $editintroMsg ) {
+                                               if( $editintroMsg != '' ) {
                                                        $urlArgs .= '&editintro=' . urlencode( $editintroMsg );
                                                }
                                                $content_actions['addsection'] = array(
index 7c4f911..8215bd4 100644 (file)
@@ -542,7 +542,7 @@ class Title {
        public function getNsText() {
                global $wgContLang;
 
-               if ( '' != $this->mInterwiki ) {
+               if ( $this->mInterwiki != '' ) {
                        // This probably shouldn't even happen. ohh man, oh yuck.
                        // But for interwiki transclusion it sometimes does.
                        // Shit. Shit shit shit.
@@ -654,7 +654,7 @@ class Title {
         */
        public function getFullText() {
                $text = $this->getPrefixedText();
-               if( '' != $this->mFragment ) {
+               if( $this->mFragment != '' ) {
                        $text .= '#' . $this->mFragment;
                }
                return $text;
@@ -738,7 +738,7 @@ class Title {
                        $baseUrl = $interwiki->getURL( );
 
                        $namespace = wfUrlencode( $this->getNsText() );
-                       if ( '' != $namespace ) {
+                       if ( $namespace != '' ) {
                                # Can this actually happen? Interwikis shouldn't be parsed.
                                # Yes! It can in interwiki transclusion. But... it probably shouldn't.
                                $namespace .= ':';
@@ -910,7 +910,7 @@ class Title {
         *  interwiki link
         */
        public function getEditURL() {
-               if ( '' != $this->mInterwiki ) { return ''; }
+               if ( $this->mInterwiki != '' ) { return ''; }
                $s = $this->getLocalURL( 'action=edit' );
 
                return $s;
@@ -929,7 +929,7 @@ class Title {
         * Is this Title interwiki?
         * @return \type{\bool}
         */
-       public function isExternal() { return ( '' != $this->mInterwiki ); }
+       public function isExternal() { return ( $this->mInterwiki != '' ); }
 
        /**
         * Is this page "semi-protected" - the *only* protection is autoconfirm?
@@ -1305,7 +1305,7 @@ class Title {
                        if( $right == 'sysop' ) {
                                $right = 'protect';
                        }
-                       if( '' != $right && !$user->isAllowed( $right ) ) {
+                       if( $right != '' && !$user->isAllowed( $right ) ) {
                                // Users with 'editprotected' permission can edit protected pages
                                if( $action=='edit' && $user->isAllowed( 'editprotected' ) ) {
                                        // Users with 'editprotected' permission cannot edit protected pages
@@ -1337,7 +1337,7 @@ class Title {
                        if( $cascadingSources > 0 && isset($restrictions[$action]) ) {
                                foreach( $restrictions[$action] as $right ) {
                                        $right = ( $right == 'sysop' ) ? 'protect' : $right;
-                                       if( '' != $right && !$user->isAllowed( $right ) ) {
+                                       if( $right != '' && !$user->isAllowed( $right ) ) {
                                                $pages = '';
                                                foreach( $cascadingSources as $page )
                                                        $pages .= '* [[:' . $page->getPrefixedText() . "]]\n";
@@ -2196,7 +2196,7 @@ class Title {
         */
        /* private */ function prefix( $name ) {
                $p = '';
-               if ( '' != $this->mInterwiki ) {
+               if ( $this->mInterwiki != '' ) {
                        $p = $this->mInterwiki . ':';
                }
                if ( 0 != $this->mNamespace ) {
@@ -2274,7 +2274,7 @@ class Title {
                $dbkey = preg_replace( '/[ _\xA0\x{1680}\x{180E}\x{2000}-\x{200A}\x{2028}\x{2029}\x{202F}\x{205F}\x{3000}]+/u', '_', $dbkey );
                $dbkey = trim( $dbkey, '_' );
 
-               if ( '' == $dbkey ) {
+               if ( $dbkey == '' ) {
                        return false;
                }
 
@@ -2349,7 +2349,7 @@ class Title {
 
                # We already know that some pages won't be in the database!
                #
-               if ( '' != $this->mInterwiki || NS_SPECIAL == $this->mNamespace ) {
+               if ( $this->mInterwiki != '' || NS_SPECIAL == $this->mNamespace ) {
                        $this->mArticleID = 0;
                }
                $fragment = strstr( $dbkey, '#' );
@@ -2661,9 +2661,9 @@ class Title {
                if ( strlen( $nt->getDBkey() ) < 1 ) {
                        $errors[] = array('articleexists');
                }
-               if ( ( '' == $this->getDBkey() ) ||
+               if ( ( $this->getDBkey() == '' ) ||
                         ( !$oldid ) ||
-                    ( '' == $nt->getDBkey() ) ) {
+                    ( $nt->getDBkey() == '' ) ) {
                        $errors[] = array('badarticleerror');
                }
 
index bbe2cb2..9ecaac6 100644 (file)
@@ -113,7 +113,7 @@ class MediaWiki {
                if( $curid = $wgRequest->getInt( 'curid' ) ) {
                        # URLs like this are generated by RC, because rc_title isn't always accurate
                        $ret = Title::newFromID( $curid );
-               } elseif( '' == $title && 'delete' != $action ) {
+               } elseif( $title == '' && 'delete' != $action ) {
                        $ret = Title::newMainPage();
                } else {
                        $ret = Title::newFromURL( $title );
index b1b0441..059fa7c 100644 (file)
@@ -2223,7 +2223,7 @@ abstract class DatabaseBase {
                                }
                        }
 
-                       if ( '' != $cmd ) { $cmd .= ' '; }
+                       if ( $cmd != '' ) { $cmd .= ' '; }
                        $cmd .= "$line\n";
 
                        if ( $done ) {
index 0c6304e..fe72d6b 100644 (file)
@@ -955,7 +955,7 @@ class DatabaseOracle extends DatabaseBase {
                                }
                        }
 
-                       if ( '' != $cmd ) {
+                       if ( $cmd != '' ) {
                                $cmd .= ' ';
                        }
                        $cmd .= "$line\n";
index 8837783..97a6ec6 100644 (file)
@@ -537,7 +537,7 @@ class Parser
                $taglist = implode( '|', $elements );
                $start = "/<($taglist)(\\s+[^>]*?|\\s*?)(\/?" . ">)|<(!--)/i";
 
-               while ( '' != $text ) {
+               while ( $text != '' ) {
                        $p = preg_split( $start, $text, 2, PREG_SPLIT_DELIM_CAPTURE );
                        $stripped .= $p[0];
                        if( count( $p ) < 5 ) {
@@ -1683,7 +1683,7 @@ class Parser
                                wfProfileOut( __METHOD__."-might_be_img" );
                        }
 
-                       $wasblank = ( '' == $text );
+                       $wasblank = ( $text  == '' );
                        if ( $wasblank ) $text = $link;
 
                        # Link not escaped by : , create the various objects
@@ -1871,7 +1871,7 @@ class Parser
         */
        /* private */ function closeParagraph() {
                $result = '';
-               if ( '' != $this->mLastSection ) {
+               if ( $this->mLastSection != '' ) {
                        $result = '</' . $this->mLastSection  . ">\n";
                }
                $this->mInPre = false;
@@ -2081,7 +2081,7 @@ class Parser
                                                $t = substr( $t, 1 );
                                        } else {
                                                // paragraph
-                                               if ( '' == trim($t) ) {
+                                               if ( trim($t) == '' ) {
                                                        if ( $paragraphStack ) {
                                                                $output .= $paragraphStack.'<br />';
                                                                $paragraphStack = false;
@@ -2121,7 +2121,7 @@ class Parser
                        $output .= $this->closeList( $prefix2[$prefixLength-1] );
                        --$prefixLength;
                }
-               if ( '' != $this->mLastSection ) {
+               if ( $this->mLastSection != '' ) {
                        $output .= '</' . $this->mLastSection . '>';
                        $this->mLastSection = '';
                }
@@ -3989,7 +3989,7 @@ class Parser
                $m = array();
                if ( preg_match( "/^($nc+:|)$tc+?( \\($tc+\\))$/", $t, $m ) ) {
                        $text = preg_replace( $p2, "[[$m[1]\\1$m[2]|\\1]]", $text );
-               } elseif ( preg_match( "/^($nc+:|)$tc+?(, $tc+|)$/", $t, $m ) && '' != "$m[1]$m[2]" ) {
+               } elseif ( preg_match( "/^($nc+:|)$tc+?(, $tc+|)$/", $t, $m ) && "$m[1]$m[2]" != '' ) {
                        $text = preg_replace( $p2, "[[$m[1]\\1$m[2]|\\1]]", $text );
                } else {
                        # if there's no context, don't bother duplicating the title
index def16c0..73e2485 100644 (file)
@@ -262,7 +262,7 @@ class EmailUserForm {
                
        }
        static function validateEmailTarget ( $target ) {
-               if ( "" == $target ) {
+               if ( $target == "" ) {
                        wfDebug( "Target is empty.\n" );
                        return "notarget";
                }
index e7a6ebb..dfdcf1a 100644 (file)
@@ -95,7 +95,7 @@ class IPUnblockForm {
                $titleObj = SpecialPage::getTitleFor( "Ipblocklist" );
                $action = $titleObj->getLocalURL( "action=submit" );
 
-               if ( "" != $err ) {
+               if ( $err != "" ) {
                        $wgOut->setSubtitle( wfMsg( "formerror" ) );
                        $wgOut->addWikiText( Xml::tags( 'span', array( 'class' => 'error' ), $err ) . "\n" );
                }
@@ -236,7 +236,7 @@ class IPUnblockForm {
                global $wgOut, $wgUser;
 
                $wgOut->setPagetitle( wfMsg( "ipblocklist" ) );
-               if ( "" != $msg ) {
+               if ( $msg != "" ) {
                        $wgOut->setSubtitle( $msg );
                }
 
index a1d0dc8..8c701dd 100644 (file)
@@ -53,7 +53,7 @@ class DBLockForm {
                $wgOut->setPagetitle( wfMsg( 'lockdb' ) );
                $wgOut->addWikiMsg( 'lockdbtext' );
 
-               if ( "" != $err ) {
+               if ( $err != "" ) {
                        $wgOut->setSubtitle( wfMsg( 'formerror' ) );
                        $wgOut->addHTML( '<p class="error">' . htmlspecialchars( $err ) . "</p>\n" );
                }
index 7c116af..8229770 100644 (file)
@@ -16,7 +16,7 @@ class ProtectedPagesForm {
        public function showList( $msg = '' ) {
                global $wgOut, $wgRequest;
 
-               if( "" != $msg ) {
+               if( $msg != "" ) {
                        $wgOut->setSubtitle( $msg );
                }
 
index 2274f93..d65b3f7 100644 (file)
@@ -16,7 +16,7 @@ class ProtectedTitlesForm {
        function showList( $msg = '' ) {
                global $wgOut, $wgRequest;
 
-               if ( "" != $msg ) {
+               if ( $msg != "" ) {
                        $wgOut->setSubtitle( $msg );
                }
 
index 630a9ff..fe1e3cb 100644 (file)
@@ -219,7 +219,7 @@ class SpecialSearch {
                }
 
                $filePrefix = $wgContLang->getFormattedNsText(NS_FILE).':';
-               if( '' === trim( $term ) || $filePrefix === trim( $term ) ) {
+               if( trim( $term ) === '' || $filePrefix === trim( $term ) ) {
                        $wgOut->addHTML( $this->searchFocus() );
                        $wgOut->addHTML( $this->formHeader($term, 0, 0));
                        if( $this->searchAdvanced ) {
index 73e0e68..fe38a48 100644 (file)
@@ -45,7 +45,7 @@ class DBUnlockForm {
                $wgOut->setPagetitle( wfMsg( "unlockdb" ) );
                $wgOut->addWikiMsg( "unlockdbtext" );
 
-               if ( "" != $err ) {
+               if ( $err != "" ) {
                        $wgOut->setSubtitle( wfMsg( "formerror" ) );
                        $wgOut->addHTML( '<p class="error">' . htmlspecialchars( $err ) . "</p>\n" );
                }
index 4337f98..a13a3a6 100644 (file)
@@ -122,7 +122,7 @@ class LoginForm {
        function addNewAccountMailPassword() {
                global $wgOut;
 
-               if ('' == $this->mEmail) {
+               if ( $this->mEmail == '' ) {
                        $this->mainLoginForm( wfMsg( 'noemail', htmlspecialchars( $this->mName ) ) );
                        return;
                }
@@ -234,7 +234,7 @@ class LoginForm {
                // cation server before they create an account (otherwise, they can
                // create a local account and login as any domain user). We only need
                // to check this for domains that aren't local.
-               if( 'local' != $this->mDomain && '' != $this->mDomain ) {
+               if( 'local' != $this->mDomain && $this->mDomain != '' ) {
                        if( !$wgAuth->canCreateAccounts() && ( !$wgAuth->userExists( $this->mName ) || !$wgAuth->authenticate( $this->mName, $this->mPassword ) ) ) {
                                $this->mainLoginForm( wfMsg( 'wrongpassword' ) );
                                return false;
@@ -394,7 +394,7 @@ class LoginForm {
         */
        public function authenticateUserData() {
                global $wgUser, $wgAuth;
-               if ( '' == $this->mName ) {
+               if ( $this->mName == '' ) {
                        return self::NO_NAME;
                }
                
@@ -492,7 +492,7 @@ class LoginForm {
                                // faces etc will probably just fail cleanly here.
                                $retval = self::RESET_PASS;
                        } else {
-                               $retval = '' == $this->mPassword ? self::EMPTY_PASS : self::WRONG_PASS;
+                               $retval = ($this->mPassword  == '') ? self::EMPTY_PASS : self::WRONG_PASS;
                        }
                } else {
                        $wgAuth->updateUser( $u );
@@ -670,7 +670,7 @@ class LoginForm {
                        return;
                }
 
-               if ( '' == $this->mName ) {
+               if ( $this->mName == '' ) {
                        $this->mainLoginForm( wfMsg( 'noname' ) );
                        return;
                }
@@ -714,7 +714,7 @@ class LoginForm {
        function mailPasswordInternal( $u, $throttle = true, $emailTitle = 'passwordremindertitle', $emailText = 'passwordremindertext' ) {
                global $wgServer, $wgScript, $wgUser, $wgNewPasswordExpiry;
 
-               if ( '' == $u->getEmail() ) {
+               if ( $u->getEmail() == '' ) {
                        return new WikiError( wfMsg( 'noemail', $u->getName() ) );
                }
                $ip = wfGetIP();
@@ -868,7 +868,7 @@ class LoginForm {
                        }
                }
 
-               if ( '' == $this->mName ) {
+               if ( $this->mName == '' ) {
                        if ( $wgUser->isLoggedIn() ) {
                                $this->mName = $wgUser->getName();
                        } else {
index 8082e88..e67cbc7 100644 (file)
@@ -228,13 +228,13 @@ class SkinCologneBlue extends Skin {
                        }
                        if ( $wgUser->isAllowed( 'delete' ) ) {
                                $dtp = $this->deleteThisPage();
-                               if ( '' != $dtp ) {
+                               if ( $dtp != '' ) {
                                        $s .= $sep . $dtp;
                                }
                        }
                        if ( $wgUser->isAllowed( 'protect' ) ) {
                                $ptp = $this->protectThisPage();
-                               if ( '' != $ptp ) {
+                               if ( $ptp != '' ) {
                                        $s .= $sep . $ptp;
                                }
                        }
@@ -341,7 +341,7 @@ class SkinCologneBlue extends Skin {
                $search = $wgRequest->getText( 'search' );
                $action = $this->escapeSearchLink();
                $s = "<form id=\"searchform{$this->searchboxes}\" method=\"get\" class=\"inline\" action=\"$action\">";
-               if( '' != $label ) {
+               if( $label != '' ) {
                        $s .= "{$label}: ";
                }