Merge "Replace Action::getActionName by IContextSource::getActionName"

This commit is contained in:
jenkins-bot 2022-04-20 00:15:27 +00:00 committed by Gerrit Code Review
commit 0b57fc6d66

View file

@ -9,7 +9,6 @@
namespace MediaWiki\Extension\DiscussionTools\Hooks;
use Action;
use ExtensionRegistry;
use IContextSource;
use MediaWiki\MediaWikiServices;
@ -225,7 +224,7 @@ class HookUtils {
*/
public static function isFeatureEnabledForOutput( OutputPage $output, ?string $feature = null ): bool {
// Don't show on edit pages, history, etc.
if ( $feature !== self::NEWTOPICTOOL && Action::getActionName( $output->getContext() ) !== 'view' ) {
if ( $feature !== self::NEWTOPICTOOL && $output->getActionName() !== 'view' ) {
return false;
}