Pass the User object to Title::userCan()
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Mon, 19 Dec 2011 16:10:06 +0000 (16:10 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Mon, 19 Dec 2011 16:10:06 +0000 (16:10 +0000)
includes/OutputPage.php

index 87712fd..163f2b1 100644 (file)
@@ -2119,7 +2119,7 @@ class OutputPage extends ContextSource {
 
                        # Don't return to a page the user can't read otherwise
                        # we'll end up in a pointless loop
-                       if ( $displayReturnto && $displayReturnto->userCan( 'read' ) ) {
+                       if ( $displayReturnto && $displayReturnto->userCan( 'read', $this->getUser() ) ) {
                                $this->returnToMain( null, $displayReturnto );
                        }
                } else {