From 67de38b7eb9d340e841d1553ac7fd46891ad6ad9 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Wed, 14 Oct 2009 20:35:14 +0000 Subject: [PATCH] * (bug 21115) wgCanonicalSpecialPageName javascript variable is now always false on non-special pages Based on a patch by Platonides - http://bug-attachment.wikimedia.org/attachment.cgi?id=6669 --- RELEASE-NOTES | 2 ++ includes/Skin.php | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index ffa97c5be9..c5b83913d9 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -553,6 +553,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN hideuser right * (bug 21026) Fixed file redirects on shared repos on non-English client wikis * (bug 21030) Fixed schema choices from being overwritten by defining unique field names per driver. +* (bug 21115) wgCanonicalSpecialPageName javascript variable is now always + false on non-special pages == API changes in 1.16 == diff --git a/includes/Skin.php b/includes/Skin.php index 0e40140ab7..4a92159839 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -391,7 +391,8 @@ class Skin extends Linker { 'wgActionPaths' => (object)$wgActionPaths, 'wgServer' => $wgServer, 'wgCanonicalNamespace' => $nsname, - 'wgCanonicalSpecialPageName' => SpecialPage::resolveAlias( $wgTitle->getDBkey() ), + 'wgCanonicalSpecialPageName' => $ns == NS_SPECIAL ? + SpecialPage::resolveAlias( $wgTitle->getDBkey() ) : false, # bug 21115 'wgNamespaceNumber' => $wgTitle->getNamespace(), 'wgPageName' => $wgTitle->getPrefixedDBKey(), 'wgTitle' => $wgTitle->getText(), -- 2.20.1