r106561 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r106560‎ | r106561 | r106562 >
Date:14:07, 18 December 2011
Author:ialex
Status:ok
Tags:
Comment:
Pass the User object to Revision::userCan()
Modified paths:
  • /trunk/phase3/includes/api/ApiParse.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiParse.php
@@ -83,7 +83,7 @@
8484 if ( !$rev ) {
8585 $this->dieUsage( "There is no revision ID $oldid", 'missingrev' );
8686 }
87 - if ( !$rev->userCan( Revision::DELETED_TEXT ) ) {
 87+ if ( !$rev->userCan( Revision::DELETED_TEXT, $this->getUser() ) ) {
8888 $this->dieUsage( "You don't have permission to view deleted revisions", 'permissiondenied' );
8989 }
9090

Status & tagging log