specials: Allow hiding special pages properly on SpecialPages list

Bug: T360723
Change-Id: I8e378253fd5af54d979accccf43d88491bf43da3
This commit is contained in:
Ammarpad 2024-09-06 12:27:40 +01:00
parent a3ef4cce0f
commit f67da93eb4

View file

@ -75,11 +75,14 @@ class SpecialSpecialPages extends UnlistedSpecialPage {
wfDeprecated( "string return from {$page->getName()}::getDescription()", '1.41' );
$desc = ( new RawMessage( '$1' ) )->rawParams( $desc );
}
$groups[$group][$desc->text()] = [
$page->getPageTitle(),
$page->isRestricted(),
$page->isCached()
];
// (T360723) Only show an entry if the message isn't blanked, to allow on-wiki unlisting
if ( !$desc->isDisabled() ) {
$groups[$group][$desc->text()] = [
$page->getPageTitle(),
$page->isRestricted(),
$page->isCached()
];
}
}
// Sort