User "Brion VIBBER" changed the status of MediaWiki.r85951. Old Status: new New Status: fixme
User "Brion VIBBER" also posted a comment on MediaWiki.r85951. Full URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/85951#c18497 Commit summary: Implement user-is-blocked and wiki-is-read-only as exceptions. Comment: Accessing user->$mBlock from the outside is a code smell; while it's pretty likely that it's already been filled out before we get to OutputPage::blockedPage(), it's meant to be lazy-initialized and should really be marked either private or protected. Either User needs to be extended with an accessor that returns the actual Block object and that should be used, or the multiple pieces of code calling <code>'$block = $user->mBlock; throw new UserBlockedError( $block )'</code> should be changed to pass in the user (and the exception changed to take the user), or the exception should always operate on the global $wgUser -- because who else could it be outputting to? _______________________________________________ MediaWiki-CodeReview mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview
