Merge "API: Fix ApiQueryBacklinks redirlinks"
[lhc/web/wiklou.git] / includes / api / ApiQueryUsers.php
index 84326a2..c147279 100644 (file)
@@ -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
         */
@@ -193,6 +195,7 @@ class ApiQueryUsers extends ApiQueryBase {
                                        $data[$name]['blockid'] = $row->ipb_id;
                                        $data[$name]['blockedby'] = $row->ipb_by_text;
                                        $data[$name]['blockedbyid'] = $row->ipb_by;
+                                       $data[$name]['blockedtimestamp'] = wfTimestamp( TS_ISO_8601, $row->ipb_timestamp );
                                        $data[$name]['blockreason'] = $row->ipb_reason;
                                        $data[$name]['blockexpiry'] = $row->ipb_expiry;
                                }
@@ -274,19 +277,6 @@ class ApiQueryUsers extends ApiQueryBase {
                $result->setIndexedTagName_internal( array( 'query', $this->getModuleName() ), 'user' );
        }
 
-       /**
-        * Gets all the groups that a user is automatically a member of (implicit groups)
-        *
-        * @deprecated since 1.20; call User::getAutomaticGroups() directly.
-        * @param User $user
-        * @return array
-        */
-       public static function getAutoGroups( $user ) {
-               wfDeprecated( __METHOD__, '1.20' );
-
-               return $user->getAutomaticGroups();
-       }
-
        public function getCacheMode( $params ) {
                if ( isset( $params['token'] ) ) {
                        return 'private';
@@ -317,6 +307,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
                        ),