Restore ApiQueryUserInfo::getBlockInfo() as a stub.
[lhc/web/wiklou.git] / includes / api / ApiQueryUserInfo.php
index c495c6d..d73fbc4 100644 (file)
@@ -52,6 +52,26 @@ class ApiQueryUserInfo extends ApiQueryBase {
                $result->addValue( 'query', $this->getModuleName(), $r );
        }
 
+       /**
+        * Get basic info about a given block
+        *
+        * @deprecated since 1.34 Use ApiBlockInfoTrait::getBlockDetails() instead.
+        * @param Block $block
+        * @return array See ApiBlockInfoTrait::getBlockDetails
+        */
+       public static function getBlockInfo( Block $block ) {
+               wfDeprecated( __METHOD__, '1.34' );
+
+               // Hack to access a private method from a trait:
+               $dummy = new class {
+                       use ApiBlockInfoTrait {
+                               getBlockDetails as public;
+                       }
+               };
+
+               return $dummy->getBlockDetails( $block );
+       }
+
        /**
         * Get central user info
         * @param Config $config
@@ -104,7 +124,7 @@ class ApiQueryUserInfo extends ApiQueryBase {
                if ( isset( $this->prop['blockinfo'] ) ) {
                        $block = $user->getBlock();
                        if ( $block ) {
-                               $vals = array_merge( $vals, $this->getBlockInfo( $block ) );
+                               $vals = array_merge( $vals, $this->getBlockDetails( $block ) );
                        }
                }