]> scripts.mit.edu Git - autoinstallsdev/mediawiki.git/blobdiff - includes/api/ApiWatch.php
MediaWiki 1.15.0
[autoinstallsdev/mediawiki.git] / includes / api / ApiWatch.php
index ab122fea624e5e9dc5200ad18164e0cba0c65d39..1b98fb861d6231d210e31d8c7f61ea1a924cf881 100644 (file)
@@ -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 $';
        }
 }