From 5cdbf22f7828be7031fa1f2bb8273e60b797682b Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Tue, 27 Nov 2007 20:45:41 +0000 Subject: [PATCH] Fix regressions in r27759 -- pages already marked in link cache at link parsing time were styled as new links but not given the edit action. 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/Parser.php b/includes/Parser.php index 5c4c21a4b0..e314facccf 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -4541,7 +4541,7 @@ class Parser $pdbk = $pdbks[$key]; $searchkey = ""; $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 ); -- 2.20.1