From: Thalia Date: Mon, 13 May 2019 14:20:38 +0000 (+0100) Subject: Make ApiQueryUserInfo::getBlockInfo accept an AbstractBlock X-Git-Tag: 1.34.0-rc.0~1701^2 X-Git-Url: http://git.cyclocoop.org/data/%24self?a=commitdiff_plain;h=f5ef28cadc15ae027f7580467314051d54cb7014;p=lhc%2Fweb%2Fwiklou.git Make ApiQueryUserInfo::getBlockInfo accept an AbstractBlock This method was removed (I84ed216) before the Block class was refactored (I83bceb5) and restored (If47a938) after the refactor. After the refactor, this method should accept and AbstractBlock, so it can handle a SystemBlock as well as a database Block. Change-Id: Ice8a2e7c19e88406229bd836a45f377abdb72fb6 --- diff --git a/includes/api/ApiQueryUserInfo.php b/includes/api/ApiQueryUserInfo.php index d73fbc4d32..ba7280da10 100644 --- a/includes/api/ApiQueryUserInfo.php +++ b/includes/api/ApiQueryUserInfo.php @@ -20,6 +20,7 @@ * @file */ +use MediaWiki\Block\AbstractBlock; use MediaWiki\MediaWikiServices; /** @@ -56,10 +57,10 @@ class ApiQueryUserInfo extends ApiQueryBase { * Get basic info about a given block * * @deprecated since 1.34 Use ApiBlockInfoTrait::getBlockDetails() instead. - * @param Block $block + * @param AbstractBlock $block * @return array See ApiBlockInfoTrait::getBlockDetails */ - public static function getBlockInfo( Block $block ) { + public static function getBlockInfo( AbstractBlock $block ) { wfDeprecated( __METHOD__, '1.34' ); // Hack to access a private method from a trait: