r59948 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r59947‎ | r59948 | r59949 >
Date:06:49, 11 December 2009
Author:tstarling
Status:ok (Comments)
Tags:
Comment:
Restored the function of ApiMain::requestWriteMode(), as per the suggestion on CR r50833.
Modified paths:
  • /trunk/phase3/includes/api/ApiMain.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiMain.php
@@ -203,7 +203,12 @@
204204 * Only kept for backwards compatibility
205205 * @deprecated Use isWriteMode() instead
206206 */
207 - public function requestWriteMode() {}
 207+ public function requestWriteMode() {
 208+ if (!$this->mEnableWrite)
 209+ $this->dieUsageMsg(array('writedisabled'));
 210+ if (wfReadOnly())
 211+ $this->dieUsageMsg(array('readonlytext'));
 212+ }
208213
209214 /**
210215 * Set how long the response should be cached.

Follow-up revisions

RevisionCommit summaryAuthorDate
r69990* MFT r59948: restore the function of ApiMain::requestWriteMode()....tstarling08:44, 27 July 2010

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r50833Re-adding ApiMain::requestWriteMode() (removed in r48901) for backwards compa...catrope20:07, 20 May 2009

Comments

#Comment by Bryan (talk | contribs)   10:25, 11 December 2009

Needs to be backported to 1.15. (r50834)

Status & tagging log