diff options
Diffstat (limited to 'Echo/includes/api/ApiEchoMarkSeen.php')
-rw-r--r-- | Echo/includes/api/ApiEchoMarkSeen.php | 28 |
1 files changed, 7 insertions, 21 deletions
diff --git a/Echo/includes/api/ApiEchoMarkSeen.php b/Echo/includes/api/ApiEchoMarkSeen.php index 46069166..50eeccd9 100644 --- a/Echo/includes/api/ApiEchoMarkSeen.php +++ b/Echo/includes/api/ApiEchoMarkSeen.php @@ -1,5 +1,7 @@ <?php +// This is a GET module, not a POST module, for multi-DC support. See T222851. +// Note that this module doesn't write to the database, only to the seentime cache. class ApiEchoMarkSeen extends ApiBase { public function execute() { @@ -20,7 +22,10 @@ class ApiEchoMarkSeen extends ApiBase { $outputTimestamp = wfTimestamp( TS_ISO_8601, $timestamp ); } else { // MW - $this->addDeprecation( 'apiwarn-echo-deprecation-timestampformat', 'action=echomarkseen×tampFormat=MW' ); + $this->addDeprecation( + 'apiwarn-echo-deprecation-timestampformat', + 'action=echomarkseen×tampFormat=MW' + ); $outputTimestamp = $timestamp; } @@ -33,9 +38,6 @@ class ApiEchoMarkSeen extends ApiBase { public function getAllowedParams() { return [ - 'token' => [ - ApiBase::PARAM_REQUIRED => true, - ], 'type' => [ ApiBase::PARAM_REQUIRED => true, ApiBase::PARAM_TYPE => [ 'alert', 'message', 'all' ], @@ -48,22 +50,6 @@ class ApiEchoMarkSeen extends ApiBase { ]; } - public function needsToken() { - return 'csrf'; - } - - public function getTokenSalt() { - return ''; - } - - public function mustBePosted() { - return true; - } - - public function isWriteMode() { - return true; - } - /** * @see ApiBase::getExamplesMessages() * @return string[] @@ -75,6 +61,6 @@ class ApiEchoMarkSeen extends ApiBase { } public function getHelpUrls() { - return 'https://www.mediawiki.org/wiki/Echo_(Notifications)/API'; + return 'https://www.mediawiki.org/wiki/Special:MyLanguage/Echo_(Notifications)/API'; } } |