From 0957e88447dfc5f784de8cf6375260b12b221387 Mon Sep 17 00:00:00 2001 From: Rob Church Date: Wed, 17 Jan 2007 19:29:11 +0000 Subject: [PATCH] (bug 8678) Fix detection of self-links for numeric titles in Parser --- RELEASE-NOTES | 2 +- includes/Parser.php | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 2d24596632..5b04d7f6c9 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -104,7 +104,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * Allow restriction of autoconfirmed permission by edit count. New global setting $wgAutoConfirmCount (defaulting to zero, naturally). * (bug 8641) Fix order of updates to ipblocks table - +* (bug 8678) Fix detection of self-links for numeric titles in Parser == Languages updated == diff --git a/includes/Parser.php b/includes/Parser.php index f8577f9f4e..2c6f3a6f69 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -1777,11 +1777,12 @@ class Parser } } - if( ( in_array( $nt->getPrefixedText(), $selflink ) ) && - ( $nt->getFragment() === '' ) ) { - # Self-links are handled specially; generally de-link and change to bold. - $s .= $prefix . $sk->makeSelfLinkObj( $nt, $text, '', $trail ); - continue; + # Self-link checking + if( $nt->getFragment() === '' ) { + if( in_array( $nt->getPrefixedText(), $selflink, true ) ) { + $s .= $prefix . $sk->makeSelfLinkObj( $nt, $text, '', $trail ); + continue; + } } # Special and Media are pseudo-namespaces; no pages actually exist in them -- 2.20.1