(bug 8421) Expose current action in JavaScript globals (as 'wgAction')
authorRob Church <robchurch@users.mediawiki.org>
Tue, 27 Mar 2007 21:15:23 +0000 (21:15 +0000)
committerRob Church <robchurch@users.mediawiki.org>
Tue, 27 Mar 2007 21:15:23 +0000 (21:15 +0000)
RELEASE-NOTES
includes/DefaultSettings.php
includes/Skin.php

index 41d0e05..909f1c8 100644 (file)
@@ -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
index 995521a..8e2c202 100644 (file)
@@ -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:
index 7bbb026..d5477d0 100644 (file)
@@ -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(),