r13303 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r13302‎ | r13303 | r13304 >
Date:16:44, 24 March 2006
Author:gabrielwicke
Status:old
Tags:
Comment:
Handle {{/subpage}} properly
Modified paths:
  • /trunk/phase3/includes/Parser.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Parser.php
@@ -2616,7 +2616,11 @@
26172617 $lastPathLevel = $this->mTemplatePath;
26182618 if ( !$found ) {
26192619 $ns = NS_TEMPLATE;
2620 - $part1 = $this->maybeDoSubpageLink( $part1, $subpage='' );
 2620+ # declaring $subpage directly in the function call
 2621+ # does not work correctly with references and breaks
 2622+ # {{/subpage}}-style inclusions
 2623+ $subpage = '';
 2624+ $part1 = $this->maybeDoSubpageLink( $part1, $subpage );
26212625 if ($subpage !== '') {
26222626 $ns = $this->mTitle->getNamespace();
26232627 }

Status & tagging log