Index: trunk/extensions/OnlineStatusBar/OnlineStatusBar.php |
— | — | @@ -90,7 +90,8 @@ |
91 | 91 | $ns = $article->getTitle()->getNamespace(); |
92 | 92 | if ( ( $ns == NS_USER_TALK ) || ( $ns == NS_USER ) ) { |
93 | 93 | // better way to get a username would be great :) |
94 | | - $user = preg_replace( '/\/.*/', '', preg_replace( '/^.*\:/', "", $article->getTitle() ) ); |
| 94 | + $user = $article->getTitle(); |
| 95 | + $user = preg_replace( '/\/.*/', '', substr($user, strpos($user, ":") + 1)); |
95 | 96 | if ( OnlineStatusBar::IsValid( $user ) ) { |
96 | 97 | $mode = OnlineStatusBar::GetStatus( $user ); |
97 | 98 | $modetext = $wgOnlineStatusBarModes[$mode]; |