From 660d9c07688da88d72bf29a5cb63877d94446f0b Mon Sep 17 00:00:00 2001 From: Gabriel Wicke Date: Fri, 24 Mar 2006 16:44:52 +0000 Subject: [PATCH] Handle {{/subpage}} properly --- includes/Parser.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/includes/Parser.php b/includes/Parser.php index ff66e1314f..4329bd180d 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -2616,7 +2616,11 @@ class Parser $lastPathLevel = $this->mTemplatePath; if ( !$found ) { $ns = NS_TEMPLATE; - $part1 = $this->maybeDoSubpageLink( $part1, $subpage='' ); + # declaring $subpage directly in the function call + # does not work correctly with references and breaks + # {{/subpage}}-style inclusions + $subpage = ''; + $part1 = $this->maybeDoSubpageLink( $part1, $subpage ); if ($subpage !== '') { $ns = $this->mTitle->getNamespace(); } -- 2.20.1