]> scripts.mit.edu Git - autoinstallsdev/mediawiki.git/blobdiff - includes/api/ApiUnblock.php
MediaWiki 1.15.0
[autoinstallsdev/mediawiki.git] / includes / api / ApiUnblock.php
index cd52c518851a7f6d8c699fb481da50a605f0969b..9216317ab7690526b0b9af31ee142e82f6967e85 100644 (file)
@@ -44,7 +44,6 @@ class ApiUnblock extends ApiBase {
         */
        public function execute() {
                global $wgUser;
-               $this->getMain()->requestWriteMode();
                $params = $this->extractRequestParams();
 
                if($params['gettoken'])
@@ -72,7 +71,7 @@ class ApiUnblock extends ApiBase {
                if($retval)
                        $this->dieUsageMsg($retval);
 
-               $res['id'] = $id;
+               $res['id'] = intval($id);
                $res['user'] = $user;
                $res['reason'] = $reason;
                $this->getResult()->addValue(null, $this->getModuleName(), $res);
@@ -80,6 +79,10 @@ class ApiUnblock extends ApiBase {
 
        public function mustBePosted() { return true; }
 
+       public function isWriteMode() {
+               return true;
+       }
+
        public function getAllowedParams() {
                return array (
                        'id' => null,
@@ -114,6 +117,6 @@ class ApiUnblock extends ApiBase {
        }
 
        public function getVersion() {
-               return __CLASS__ . ': $Id: ApiUnblock.php 42651 2008-10-27 12:06:49Z catrope $';
+               return __CLASS__ . ': $Id: ApiUnblock.php 48091 2009-03-06 13:49:44Z catrope $';
        }
 }