mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-27 17:51:09 +00:00
Merge "Replace Action::getActionName by IContextSource::getActionName"
This commit is contained in:
commit
0b57fc6d66
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue