From: Tim Starling Date: Fri, 11 Dec 2009 06:49:48 +0000 (+0000) Subject: Restored the function of ApiMain::requestWriteMode(), as per the suggestion on CR... X-Git-Tag: 1.31.0-rc.0~38574 X-Git-Url: http://git.cyclocoop.org//%27%40script%40/%27?a=commitdiff_plain;h=12b8a2a75efcdb5a44d1dd204010bf9f0074f822;p=lhc%2Fweb%2Fwiklou.git Restored the function of ApiMain::requestWriteMode(), as per the suggestion on CR r50833. --- diff --git a/includes/api/ApiMain.php b/includes/api/ApiMain.php index 6867193d25..b37e3da537 100644 --- a/includes/api/ApiMain.php +++ b/includes/api/ApiMain.php @@ -203,7 +203,12 @@ class ApiMain extends ApiBase { * Only kept for backwards compatibility * @deprecated Use isWriteMode() instead */ - public function requestWriteMode() {} + public function requestWriteMode() { + if (!$this->mEnableWrite) + $this->dieUsageMsg(array('writedisabled')); + if (wfReadOnly()) + $this->dieUsageMsg(array('readonlytext')); + } /** * Set how long the response should be cached.