Hooks:UserCan: allow advisory external checks instead of overriding ones
[lhc/web/wiklou.git] / includes / Title.php
index 9001c35..0408f51 100644 (file)
@@ -969,7 +969,9 @@ class Title {
                $result = true;
                if ( !wfRunHooks( 'userCan', array( &$this, &$wgUser, $action, &$result ) ) ) {
                        wfProfileOut( $fname );
-                       return $result;
+                       // Allow advisory rights checking
+                       if ( $result !== null )
+                               return $result;
                }
 
                if( NS_SPECIAL == $this->mNamespace ) {