From: Alexandre Emsenhuber Date: Mon, 19 Dec 2011 16:10:06 +0000 (+0000) Subject: Pass the User object to Title::userCan() X-Git-Tag: 1.31.0-rc.0~25898 X-Git-Url: http://git.cyclocoop.org/%24dirpuce/puce%24spip_lang_rtl.gif?a=commitdiff_plain;h=bd8d61b21308ebeaf865f235844c7ba28f87642e;p=lhc%2Fweb%2Fwiklou.git Pass the User object to Title::userCan() --- diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 87712fdbff..163f2b1750 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -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 {