On 1/14/08, midom@svn.wikimedia.org midom@svn.wikimedia.org wrote:
- Shortcutted Title::userCanRead() for public wikis
. . . public function userCanRead() {
global $wgUser;
global $wgUser, $wgGroupPermissions;
# Shortcut for public wikis, allows skipping quite a bit of code path
if ($wgGroupPermissions['*']['read'])
return true;
$result = null; wfRunHooks( 'userCan', array( &$this, &$wgUser, 'read', &$result ) ); if ( $result !== null ) {
Shouldn't the check go *after* the hook execution?
Shouldn't the check go *after* the hook execution?
whole point would be missing ;-) if anyone wants to override userCanRead() for public wikis, they should set it to false!
Domas Mituzas schreef:
Shouldn't the check go *after* the hook execution?
whole point would be missing ;-) if anyone wants to override userCanRead() for public wikis, they should set it to false!
Hooks may want to override userCanRead() there. You don't know how crazy extensions are or will be in the future.
Roan Kattouw (Catrope)
wikitech-l@lists.wikimedia.org