From 5582aca1ed2362eaf6777f9e1987d06dfc8ab9ea Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Thu, 5 Aug 2010 15:21:15 +0000 Subject: [PATCH] * (bug 23848) Add {{ARTICLEPATH}} Magic Word Apply my patch, as it seems to be working when I tried it this time --- RELEASE-NOTES | 1 + includes/MagicWord.php | 1 + includes/parser/Parser.php | 4 +++- languages/messages/MessagesEn.php | 1 + 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 1103595b9b..7fc3fdc50f 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -132,6 +132,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN ** (bug 1211) Subcategories, ordinary pages, and files now page separately. ** When several pages are given the same sort key, they sort by their names instead of randomly. +* (bug 23848) Add {{ARTICLEPATH}} Magic Word === Bug fixes in 1.17 === * (bug 17560) Half-broken deletion moved image files to deletion archive diff --git a/includes/MagicWord.php b/includes/MagicWord.php index dfc3e4f698..133afb39ed 100644 --- a/includes/MagicWord.php +++ b/includes/MagicWord.php @@ -60,6 +60,7 @@ class MagicWord { 'numberofarticles', 'numberoffiles', 'numberofedits', + 'articlepath', 'sitename', 'server', 'servername', diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index 961974b345..5eb2b6c855 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -2497,7 +2497,7 @@ class Parser { */ function getVariableValue( $index, $frame=false ) { global $wgContLang, $wgSitename, $wgServer, $wgServerName; - global $wgScriptPath, $wgStylePath; + global $wgArticlePath, $wgScriptPath, $wgStylePath; /** * Some of these require message or data lookups and can be @@ -2771,6 +2771,8 @@ class Parser { case 'currentversion': $value = SpecialVersion::getVersion(); break; + case 'articlepath': + return $wgArticlePath; case 'sitename': return $wgSitename; case 'server': diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 26c04e85ef..3c13c1b3bc 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -295,6 +295,7 @@ $magicWords = array( 'nse' => array( 0, 'NSE:' ), 'localurl' => array( 0, 'LOCALURL:' ), 'localurle' => array( 0, 'LOCALURLE:' ), + 'articlepath' => array( 0, 'ARTICLEPATH' ), 'server' => array( 0, 'SERVER' ), 'servername' => array( 0, 'SERVERNAME' ), 'scriptpath' => array( 0, 'SCRIPTPATH' ), -- 2.20.1