From: Alexandre Emsenhuber Date: Sun, 18 Dec 2011 14:07:01 +0000 (+0000) Subject: Pass the User object to Revision::userCan() X-Git-Tag: 1.31.0-rc.0~25911 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=0eff3f59ad290b1f29f019c1cf97dc498890368c;p=lhc%2Fweb%2Fwiklou.git Pass the User object to Revision::userCan() --- diff --git a/includes/api/ApiParse.php b/includes/api/ApiParse.php index 03910516d4..5763f39833 100644 --- a/includes/api/ApiParse.php +++ b/includes/api/ApiParse.php @@ -83,7 +83,7 @@ class ApiParse extends ApiBase { if ( !$rev ) { $this->dieUsage( "There is no revision ID $oldid", 'missingrev' ); } - if ( !$rev->userCan( Revision::DELETED_TEXT ) ) { + if ( !$rev->userCan( Revision::DELETED_TEXT, $this->getUser() ) ) { $this->dieUsage( "You don't have permission to view deleted revisions", 'permissiondenied' ); }