r27906 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r27905‎ | r27906 | r27907 >
Date:20:45, 27 November 2007
Author:brion
Status:old
Tags:
Comment:
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)]
Modified paths:
  • /trunk/phase3/includes/Parser.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Parser.php
@@ -4541,7 +4541,7 @@
45424542 $pdbk = $pdbks[$key];
45434543 $searchkey = "<!--LINK $key-->";
45444544 $title = $this->mLinkHolders['titles'][$key];
4545 - if ( !isset( $colours[$pdbk] ) ) {
 4545+ if ( !isset( $colours[$pdbk] ) || $colours[$pdbk] == 'new' ) {
45464546 $linkCache->addBadLinkObj( $title );
45474547 $colours[$pdbk] = 'new';
45484548 $this->mOutput->addLink( $title, 0 );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r5506Fix bug 561: {{/Subpage}} acts like {{Template:/Subpage}}, by...wmahan20:13, 25 September 2004
r6003Return 'false' from fetchContent if article doesn't exist. Fixes two tests:...vibber07:28, 23 October 2004
r14425Add parser tests for bug 4598 ('' in link title)brion00:02, 28 May 2006
r14426Tweak bug 4598 with more sanity checks for casesbrion00:21, 28 May 2006
r19801Add a mechanism to parserTests when run in --compare or --record mode, to giv...nickj06:59, 6 February 2007
r27759* got rid of magic codes for colours.* added hook for link recolouring by ext...thomasv15:54, 22 November 2007
r27890API: Adding diff generation to prop=revisions....catrope16:41, 27 November 2007
r27900Unbreaking extension. ;-)...tlaqua18:23, 27 November 2007

Status & tagging log