From: Rob Church Date: Wed, 17 Jan 2007 19:29:11 +0000 (+0000) Subject: (bug 8678) Fix detection of self-links for numeric titles in Parser X-Git-Tag: 1.31.0-rc.0~54337 X-Git-Url: http://git.cyclocoop.org/fichier?a=commitdiff_plain;h=0957e88447dfc5f784de8cf6375260b12b221387;p=lhc%2Fweb%2Fwiklou.git (bug 8678) Fix detection of self-links for numeric titles in Parser --- 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