Index: trunk/extensions/OnlineStatusBar/OnlineStatusBar.status.php |
— | — | @@ -64,7 +64,6 @@ |
65 | 65 | */ |
66 | 66 | public static function getStatus( $user, $delayed_check = false ) { |
67 | 67 | global $wgOnlineStatusBarDefaultOffline, $wgOnlineStatusBarDefaultOnline; |
68 | | - |
69 | 68 | // instead of delete every time just select the records which are not that old |
70 | 69 | if ( !$delayed_check ) { |
71 | 70 | $t_time = OnlineStatusBar::getTimeoutDate(); |
— | — | @@ -185,7 +184,6 @@ |
186 | 185 | ); |
187 | 186 | self::deleteOld(); |
188 | 187 | } |
189 | | - |
190 | 188 | return true; |
191 | 189 | } |
192 | 190 | |
Index: trunk/extensions/OnlineStatusBar/OnlineStatusBar.body.php |
— | — | @@ -56,11 +56,6 @@ |
57 | 57 | return false; |
58 | 58 | } |
59 | 59 | |
60 | | - // checks ns |
61 | | - if ( $title->getNamespace() != NS_USER && $title->getNamespace() != NS_USER_TALK ) { |
62 | | - return false; |
63 | | - } |
64 | | - |
65 | 60 | // we need to create temporary user object |
66 | 61 | $user = User::newFromId( 0 ); |
67 | 62 | $user->setName( $title->getBaseText() ); |
— | — | @@ -70,6 +65,10 @@ |
71 | 66 | return false; |
72 | 67 | } |
73 | 68 | |
| 69 | + if ( self::isValid( $user ) != true ) { |
| 70 | + return false; |
| 71 | + } |
| 72 | + |
74 | 73 | $status = OnlineStatusBar_StatusCheck::getStatus( $user ); |
75 | 74 | |
76 | 75 | return array( $status, $user ); |
— | — | @@ -83,10 +82,6 @@ |
84 | 83 | * @return array|bool Array containing the status and User object |
85 | 84 | */ |
86 | 85 | public static function getUserInfoFromTitle( Title $title ) { |
87 | | - if ( $title->getNamespace() != NS_USER && $title->getNamespace() != NS_USER_TALK ) { |
88 | | - return false; |
89 | | - } |
90 | | - |
91 | 86 | // We create an user object using name of user parsed from title |
92 | 87 | $user = User::newFromName( $title->getBaseText() ); |
93 | 88 | // Invalid user |
Index: trunk/extensions/OnlineStatusBar/OnlineStatusBarHooks.php |
— | — | @@ -60,7 +60,7 @@ |
61 | 61 | public static function renderBar( &$article, &$outputDone, &$pcache ) { |
62 | 62 | $context = $article->getContext(); |
63 | 63 | |
64 | | - // Update status of each user who wants to be tracked |
| 64 | + // Update status of all users who wants to be tracked |
65 | 65 | OnlineStatusBar_StatusCheck::updateStatus(); |
66 | 66 | |
67 | 67 | // Performace fix |
— | — | @@ -73,7 +73,7 @@ |
74 | 74 | $result = OnlineStatusBar::getUserInfoFromTitle( $title ); |
75 | 75 | // In case that status can't be parsed we check if it isn't anon |
76 | 76 | if ( $result === false && User::isIP ( $title->getBaseText() ) ) { |
77 | | - $result = OnlineStatusBar::getAnonFromTitle( $title ); |
| 77 | + $result = OnlineStatusBar::getAnonFromTitle( $title ); |
78 | 78 | } |
79 | 79 | |
80 | 80 | // In case we were unable to get a status let's quit |