r100996 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r100995‎ | r100996 | r100997 >
Date:16:14, 27 October 2011
Author:petrb
Status:deferred
Tags:
Comment:
fixed === and == :)
Modified paths:
  • /trunk/extensions/OnlineStatusBar/OnlineStatusBar.body.php (modified) (history)
  • /trunk/extensions/OnlineStatusBar/OnlineStatusBar.php (modified) (history)

Diff [purge]

Index: trunk/extensions/OnlineStatusBar/OnlineStatusBar.body.php
@@ -127,7 +127,7 @@
128128 }
129129 $user = User::newFromName( $id );
130130 // check if exist
131 - if ( $user === null ) {
 131+ if ( $user == null ) {
132132 return false;
133133 }
134134 // do we track them
@@ -146,7 +146,7 @@
147147 $dbw = wfGetDB( DB_MASTER );
148148 OnlineStatusBar::DeleteOld();
149149 $user = User::newFromName( $userID );
150 - if ( $user === null ) {
 150+ if ( $user == null ) {
151151 // something is wrong
152152 return $wgOnlineStatusBarDefaultOffline;
153153 }
Index: trunk/extensions/OnlineStatusBar/OnlineStatusBar.php
@@ -71,7 +71,7 @@
7272
7373 $wgHooks['LoadExtensionSchemaUpdates'][] = 'wfOnlineStatusBar_CkSchema';
7474 function wfOnlineStatusBar_CkSchema( $updater = null ) {
75 - if ( ( $updater === null ) != true ){
 75+ if ( $updater !== null ){
7676 $updater->addExtensionUpdate( array( 'addtable', 'online_status', dirname( __FILE__ ) . '/OnlineStatusBar.sql', true ) );
7777 } else {
7878 global $wgExtNewTables;
@@ -94,7 +94,7 @@
9595 $ns = $article->getTitle()->getNamespace();
9696 if ( ( $ns == NS_USER_TALK ) || ( $ns == NS_USER ) ) {
9797 $user = OnlineStatusBar::GetOwnerFromTitle ( $article->getTitle() );
98 - if ( $user === null ) {
 98+ if ( $user == null ) {
9999 return true;
100100 }
101101 $username = $user->getName();

Follow-up revisions

RevisionCommit summaryAuthorDate
r100997Moved hooks into their own class...johnduhart16:20, 27 October 2011

Status & tagging log