diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-05-01 15:12:12 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-05-01 15:12:12 -0400 |
commit | c9aa36da061816dee256a979c2ff8d2ee41824d9 (patch) | |
tree | 29f7002b80ee984b488bd047dbbd80b36bf892e9 /includes/api/ApiTokens.php | |
parent | b4274e0e33eafb5e9ead9d949ebf031a9fb8363b (diff) | |
parent | d1ba966140d7a60cd5ae4e8667ceb27c1a138592 (diff) |
Merge branch 'archwiki'
# Conflicts:
# skins/ArchLinux.php
# skins/ArchLinux/archlogo.gif
Diffstat (limited to 'includes/api/ApiTokens.php')
-rw-r--r-- | includes/api/ApiTokens.php | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/includes/api/ApiTokens.php b/includes/api/ApiTokens.php index d220a5e6..9287fe6e 100644 --- a/includes/api/ApiTokens.php +++ b/includes/api/ApiTokens.php @@ -25,11 +25,16 @@ */ /** + * @deprecated since 1.24 * @ingroup API */ class ApiTokens extends ApiBase { public function execute() { + $this->setWarning( + "action=tokens has been deprecated. Please use action=query&meta=tokens instead." + ); + $params = $this->extractRequestParams(); $res = array(); @@ -67,6 +72,7 @@ class ApiTokens extends ApiBase { wfRunHooks( 'ApiTokensGetTokenTypes', array( &$types ) ); ksort( $types ); wfProfileOut( __METHOD__ ); + return $types; } @@ -80,16 +86,6 @@ class ApiTokens extends ApiBase { ); } - public function getResultProperties() { - $props = array( - '' => array(), - ); - - self::addTokenProperties( $props, $this->getTokenTypes() ); - - return $props; - } - public function getParamDescription() { return array( 'type' => 'Type of token(s) to request' @@ -97,7 +93,10 @@ class ApiTokens extends ApiBase { } public function getDescription() { - return 'Gets tokens for data-modifying actions'; + return array( + 'This module is deprecated in favor of action=query&meta=tokens.', + 'Gets tokens for data-modifying actions.' + ); } protected function getExamples() { |