dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5db0cf9
)
Restored the function of ApiMain::requestWriteMode(), as per the suggestion on CR...
author
Tim Starling
<tstarling@users.mediawiki.org>
Fri, 11 Dec 2009 06:49:48 +0000
(06:49 +0000)
committer
Tim Starling
<tstarling@users.mediawiki.org>
Fri, 11 Dec 2009 06:49:48 +0000
(06:49 +0000)
includes/api/ApiMain.php
patch
|
blob
|
history
diff --git
a/includes/api/ApiMain.php
b/includes/api/ApiMain.php
index
6867193
..
b37e3da
100644
(file)
--- 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.