Add a {{STYLEPATH}} magic word; necessary for upcoming EditToolbar fix
authorRoan Kattouw <catrope@users.mediawiki.org>
Sat, 26 Sep 2009 11:51:37 +0000 (11:51 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Sat, 26 Sep 2009 11:51:37 +0000 (11:51 +0000)
includes/MagicWord.php
includes/parser/Parser.php
languages/messages/MessagesEn.php

index 991a286..8877bac 100644 (file)
@@ -64,6 +64,7 @@ class MagicWord {
                'server',
                'servername',
                'scriptpath',
+               'stylepath',
                'pagename',
                'pagenamee',
                'fullpagename',
index 20af1c6..7a9bb2a 100644 (file)
@@ -2298,7 +2298,8 @@ class Parser
         * @private
         */
        function getVariableValue( $index, $frame=false ) {
-               global $wgContLang, $wgSitename, $wgServer, $wgServerName, $wgScriptPath;
+               global $wgContLang, $wgSitename, $wgServer, $wgServerName;
+               global $wgScriptPath, $wgStylePath;
 
                /**
                 * Some of these require message or data lookups and can be
@@ -2513,6 +2514,8 @@ class Parser
                                return $wgServerName;
                        case 'scriptpath':
                                return $wgScriptPath;
+                       case 'stylepath':
+                               return $wgStylePath;
                        case 'directionmark':
                                return $wgContLang->getDirMark();
                        case 'contentlanguage':
index d69784a..284a5be 100644 (file)
@@ -297,6 +297,7 @@ $magicWords = array(
        'server'                 => array( 0,    'SERVER'                 ),
        'servername'             => array( 0,    'SERVERNAME'             ),
        'scriptpath'             => array( 0,    'SCRIPTPATH'             ),
+       'stylepath'              => array( 0,    'STYLEPATH'              ),
        'grammar'                => array( 0,    'GRAMMAR:'               ),
        'gender'                 => array( 0,    'GENDER:'                ),
        'notitleconvert'         => array( 0,    '__NOTITLECONVERT__', '__NOTC__'),