Merge "Remove use of strencode() in buildLike()"
[lhc/web/wiklou.git] / maintenance / language / languages.inc
index cc7b471..9c9b7ff 100644 (file)
@@ -28,7 +28,7 @@ class Languages {
        /** @var array List of languages */
        protected $mLanguages;
 
-       /** @var array Raw list of the messages in each language  */
+       /** @var array Raw list of the messages in each language */
        protected $mRawMessages;
 
        /** @var array Messages in each language (except for English), divided to groups */
@@ -61,17 +61,10 @@ class Languages {
        /**
         * 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() {
+               wfRunHooks( 'LocalisationIgnoredOptionalMessages',
+                       array( &$this->mIgnoredMessages, &$this->mOptionalMessages ) );
 
                $this->mLanguages = array_keys( Language::fetchLanguageNames( null, 'mwfile' ) );
                sort( $this->mLanguages );