From 12b8a2a75efcdb5a44d1dd204010bf9f0074f822 Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Fri, 11 Dec 2009 06:49:48 +0000 Subject: [PATCH] Restored the function of ApiMain::requestWriteMode(), as per the suggestion on CR r50833. --- includes/api/ApiMain.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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. -- 2.20.1