From: daniel Date: Wed, 24 Oct 2012 14:31:42 +0000 (+0200) Subject: (Bug 41298) partial fix: re-apply Id4d5504a X-Git-Tag: 1.31.0-rc.0~21872^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/comptes/ajouter.php?a=commitdiff_plain;h=b683113a63532f61173199db578aac66945d590c;p=lhc%2Fweb%2Fwiklou.git (Bug 41298) partial fix: re-apply Id4d5504a The changes in EditPage were apparently lost during merge. Change-Id: I2628d73a35eaab45336986959a585c7381b78471 --- diff --git a/includes/EditPage.php b/includes/EditPage.php index d7b658fbd6..2a268d457e 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -1057,7 +1057,7 @@ class EditPage { $title = Title::newFromText( $preload ); # Check for existence to avoid getting MediaWiki:Noarticletext - if ( $title === null || !$title->exists() || !$title->userCan( 'read' ) ) { + if ( $title === null || !$title->exists() || !$title->userCan( 'read', $wgUser ) ) { return $handler->makeEmptyContent(); } @@ -1065,7 +1065,7 @@ class EditPage { if ( $page->isRedirect() ) { $title = $page->getRedirectTarget(); # Same as before - if ( $title === null || !$title->exists() || !$title->userCan( 'read' ) ) { + if ( $title === null || !$title->exists() || !$title->userCan( 'read', $wgUser ) ) { return $handler->makeEmptyContent(); } $page = WikiPage::factory( $title ); @@ -1347,7 +1347,7 @@ class EditPage { if ( $new ) { // Late check for create permission, just in case *PARANOIA* - if ( !$this->mTitle->userCan( 'create' ) ) { + if ( !$this->mTitle->userCan( 'create', $wgUser ) ) { $status->fatal( 'nocreatetext' ); $status->value = self::AS_NO_CREATE_PERMISSION; wfDebug( __METHOD__ . ": no create permission\n" ); @@ -2235,7 +2235,7 @@ class EditPage { if ( $revision ) { // Let sysop know that this will make private content public if saved - if ( !$revision->userCan( Revision::DELETED_TEXT ) ) { + if ( !$revision->userCan( Revision::DELETED_TEXT, $wgUser ) ) { $wgOut->wrapWikiMsg( "\n", 'rev-deleted-text-permission' ); } elseif ( $revision->isDeleted( Revision::DELETED_TEXT ) ) { $wgOut->wrapWikiMsg( "\n", 'rev-deleted-text-view' );