X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiTokens.php;h=518bfce088be3a5ccd55ad2b6ea47b8980fac2ba;hb=63a828ee0e0b2c1ce22ac358d7a4860ffd850ebf;hp=c56d646cb380f803bad5bf842fede0bdb923cb6f;hpb=3d7f9d6fee486a2bd8dd5037bb0d2dac9c57644d;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiTokens.php b/includes/api/ApiTokens.php index c56d646cb3..518bfce088 100644 --- a/includes/api/ApiTokens.php +++ b/includes/api/ApiTokens.php @@ -30,10 +30,6 @@ */ class ApiTokens extends ApiBase { - public function __construct( $main, $action ) { - parent::__construct( $main, $action ); - } - public function execute() { wfProfileIn( __METHOD__ ); $params = $this->extractRequestParams(); @@ -84,6 +80,57 @@ class ApiTokens extends ApiBase { ); } + public function getResultProperties() { + return array( + '' => array( + 'patroltoken' => array( + ApiBase::PROP_TYPE => 'string', + ApiBase::PROP_NULLABLE => true + ), + 'edittoken' => array( + ApiBase::PROP_TYPE => 'string', + ApiBase::PROP_NULLABLE => true + ), + 'deletetoken' => array( + ApiBase::PROP_TYPE => 'string', + ApiBase::PROP_NULLABLE => true + ), + 'protecttoken' => array( + ApiBase::PROP_TYPE => 'string', + ApiBase::PROP_NULLABLE => true + ), + 'movetoken' => array( + ApiBase::PROP_TYPE => 'string', + ApiBase::PROP_NULLABLE => true + ), + 'blocktoken' => array( + ApiBase::PROP_TYPE => 'string', + ApiBase::PROP_NULLABLE => true + ), + 'unblocktoken' => array( + ApiBase::PROP_TYPE => 'string', + ApiBase::PROP_NULLABLE => true + ), + 'emailtoken' => array( + ApiBase::PROP_TYPE => 'string', + ApiBase::PROP_NULLABLE => true + ), + 'importtoken' => array( + ApiBase::PROP_TYPE => 'string', + ApiBase::PROP_NULLABLE => true + ), + 'watchtoken' => array( + ApiBase::PROP_TYPE => 'string', + ApiBase::PROP_NULLABLE => true + ), + 'optionstoken' => array( + ApiBase::PROP_TYPE => 'string', + ApiBase::PROP_NULLABLE => true + ) + ) + ); + } + public function getParamDescription() { return array( 'type' => 'Type of token(s) to request' @@ -100,8 +147,4 @@ class ApiTokens extends ApiBase { 'api.php?action=tokens&type=email|move' => 'Retrieve an email token and a move token' ); } - - public function getVersion() { - return __CLASS__ . ': $Id$'; - } }