* (bug 23848) Add {{ARTICLEPATH}} Magic Word

Apply my patch, as it seems to be working when I tried it this time
This commit is contained in:
Sam Reed 2010-08-05 15:21:15 +00:00
parent 5dd9a37af3
commit 5582aca1ed
4 changed files with 6 additions and 1 deletions

View 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

View file

@ -60,6 +60,7 @@ class MagicWord {
'numberofarticles',
'numberoffiles',
'numberofedits',
'articlepath',
'sitename',
'server',
'servername',

View 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':

View 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' ),