Index: trunk/phase3/includes/api/ApiDelete.php |
— | — | @@ -79,6 +79,11 @@ |
80 | 80 | $this->dieUsageMsg(current($retval)); |
81 | 81 | } else { |
82 | 82 | $articleObj = new Article($titleObj); |
| 83 | + $bigHistory = $articleObj->isBigDeletion(); |
| 84 | + if( $bigHistory && !$wgUser->isAllowed( 'bigdelete' ) ) { |
| 85 | + global $wgDeleteRevisionsLimit; |
| 86 | + $this->dieUsageMsg(array('delete-toobig', $wgDeleteRevisionsLimit)); |
| 87 | + } |
83 | 88 | $retval = self::delete($articleObj, $params['token'], $reason); |
84 | 89 | |
85 | 90 | if(count($retval)) |
Index: trunk/phase3/includes/api/ApiBase.php |
— | — | @@ -698,6 +698,7 @@ |
699 | 699 | 'noemail' => array('code' => 'noemail', 'info' => "The user has not specified a valid e-mail address, or has chosen not to receive e-mail from other users"), |
700 | 700 | 'rcpatroldisabled' => array('code' => 'patroldisabled', 'info' => "Patrolling is disabled on this wiki"), |
701 | 701 | 'markedaspatrollederror-noautopatrol' => array('code' => 'noautopatrol', 'info' => "You don't have permission to patrol your own changes"), |
| 702 | + 'delete-toobig' => array('code' => 'bigdelete', 'info' => "You can't delete this page because it has more than \$1 revisions"), |
702 | 703 | |
703 | 704 | // API-specific messages |
704 | 705 | 'missingparam' => array('code' => 'no$1', 'info' => "The \$1 parameter must be set"), |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -66,6 +66,7 @@ |
67 | 67 | * (bug 17048) Show the 'new' flag in list=usercontribs for the revision that created the |
68 | 68 | page, even if it's not the top revision |
69 | 69 | * (bug 17069) Added ucshow=patrolled|!patrolled to list=usercontribs |
| 70 | +* action=delete respects $wgDeleteRevisionsLimit and the bigdelete user right |
70 | 71 | |
71 | 72 | === Languages updated in 1.15 === |
72 | 73 | |