(bug 8678) Fix detection of self-links for numeric titles in Parser
authorRob Church <robchurch@users.mediawiki.org>
Wed, 17 Jan 2007 19:29:11 +0000 (19:29 +0000)
committerRob Church <robchurch@users.mediawiki.org>
Wed, 17 Jan 2007 19:29:11 +0000 (19:29 +0000)
RELEASE-NOTES
includes/Parser.php

index 2d24596..5b04d7f 100644 (file)
@@ -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 ==
 
index f8577f9..2c6f3a6 100644 (file)
@@ -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