$this->installer = $installer;
$this->extensions = $installer->getVar( '_Extensions' );
+ $this->skins = $installer->getVar( '_Skins' );
$db = $installer->getDBInstaller( $installer->getVar( 'wgDBtype' ) );
/**
* Return the full text of the generated LocalSettings.php file,
- * including the extensions
+ * including the extensions and skins.
*
* @return string
*/
public function getText() {
$localSettings = $this->getDefaultText();
+ if ( count( $this->skins ) ) {
+ $localSettings .= "
+# Enabled skins.
+# The following skins were automatically enabled:\n";
+
+ foreach ( $this->skins as $skinName ) {
+ $encSkinName = self::escapePhpString( $skinName );
+ $localSettings .= "require_once \"\$IP/skins/$encSkinName/$encSkinName.php\";\n";
+ }
+
+ $localSettings .= "\n";
+ }
+
if ( count( $this->extensions ) ) {
$localSettings .= "
# Enabled Extensions. Most extensions are enabled by including the base extension file here
$encExtName = self::escapePhpString( $extName );
$localSettings .= "require_once \"\$IP/extensions/$encExtName/$encExtName.php\";\n";
}
+
+ $localSettings .= "\n";
}
- $localSettings .= "\n\n# End of automatically generated settings.
+ $localSettings .= "
+# End of automatically generated settings.
# Add more configuration options below.\n\n";
return $localSettings;
$locale = '';
}
- //$rightsUrl = $this->values['wgRightsUrl'] ? '' : '#'; // @todo FIXME: I'm unused!
$hashedUploads = $this->safeMode ? '' : '#';
$metaNamespace = '';
if ( $this->values['wgMetaNamespace'] !== $this->values['wgSitename'] ) {
wfBoolToStr( $perm ) . ";\n";
}
}
+ $groupRights .= "\n";
+
if ( ( isset( $this->groupPermissions['*']['edit'] ) &&
$this->groupPermissions['*']['edit'] === false )
&& ( isset( $this->groupPermissions['*']['createaccount'] ) &&
&& ( isset( $this->groupPermissions['*']['read'] ) &&
$this->groupPermissions['*']['read'] !== false )
) {
- $noFollow = "\n# Set \$wgNoFollowLinks to true if you open up your wiki to editing by\n"
+ $noFollow = "# Set \$wgNoFollowLinks to true if you open up your wiki to editing by\n"
. "# the general public and wish to apply nofollow to external links as a\n"
. "# deterrent to spammers. Nofollow is not a comprehensive anti-spam solution\n"
. "# and open wikis will generally require other anti-spam measures; for more\n"
. "# information, see https://www.mediawiki.org/wiki/Manual:Combating_spam\n"
- . "\$wgNoFollowLinks = false;";
+ . "\$wgNoFollowLinks = false;\n\n";
}
}
# web installer while LocalSettings.php is in place
\$wgUpgradeKey = \"{$this->values['wgUpgradeKey']}\";
-## Default skin: you can change the default skin. Use the internal symbolic
-## names, ie 'vector', 'monobook':
-\$wgDefaultSkin = \"{$this->values['wgDefaultSkin']}\";
-
## For attaching licensing metadata to pages, and displaying an
## appropriate copyright notice / icon. GNU Free Documentation
## License and Creative Commons licenses are supported so far.
# Path to the GNU diff3 utility. Used for conflict resolution.
\$wgDiff3 = \"{$this->values['wgDiff3']}\";
-{$groupRights}{$noFollow}";
+{$groupRights}{$noFollow}## Default skin: you can change the default skin. Use the internal symbolic
+## names, ie 'vector', 'monobook':
+\$wgDefaultSkin = \"{$this->values['wgDefaultSkin']}\";
+";
}
}