From: Rob Church Date: Tue, 27 Mar 2007 21:15:23 +0000 (+0000) Subject: (bug 8421) Expose current action in JavaScript globals (as 'wgAction') X-Git-Tag: 1.31.0-rc.0~53576 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=984e7ada4073898b32f7b98d8fee2e92ecd6e3ef;p=lhc%2Fweb%2Fwiklou.git (bug 8421) Expose current action in JavaScript globals (as 'wgAction') --- 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(),