X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FMagicWordFactory.php;h=4e9bfaf1f7e721bd61872b58a8c5c826acff7d57;hb=e8276e074fa8add2d66ce9a8a07eb62a0da112b6;hp=15a7678ffe41962dd3cc303416f2573b28f53bf5;hpb=07beacf802a2d1688e67114ce8aaf6fc7da90d05;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/MagicWordFactory.php b/includes/MagicWordFactory.php index 15a7678ffe..4e9bfaf1f7 100644 --- a/includes/MagicWordFactory.php +++ b/includes/MagicWordFactory.php @@ -173,6 +173,7 @@ class MagicWordFactory { 'newsectionlink', 'nonewsectionlink', 'hiddencat', + 'expectunusedcategory', 'index', 'noindex', 'staticredirect', @@ -192,8 +193,22 @@ class MagicWordFactory { /** @var MagicWordArray */ private $mDoubleUnderscoreArray = null; + /** @var Language */ + private $contLang; + /**#@-*/ + /** + * @param Language $contLang Content language + */ + public function __construct( Language $contLang ) { + $this->contLang = $contLang; + } + + public function getContentLanguage() { + return $this->contLang; + } + /** * Factory: creates an object representing an ID * @@ -203,7 +218,7 @@ class MagicWordFactory { */ public function get( $id ) { if ( !isset( $this->mObjects[$id] ) ) { - $mw = new MagicWord(); + $mw = new MagicWord( null, [], false, $this->contLang ); $mw->load( $id ); $this->mObjects[$id] = $mw; }