Index: trunk/phase3/includes/GlobalFunctions.php |
— | — | @@ -499,7 +499,8 @@ |
500 | 500 | $forward = "\t(proxied via {$_SERVER['REMOTE_ADDR']}{$forward})"; |
501 | 501 | } |
502 | 502 | // Don't unstub $wgUser at this late stage just for statistics purposes |
503 | | - if( StubObject::isRealObject( $wgUser ) && $wgUser->isAnon() ) { |
| 503 | + // FIXME: We can detect some anons even if it is not loaded. See User::getId() |
| 504 | + if( $wgUser->mDataLoaded && $wgUser->isAnon() ) { |
504 | 505 | $forward .= ' anon'; |
505 | 506 | } |
506 | 507 | $log = sprintf( "%s\t%04.3f\t%s\n", |
Index: trunk/phase3/includes/Title.php |
— | — | @@ -1185,14 +1185,6 @@ |
1186 | 1186 | * @return \type{\array} Array of arrays of the arguments to wfMsg to explain permissions problems. |
1187 | 1187 | */ |
1188 | 1188 | public function getUserPermissionsErrors( $action, $user, $doExpensiveQueries = true, $ignoreErrors = array() ) { |
1189 | | - if ( !StubObject::isRealObject( $user ) ) { |
1190 | | - // Since StubObject is always used on globals, we can |
1191 | | - // unstub $wgUser here and set $user = $wgUser |
1192 | | - global $wgUser; |
1193 | | - $wgUser->_unstub( '', 5 ); |
1194 | | - $user = $wgUser; |
1195 | | - } |
1196 | | - |
1197 | 1189 | $errors = $this->getUserPermissionsErrorsInternal( $action, $user, $doExpensiveQueries ); |
1198 | 1190 | |
1199 | 1191 | // Remove the errors being ignored. |