Merge "Add .pipeline/ with dev image variant"
[lhc/web/wiklou.git] / includes / installer / LocalSettingsGenerator.php
index bdaeaca..6921361 100644 (file)
@@ -30,6 +30,7 @@
 class LocalSettingsGenerator {
 
        protected $extensions = [];
+       protected $skins = [];
        protected $values = [];
        protected $groupPermissions = [];
        protected $dbSettings = '';
@@ -185,7 +186,7 @@ class LocalSettingsGenerator {
                        $jsonFile = 'skin.json';
                        $function = 'wfLoadSkin';
                } else {
-                       throw new InvalidArgumentException( '$dir was not "extensions" or "skins' );
+                       throw new InvalidArgumentException( '$dir was not "extensions" or "skins"' );
                }
 
                $encName = self::escapePhpString( $name );
@@ -299,6 +300,12 @@ class LocalSettingsGenerator {
                }
 
                $mcservers = $this->buildMemcachedServerList();
+               if ( file_exists( dirname( __DIR__ ) . '/PlatformSettings.php' ) ) {
+                       $platformSettings = "\n## Include platform/distribution defaults";
+                       $platformSettings .= "\nrequire_once \"\$IP/includes/PlatformSettings.php\";";
+               } else {
+                       $platformSettings = '';
+               }
 
                return "<?php
 # This file was automatically generated by the MediaWiki {$GLOBALS['wgVersion']}
@@ -316,6 +323,7 @@ class LocalSettingsGenerator {
 if ( !defined( 'MEDIAWIKI' ) ) {
        exit;
 }
+{$platformSettings}
 
 ## Uncomment this to disable output compression
 # \$wgDisableOutputCompression = true;
@@ -383,7 +391,7 @@ ${serverSetting}
 
 ## Set \$wgCacheDirectory to a writable directory on the web server
 ## to make your wiki go slightly faster. The directory should not
-## be publically accessible from the web.
+## be publicly accessible from the web.
 #\$wgCacheDirectory = \"\$IP/cache\";
 
 # Site language code, should be one of the list in ./languages/data/Names.php