From 62de3d1478e467c727554e0b33681fe719c94ed6 Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Sat, 26 Sep 2009 11:51:37 +0000 Subject: [PATCH] Add a {{STYLEPATH}} magic word; necessary for upcoming EditToolbar fix --- includes/MagicWord.php | 1 + includes/parser/Parser.php | 5 ++++- languages/messages/MessagesEn.php | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/includes/MagicWord.php b/includes/MagicWord.php index 991a286805..8877bac687 100644 --- a/includes/MagicWord.php +++ b/includes/MagicWord.php @@ -64,6 +64,7 @@ class MagicWord { 'server', 'servername', 'scriptpath', + 'stylepath', 'pagename', 'pagenamee', 'fullpagename', diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index 20af1c6a1a..7a9bb2a405 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -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': diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index d69784ad13..284a5bec59 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -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__'), -- 2.20.1