From 984e7ada4073898b32f7b98d8fee2e92ecd6e3ef Mon Sep 17 00:00:00 2001 From: Rob Church Date: Tue, 27 Mar 2007 21:15:23 +0000 Subject: [PATCH] (bug 8421) Expose current action in JavaScript globals (as 'wgAction') --- RELEASE-NOTES | 1 + includes/DefaultSettings.php | 2 +- includes/Skin.php | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 41d0e0529f..909f1c8ab3 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -105,6 +105,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN for more information * (bug 9397) Introduce "sp-contributions-footer" and "sp-contributions-footer-anon" messages, shown at the end of Special:Contributions as appropriate for the target +* (bug 8421) Expose current action in JavaScript globals (as 'wgAction') == Bugfixes since 1.9 == * (bug 7292) Fix site statistics when moving pages in/out of content namespaces diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 995521a19a..8e2c202cd5 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -1117,7 +1117,7 @@ $wgCacheEpoch = '20030516000000'; * to ensure that client-side caches don't keep obsolete copies of global * styles. */ -$wgStyleVersion = '61'; +$wgStyleVersion = '62'; # Server-side caching: diff --git a/includes/Skin.php b/includes/Skin.php index 7bbb0260f1..d5477d04bd 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -295,7 +295,7 @@ class Skin extends Linker { global $wgStylePath, $wgUser; global $wgArticlePath, $wgScriptPath, $wgServer, $wgContLang, $wgLang; global $wgTitle, $wgCanonicalNamespaceNames, $wgOut, $wgArticle; - global $wgBreakFrames; + global $wgBreakFrames, $wgRequest; $ns = $wgTitle->getNamespace(); $nsname = isset( $wgCanonicalNamespaceNames[ $ns ] ) ? $wgCanonicalNamespaceNames[ $ns ] : $wgTitle->getNsText(); @@ -311,6 +311,7 @@ class Skin extends Linker { 'wgNamespaceNumber' => $wgTitle->getNamespace(), 'wgPageName' => $wgTitle->getPrefixedDBKey(), 'wgTitle' => $wgTitle->getText(), + 'wgAction' => $wgRequest->getText( 'action', 'view' ), 'wgArticleId' => $wgTitle->getArticleId(), 'wgIsArticle' => $wgOut->isArticle(), 'wgUserName' => $wgUser->isAnon() ? NULL : $wgUser->getName(), -- 2.20.1