summaryrefslogtreecommitdiff
path: root/includes/api/ApiWatch.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2009-06-10 13:00:47 +0200
committerPierre Schmitz <pierre@archlinux.de>2009-06-10 13:00:47 +0200
commit72e90545454c0e014318fa3c81658e035aac58c1 (patch)
tree9212e3f46868989c4d57ae9a5c8a1a80e4dc0702 /includes/api/ApiWatch.php
parent565a0ccc371ec1a2a0e9b39487cbac18e6f60e25 (diff)
applying patch to version 1.15.0
Diffstat (limited to 'includes/api/ApiWatch.php')
-rw-r--r--includes/api/ApiWatch.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/includes/api/ApiWatch.php b/includes/api/ApiWatch.php
index ab122fea..1b98fb86 100644
--- a/includes/api/ApiWatch.php
+++ b/includes/api/ApiWatch.php
@@ -29,8 +29,7 @@ if (!defined('MEDIAWIKI')) {
}
/**
- * API module to allow users to log out of the wiki. API equivalent of
- * Special:Userlogout.
+ * API module to allow users to watch a page
*
* @ingroup API
*/
@@ -42,7 +41,6 @@ class ApiWatch extends ApiBase {
public function execute() {
global $wgUser;
- $this->getMain()->requestWriteMode();
if(!$wgUser->isLoggedIn())
$this->dieUsage('You must be logged-in to have a watchlist', 'notloggedin');
$params = $this->extractRequestParams();
@@ -66,6 +64,10 @@ class ApiWatch extends ApiBase {
$this->getResult()->addValue(null, $this->getModuleName(), $res);
}
+ public function isWriteMode() {
+ return true;
+ }
+
public function getAllowedParams() {
return array (
'title' => null,
@@ -94,6 +96,6 @@ class ApiWatch extends ApiBase {
}
public function getVersion() {
- return __CLASS__ . ': $Id: ApiWatch.php 40460 2008-09-04 22:20:32Z ialex $';
+ return __CLASS__ . ': $Id: ApiWatch.php 48091 2009-03-06 13:49:44Z catrope $';
}
}