VitaliyFilippov has uploaded a new change for review.
https://gerrit.wikimedia.org/r/66092
Change subject: Allow relative inclusions in Main namespace.
......................................................................
Allow relative inclusions in Main namespace.
In previous versions of MediaWiki, relative inclusions ({{../name}}) were not
handled
properly in the Main namespace - it tried to include Template:Parent/name
instead of
just Parent/name article. In other namespaces they worked, though. The patch
fixes
this inconsistence and allows to use relative inclusions in Main.
Change-Id: Ie04f23c180e501631c629a39b997796a1725fb67
---
M includes/parser/Parser.php
1 file changed, 3 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/92/66092/1
diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php
index 840e174..4e61ef6 100644
--- a/includes/parser/Parser.php
+++ b/includes/parser/Parser.php
@@ -3296,8 +3296,9 @@
$ns = NS_TEMPLATE;
# Split the title into page and subpage
$subpage = '';
- $part1 = $this->maybeDoSubpageLink( $part1, $subpage );
- if ( $subpage !== '' ) {
+ $relative = $this->maybeDoSubpageLink( $part1, $subpage
);
+ if ( $part1 !== $relative ) {
+ $part1 = $relative;
$ns = $this->mTitle->getNamespace();
}
$title = Title::newFromText( $part1, $ns );
--
To view, visit https://gerrit.wikimedia.org/r/66092
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie04f23c180e501631c629a39b997796a1725fb67
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: VitaliyFilippov <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits