Fix detecting __NOAUTOLINKS__ on rendering.

- Fix: __NOAUTOLINKS__ was not respected during rendering.

The InternalParseBeforeLinks hook is called before the
mDoubleUnderScores instance variable is set.
This commit is contained in:
Daniel Kraus
2017-03-21 22:12:23 +01:00
parent 381194c02e
commit aa8b163228

View File

@ -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;