Special:TrackingCategories has special logic to detect people
using {{NAMESPACE}} in their tracking category messages, and
handle it. Make it detect any '{{' to deal with localized
variants. This will make it work for
[[commons:MediaWiki:Broken-file-category]]
Change-Id: Ibac0decc5992d30ae536efc91138ad9b42a569e9
htmlspecialchars( $catMsg )
);
- if ( strpos( $msgObj->plain(), '{{NAMESPACE}}' ) !== false ) {
+ // Match things like {{NAMESPACE}} and {{NAMESPACENUMBER}}.
+ // False positives are ok, this is just an efficiency shortcut
+ if ( strpos( $msgObj->plain(), '{{' ) !== false ) {
$ns = MWNamespace::getValidNamespaces();
foreach ( $ns as $namesp ) {
$tempTitle = Title::makeTitleSafe( $namesp, $catMsg );