X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiQueryUsers.php;h=b62d6a83e087f88ef8b8fed30a292f6ca6a928e1;hb=50dee21f7a852e2cb4865b9ec83e272a25ab90c3;hp=ce92063c5ce87cb5e6b45bee4bc6a9cef4562e24;hpb=00c13cb4d5f978a57275e74752a4be734675be81;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiQueryUsers.php b/includes/api/ApiQueryUsers.php index ce92063c5c..b62d6a83e0 100644 --- a/includes/api/ApiQueryUsers.php +++ b/includes/api/ApiQueryUsers.php @@ -50,7 +50,7 @@ class ApiQueryUsers extends ApiQueryBase { 'gender', ); - public function __construct( $query, $moduleName ) { + public function __construct( ApiQuery $query, $moduleName ) { parent::__construct( $query, $moduleName, 'us' ); } @@ -58,6 +58,7 @@ class ApiQueryUsers extends ApiQueryBase { * Get an array mapping token names to their handler functions. * The prototype for a token function is func($user) * it should return a token or false (permission denied) + * @deprecated since 1.24 * @return array Array of tokenname => function */ protected function getTokenFunctions() { @@ -80,6 +81,7 @@ class ApiQueryUsers extends ApiQueryBase { } /** + * @deprecated since 1.24 * @param User $user * @return string */ @@ -317,6 +319,7 @@ class ApiQueryUsers extends ApiQueryBase { ApiBase::PARAM_ISMULTI => true ), 'token' => array( + ApiBase::PARAM_DEPRECATED => true, ApiBase::PARAM_TYPE => array_keys( $this->getTokenFunctions() ), ApiBase::PARAM_ISMULTI => true ), @@ -342,73 +345,6 @@ class ApiQueryUsers extends ApiQueryBase { ); } - public function getResultProperties() { - $props = array( - '' => array( - 'userid' => array( - ApiBase::PROP_TYPE => 'integer', - ApiBase::PROP_NULLABLE => true - ), - 'name' => 'string', - 'invalid' => 'boolean', - 'hidden' => 'boolean', - 'interwiki' => 'boolean', - 'missing' => 'boolean' - ), - 'editcount' => array( - 'editcount' => array( - ApiBase::PROP_TYPE => 'integer', - ApiBase::PROP_NULLABLE => true - ) - ), - 'registration' => array( - 'registration' => array( - ApiBase::PROP_TYPE => 'timestamp', - ApiBase::PROP_NULLABLE => true - ) - ), - 'blockinfo' => array( - 'blockid' => array( - ApiBase::PROP_TYPE => 'integer', - ApiBase::PROP_NULLABLE => true - ), - 'blockedby' => array( - ApiBase::PROP_TYPE => 'string', - ApiBase::PROP_NULLABLE => true - ), - 'blockedbyid' => array( - ApiBase::PROP_TYPE => 'integer', - ApiBase::PROP_NULLABLE => true - ), - 'blockedreason' => array( - ApiBase::PROP_TYPE => 'string', - ApiBase::PROP_NULLABLE => true - ), - 'blockedexpiry' => array( - ApiBase::PROP_TYPE => 'timestamp', - ApiBase::PROP_NULLABLE => true - ) - ), - 'emailable' => array( - 'emailable' => 'boolean' - ), - 'gender' => array( - 'gender' => array( - ApiBase::PROP_TYPE => array( - 'male', - 'female', - 'unknown' - ), - ApiBase::PROP_NULLABLE => true - ) - ) - ); - - self::addTokenProperties( $props, $this->getTokenFunctions() ); - - return $props; - } - public function getDescription() { return 'Get information about a list of users.'; }