From b6e0df246f8dda61643d9aba36d9f9e802c909ec Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Wed, 6 Jan 2010 19:59:42 +0000 Subject: [PATCH] Attempt at normalistion of comparison styles - empty string on left and right hand side normalised to it being on the rhs 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 --- includes/ChangesList.php | 2 +- includes/EditPage.php | 2 +- includes/Export.php | 2 +- includes/GlobalFunctions.php | 10 ++++---- includes/Linker.php | 16 ++++++------- includes/LogPage.php | 2 +- includes/OutputPage.php | 6 ++--- includes/ProtectionForm.php | 2 +- includes/Skin.php | 6 ++--- includes/SkinTemplate.php | 4 ++-- includes/Title.php | 24 ++++++++++---------- includes/Wiki.php | 2 +- includes/db/Database.php | 2 +- includes/db/DatabaseOracle.php | 2 +- includes/parser/Parser.php | 12 +++++----- includes/specials/SpecialEmailuser.php | 2 +- includes/specials/SpecialIpblocklist.php | 4 ++-- includes/specials/SpecialLockdb.php | 2 +- includes/specials/SpecialProtectedpages.php | 2 +- includes/specials/SpecialProtectedtitles.php | 2 +- includes/specials/SpecialSearch.php | 2 +- includes/specials/SpecialUnlockdb.php | 2 +- includes/specials/SpecialUserlogin.php | 14 ++++++------ skins/CologneBlue.php | 6 ++--- 24 files changed, 65 insertions(+), 65 deletions(-) diff --git a/includes/ChangesList.php b/includes/ChangesList.php index bc776fd7af..ee5611d4a9 100644 --- a/includes/ChangesList.php +++ b/includes/ChangesList.php @@ -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 .= "\n"; } $s .= Xml::element( 'h4', null, $date ) . "\n