r100957 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r100956‎ | r100957 | r100958 >
Date:08:14, 27 October 2011
Author:petrb
Status:deferred
Tags:
Comment:
simplier way to check
Modified paths:
  • /trunk/extensions/OnlineStatusBar/OnlineStatusBar.body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/OnlineStatusBar/OnlineStatusBar.body.php
@@ -35,22 +35,15 @@
3636 }
3737
3838 public static function ParserGetVariable ( &$parser, &$varCache, &$index, &$ret ){
39 - global $wgOnlineStatusBarDefaultOffline;
4039 if( $index == 'isonline' ){
4140 $name = self::GetOwnerFromTitle ( $parser->getTitle() )->getName();
4241
4342 if ( self::IsValid($name) != true ) {
44 - $ret = "false";
 43+ $ret = "unknown";
4544 return true;
4645 }
47 -
48 - if( self::GetStatus ( $name ) == $wgOnlineStatusBarDefaultOffline ) {
49 - $ret = "false";
50 - return true;
51 - } else {
52 - $ret = "true";
 46+ $ret = self::GetStatus( $name );
5347 }
54 - }
5548 return true;
5649 }
5750

Status & tagging log