Merge "Factor out byte limit label logic from edit page to utility function"
[lhc/web/wiklou.git] / includes / Setup.php
index b61de73..5795517 100644 (file)
@@ -49,6 +49,10 @@ if ( !isset( $wgVersion ) ) {
 
 mb_internal_encoding( 'UTF-8' );
 
+// Set the configured locale on all requests for consisteny
+putenv( "LC_ALL=$wgShellLocale" );
+setlocale( LC_ALL, $wgShellLocale );
+
 // Set various default paths sensibly...
 $ps_default = Profiler::instance()->scopedProfileIn( $fname . '-defaults' );
 
@@ -177,6 +181,20 @@ $wgLockManagers[] = [
        'class' => 'NullLockManager',
 ];
 
+/**
+ * Default parameters for the "<gallery>" tag.
+ * @see DefaultSettings.php for description of the fields.
+ */
+$wgGalleryOptions += [
+       'imagesPerRow' => 0,
+       'imageWidth' => 120,
+       'imageHeight' => 120,
+       'captionLength' => true,
+       'showBytes' => true,
+       'showDimensions' => true,
+       'mode' => 'traditional',
+];
+
 /**
  * Initialise $wgLocalFileRepo from backwards-compatible settings
  */
@@ -403,6 +421,12 @@ if ( is_array( $wgExtraNamespaces ) ) {
        $wgCanonicalNamespaceNames = $wgCanonicalNamespaceNames + $wgExtraNamespaces;
 }
 
+// Merge in the legacy language codes, incorporating overrides from the config
+$wgDummyLanguageCodes += [
+       'qqq' => 'qqq', // Used for message documentation
+       'qqx' => 'qqx', // Used for viewing message keys
+] + $wgExtraLanguageCodes + LanguageCode::getDeprecatedCodeMapping();
+
 // These are now the same, always
 // To determine the user language, use $wgLang->getCode()
 $wgContLanguageCode = $wgLanguageCode;