From 72e90545454c0e014318fa3c81658e035aac58c1 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Wed, 10 Jun 2009 13:00:47 +0200 Subject: applying patch to version 1.15.0 --- includes/api/ApiUnblock.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'includes/api/ApiUnblock.php') diff --git a/includes/api/ApiUnblock.php b/includes/api/ApiUnblock.php index cd52c518..9216317a 100644 --- a/includes/api/ApiUnblock.php +++ b/includes/api/ApiUnblock.php @@ -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 $'; } } -- cgit v1.2.3-54-g00ecf