From a61054f1504de822037a29d986ade62519428934 Mon Sep 17 00:00:00 2001 From: Robert Leverington Date: Sat, 22 Mar 2008 09:14:20 +0000 Subject: [PATCH] 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. --- includes/Title.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) 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 ) { -- 2.20.1