summaryrefslogtreecommitdiff
path: root/includes/api/ApiUndelete.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/api/ApiUndelete.php')
-rw-r--r--includes/api/ApiUndelete.php13
1 files changed, 8 insertions, 5 deletions
diff --git a/includes/api/ApiUndelete.php b/includes/api/ApiUndelete.php
index 7ae9a3c0..ddc9f7f8 100644
--- a/includes/api/ApiUndelete.php
+++ b/includes/api/ApiUndelete.php
@@ -38,7 +38,6 @@ class ApiUndelete extends ApiBase {
public function execute() {
global $wgUser;
- $this->getMain()->requestWriteMode();
$params = $this->extractRequestParams();
$titleObj = NULL;
@@ -78,14 +77,18 @@ class ApiUndelete extends ApiBase {
array($titleObj, array(), $wgUser, $params['reason']) );
$info['title'] = $titleObj->getPrefixedText();
- $info['revisions'] = $retval[0];
- $info['fileversions'] = $retval[1];
- $info['reason'] = $retval[2];
+ $info['revisions'] = intval($retval[0]);
+ $info['fileversions'] = intval($retval[1]);
+ $info['reason'] = intval($retval[2]);
$this->getResult()->addValue(null, $this->getModuleName(), $info);
}
public function mustBePosted() { return true; }
+ public function isWriteMode() {
+ return true;
+ }
+
public function getAllowedParams() {
return array (
'title' => null,
@@ -121,6 +124,6 @@ class ApiUndelete extends ApiBase {
}
public function getVersion() {
- return __CLASS__ . ': $Id: ApiUndelete.php 43270 2008-11-06 22:30:55Z siebrand $';
+ return __CLASS__ . ': $Id: ApiUndelete.php 48091 2009-03-06 13:49:44Z catrope $';
}
}