From: Robert Leverington Date: Sat, 22 Mar 2008 09:14:20 +0000 (+0000) Subject: Partially reverting r29721, this causes a massive flaw in the userCan hook -- breakin... X-Git-Tag: 1.31.0-rc.0~48881 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=a61054f1504de822037a29d986ade62519428934;p=lhc%2Fweb%2Fwiklou.git Partially reverting r29721, this causes a massive flaw in the userCan hook -- breaking a variety of extensions that rely on it -- due to the circumvention of logic. Reccomend backport to 1.12 branch. --- diff --git a/includes/Title.php b/includes/Title.php index c07d971f76..827ae1e176 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -1113,6 +1113,7 @@ class Title { // Use getUserPermissionsErrors instead if ( !wfRunHooks( 'userCan', array( &$this, &$user, $action, &$result ) ) ) { + var_dump( $result ); return $result ? array() : array( array( 'badaccess-group0' ) ); } @@ -1389,10 +1390,6 @@ class Title { public function userCanRead() { 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 ) {