r101048 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r101047‎ | r101048 | r101049 >
Date:20:53, 27 October 2011
Author:petrb
Status:deferred (Comments)
Tags:
Comment:
fixed unregistered users
Modified paths:
  • /trunk/extensions/OnlineStatusBar/OnlineStatusBar.body.php (modified) (history)
  • /trunk/extensions/OnlineStatusBar/OnlineStatusBarHooks.php (modified) (history)

Diff [purge]

Index: trunk/extensions/OnlineStatusBar/OnlineStatusBar.body.php
@@ -116,6 +116,10 @@
117117 if ( $user == null ) {
118118 return false;
119119 }
 120+ if ( $user->getId() == 0 )
 121+ {
 122+ return false;
 123+ }
120124 // do we track them
121125 return $user->getOption( "OnlineStatusBar_active", $wgOnlineStatusBarDefaultEnabled );
122126 }
Index: trunk/extensions/OnlineStatusBar/OnlineStatusBarHooks.php
@@ -47,8 +47,9 @@
4848 * @return bool
4949 */
5050 public static function renderBar( &$article, &$outputDone, &$pcache ) {
51 - global $wgOnlineStatusBar_Template, $messages, $wgOnlineStatusBarDefaultIpUsers, $wgOnlineStatusBarModes, $wgOut;
 51+ global $messages, $wgOnlineStatusBarDefaultIpUsers, $wgOnlineStatusBarModes, $wgOut;
5252 OnlineStatusBar::UpdateStatus();
 53+ // anonymous user
5354 $anon = false;
5455 $ns = $article->getTitle()->getNamespace();
5556 if ( ( $ns == NS_USER_TALK ) || ( $ns == NS_USER ) ) {
@@ -69,7 +70,7 @@
7071 }
7172 if ( $anon == false )
7273 {
73 - //we don't want to check this
 74+ // check if it's not anon, let's check the config
7475 if ( $user->getOption ( "OnlineStatusBar_hide" ) == true ) {
7576 return true;
7677 }

Comments

#Comment by Petrb (talk | contribs)   09:15, 28 October 2011

johnduhart is now doing review, anyway if someone had some comments or found something to fix, please let me know.

Status & tagging log