Merge "Increase parity between api search and on-wiki search"
[lhc/web/wiklou.git] / maintenance / language / languages.inc
index 6e5b29d..9affb9e 100644 (file)
@@ -55,23 +55,16 @@ class Languages {
        /** @var array Magic words */
        protected $mMagicWords;
 
-       /** @var  array Special page aliases */
+       /** @var array Special page aliases */
        protected $mSpecialPageAliases;
 
        /**
         * Load the list of languages: all the Messages*.php
         * files in the languages directory.
-        *
-        * @param bool $exif Treat the Exif messages?
         */
-       function __construct( $exif = true ) {
-               require __DIR__ . '/messageTypes.inc';
-               $this->mIgnoredMessages = $wgIgnoredMessages;
-               if ( $exif ) {
-                       $this->mOptionalMessages = array_merge( $wgOptionalMessages );
-               } else {
-                       $this->mOptionalMessages = array_merge( $wgOptionalMessages, $wgEXIFMessages );
-               }
+       function __construct() {
+               Hooks::run( 'LocalisationIgnoredOptionalMessages',
+                       array( &$this->mIgnoredMessages, &$this->mOptionalMessages ) );
 
                $this->mLanguages = array_keys( Language::fetchLanguageNames( null, 'mwfile' ) );
                sort( $this->mLanguages );