]> scripts.mit.edu Git - autoinstallsdev/mediawiki.git/blobdiff - includes/api/ApiUndelete.php
MediaWiki 1.15.0
[autoinstallsdev/mediawiki.git] / includes / api / ApiUndelete.php
index 7ae9a3c08536b541871812cb048419b8a3bf8fed..ddc9f7f819e7b8839e7788583f2724edf5844aa5 100644 (file)
@@ -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 $';
        }
 }