Restored the function of ApiMain::requestWriteMode(), as per the suggestion on CR...
authorTim Starling <tstarling@users.mediawiki.org>
Fri, 11 Dec 2009 06:49:48 +0000 (06:49 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Fri, 11 Dec 2009 06:49:48 +0000 (06:49 +0000)
includes/api/ApiMain.php

index 6867193..b37e3da 100644 (file)
@@ -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.