From aa8b16322829bbe03762aff87f832b52937e0070 Mon Sep 17 00:00:00 2001 From: Daniel Kraus Date: Tue, 21 Mar 2017 22:12:23 +0100 Subject: [PATCH] Fix detecting __NOAUTOLINKS__ on rendering. - Fix: __NOAUTOLINKS__ was not respected during rendering. The InternalParseBeforeLinks hook is called before the mDoubleUnderScores instance variable is set. --- includes/LinkTitles_Extension.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/LinkTitles_Extension.php b/includes/LinkTitles_Extension.php index bf509b9..c4419f9 100644 --- a/includes/LinkTitles_Extension.php +++ b/includes/LinkTitles_Extension.php @@ -109,7 +109,8 @@ class Extension { // If the page contains the magic word '__NOAUTOLINKS__', do not parse it. // Only process if page is in one of our namespaces we want to link - if ( !isset( $parser->mDoubleUnderScores[$text] ) && in_array( $title->getNamespace(), $wgLinkTitlesNamespaces ) ) { + if ( !\MagicWord::get( 'MAG_LINKTITLES_NOAUTOLINKS' )->match( $text ) && + in_array( $title->getNamespace(), $wgLinkTitlesNamespaces ) ) { $text = self::parseContent( $title, $text ); } return true;