Fix regressions in r27759 -- pages already marked in link cache at link parsing time...
authorBrion Vibber <brion@users.mediawiki.org>
Tue, 27 Nov 2007 20:45:41 +0000 (20:45 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Tue, 27 Nov 2007 20:45:41 +0000 (20:45 +0000)
The original link coloring array used 0 for broken links, and an empty() check which would return true for both missing entries and entries which had been stored explicitly as 0.
r27759 switched it to use class names, but the change of the check to !isset() no longer got the explicit case.

11 previously failing test(s) now PASSING! :)
    * Piped link to namespace  [Fixed between 27-Nov-2007 19:23:59, 1.12alpha (r27890) and 27-Nov-2007 20:42:42, 1.12alpha (r27900)]
    * Link containing % as a single hex sequence interpreted to char  [Fixed between 27-Nov-2007 19:23:59, 1.12alpha (r27890) and 27-Nov-2007 20:42:42, 1.12alpha (r27900)]
    * Link containing double-single-quotes '' in text embedded in italics (bug 4598 sanity check)  [Fixed between 27-Nov-2007 19:23:59, 1.12alpha (r27890) and 27-Nov-2007 20:42:42, 1.12alpha (r27900)]
    * Nonexistant template  [Fixed between 27-Nov-2007 19:23:59, 1.12alpha (r27890) and 27-Nov-2007 20:42:42, 1.12alpha (r27900)]
    * Template with thumb image (with link in description)  [Fixed between 27-Nov-2007 19:23:59, 1.12alpha (r27890) and 27-Nov-2007 20:42:42, 1.12alpha (r27900)]
    * BUG 561: {{/Subpage}}  [Fixed between 27-Nov-2007 19:23:59, 1.12alpha (r27890) and 27-Nov-2007 20:42:42, 1.12alpha (r27900)]
    * Transclusion of nonexistent MediaWiki message  [Fixed between 27-Nov-2007 19:23:59, 1.12alpha (r27890) and 27-Nov-2007 20:42:42, 1.12alpha (r27900)]
    * Say the magic word  [Fixed between 27-Nov-2007 19:23:59, 1.12alpha (r27890) and 27-Nov-2007 20:42:42, 1.12alpha (r27900)]
    * Parents of subpages, one level up, not named  [Fixed between 27-Nov-2007 19:23:59, 1.12alpha (r27890) and 27-Nov-2007 20:42:42, 1.12alpha (r27900)]
    * RAW magic word  [Fixed between 27-Nov-2007 19:23:59, 1.12alpha (r27890) and 27-Nov-2007 20:42:42, 1.12alpha (r27900)]
    * red link from nonexistent article  [Fixed between 27-Nov-2007 19:23:59, 1.12alpha (r27890) and 27-Nov-2007 20:42:42, 1.12alpha (r27900)]

includes/Parser.php

index 5c4c21a..e314fac 100644 (file)
@@ -4541,7 +4541,7 @@ class Parser
                                $pdbk = $pdbks[$key];
                                $searchkey = "<!--LINK $key-->";
                                $title = $this->mLinkHolders['titles'][$key];
-                               if ( !isset( $colours[$pdbk] ) ) {
+                               if ( !isset( $colours[$pdbk] ) || $colours[$pdbk] == 'new' ) {
                                        $linkCache->addBadLinkObj( $title );
                                        $colours[$pdbk] = 'new';
                                        $this->mOutput->addLink( $title, 0 );