Index: trunk/extensions/OnlineStatusBar/OnlineStatusBar.body.php |
— | — | @@ -133,23 +133,23 @@ |
134 | 134 | * |
135 | 135 | */ |
136 | 136 | public static function purge( $user_type ) { |
137 | | - if ( is_a( $user_type, User ) ) { |
138 | | - $old_user = $user; |
| 137 | + if ( $user_type instanceof User ) { |
| 138 | + $old_user = $user_type; |
139 | 139 | } else if ( is_string( $user_type ) ){ |
140 | | - $old_user = User::newFromName( $userName ); |
| 140 | + $old_user = User::newFromName( $user_type ); |
141 | 141 | } else { |
142 | 142 | return false; |
143 | 143 | } |
144 | 144 | |
145 | 145 | // check if something weird didn't happen |
146 | 146 | if ( $old_user === false || $old_user == null ) { |
147 | | - return true; |
| 147 | + return false; |
148 | 148 | } |
149 | 149 | if ( $old_user->getOption('OnlineStatusBar_active') ) { |
150 | 150 | if ( $old_user->getOption('OnlineStatusBar_autoupdate') == true ) { |
151 | | - $update = SquidUpdate::newSimplePurge( $user->getTalkPage() ); |
| 151 | + $update = SquidUpdate::newSimplePurge( $old_user->getTalkPage() ); |
152 | 152 | $update->doUpdate(); |
153 | | - $update = SquidUpdate::newSimplePurge( $user->getUserPage() ); |
| 153 | + $update = SquidUpdate::newSimplePurge( $old_user->getUserPage() ); |
154 | 154 | $update->doUpdate(); |
155 | 155 | } |
156 | 156 | } |