r14661 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r14660‎ | r14661 | r14662 >
Date:13:30, 8 June 2006
Author:robchurch
Status:old
Tags:
Comment:
(bug 5945) Introduce {{CONTENTLANGUAGE}} magic word
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/MagicWord.php (modified) (history)
  • /trunk/phase3/includes/Parser.php (modified) (history)
  • /trunk/phase3/languages/Language.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Parser.php
@@ -2249,6 +2249,9 @@
22502250 return $wgScriptPath;
22512251 case MAG_DIRECTIONMARK:
22522252 return $wgContLang->getDirMark();
 2253+ case MAG_CONTENTLANGUAGE:
 2254+ global $wgContLanguageCode;
 2255+ return $wgContLanguageCode;
22532256 default:
22542257 $ret = null;
22552258 if ( wfRunHooks( 'ParserGetVariableValueSwitch', array( &$this, &$varCache, &$index, &$ret ) ) )
Index: trunk/phase3/includes/MagicWord.php
@@ -92,6 +92,7 @@
9393 'MAG_CURRENTTIMESTAMP',
9494 'MAG_DIRECTIONMARK',
9595 'MAG_LANGUAGE',
 96+ 'MAG_CONTENTLANGUAGE',
9697 );
9798 if ( ! defined( 'MEDIAWIKI_INSTALL' ) )
9899 wfRunHooks( 'MagicWordMagicWords', array( &$magicWords ) );
@@ -146,6 +147,7 @@
147148 MAG_CURRENTTIMESTAMP,
148149 MAG_DIRECTIONMARK,
149150 MAG_LANGUAGE,
 151+ MAG_CONTENTLANGUAGE,
150152 );
151153 if ( ! defined( 'MEDIAWIKI_INSTALL' ) )
152154 wfRunHooks( 'MagicWordwgVariableIDs', array( &$wgVariableIDs ) );
Index: trunk/phase3/RELEASE-NOTES
@@ -459,6 +459,7 @@
460460 * (bug 6230) Regression fix: <nowiki> in [URL link text]
461461 * Added AutoLoader.php, which loads classes without need of require_once()
462462 * (bug 5981) Add plural function Slovenian (sl)
 463+* (bug 5945) Introduce {{CONTENTLANGUAGE}} magic word
463464
464465 == Compatibility ==
465466
Index: trunk/phase3/languages/Language.php
@@ -290,6 +290,7 @@
291291 MAG_CURRENTTIMESTAMP => array( 1, 'CURRENTTIMESTAMP' ),
292292 MAG_DIRECTIONMARK => array( 1, 'DIRECTIONMARK', 'DIRMARK' ),
293293 MAG_LANGUAGE => array( 0, '#LANGUAGE:' ),
 294+ MAG_CONTENTLANGUAGE => array( 1, 'CONTENTLANGUAGE', 'CONTENTLANG' ),
294295 );
295296
296297 if (!$wgCachedMessageArrays) {

Status & tagging log