* (bug 23848) Add {{ARTICLEPATH}} Magic Word
authorSam Reed <reedy@users.mediawiki.org>
Thu, 5 Aug 2010 15:21:15 +0000 (15:21 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Thu, 5 Aug 2010 15:21:15 +0000 (15:21 +0000)
Apply my patch, as it seems to be working when I tried it this time

RELEASE-NOTES
includes/MagicWord.php
includes/parser/Parser.php
languages/messages/MessagesEn.php

index 1103595..7fc3fdc 100644 (file)
@@ -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
index dfc3e4f..133afb3 100644 (file)
@@ -60,6 +60,7 @@ class MagicWord {
                'numberofarticles',
                'numberoffiles',
                'numberofedits',
+               'articlepath',
                'sitename',
                'server',
                'servername',
index 961974b..5eb2b6c 100644 (file)
@@ -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':
index 26c04e8..3c13c1b 100644 (file)
@@ -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'             ),