Enable visualenhancements on archived talk pages

Bug: T374198
Change-Id: I50f566934bd0f3962741557ca24f1ef4af288eee
This commit is contained in:
Ed Sanders 2024-09-06 10:00:28 +01:00
parent d7924d8e17
commit 3dc503c43b

View file

@ -320,12 +320,12 @@ class HookUtils {
}
// ARCHIVEDTALK/NOTALK magic words
if ( self::hasPagePropCached( $title, 'notalk' ) ) {
if ( static::hasPagePropCached( $title, 'notalk' ) ) {
return false;
}
if (
$feature === static::REPLYTOOL &&
self::hasPagePropCached( $title, 'archivedtalk' )
static::hasPagePropCached( $title, 'archivedtalk' )
) {
return false;
}
@ -336,8 +336,11 @@ class HookUtils {
$dtConfig = MediaWikiServices::getInstance()->getConfigFactory()->makeConfig( 'discussiontools' );
// Visual enhancements are only enabled on talk namespaces (T325417) ...
return $title->isTalkPage() || (
// ... or __NEWSECTIONLINK__ pages (T331635)
static::hasPagePropCached( $title, 'newsectionlink' ) &&
// ... or __NEWSECTIONLINK__ (T331635) or __ARCHIVEDTALK__ (T374198) pages
(
static::hasPagePropCached( $title, 'newsectionlink' ) ||
static::hasPagePropCached( $title, 'archivedtalk' )
) &&
// excluding the main namespace, unless it has been configured for signatures
(
!$title->inNamespace( NS_MAIN ) ||