$val = wfBoolToStr( $val );
}
- if ( !in_array( $c, $unescaped ) ) {
+ if ( !in_array( $c, $unescaped ) && $val !== null ) {
$val = self::escapePhpString( $val );
}
$locale = '';
}
- //$rightsUrl = $this->values['wgRightsUrl'] ? '' : '#'; // TODO: Fixme, I'm unused!
+ //$rightsUrl = $this->values['wgRightsUrl'] ? '' : '#'; // @todo FIXME: I'm unused!
$hashedUploads = $this->safeMode ? '' : '#';
$metaNamespace = '';
if ( $this->values['wgMetaNamespace'] !== $this->values['wgSitename'] ) {
}
}
+ $serverSetting = "";
+ if ( array_key_exists( 'wgServer', $this->values ) && $this->values['wgServer'] !== null ) {
+ $serverSetting = "\n## The protocol and server name to use in fully-qualified URLs\n";
+ $serverSetting .= "\$wgServer = \"{$this->values['wgServer']}\";\n";
+ }
+
switch ( $this->values['wgMainCacheType'] ) {
case 'anything':
case 'db':
}
$mcservers = $this->buildMemcachedServerList();
+
return "<?php
# This file was automatically generated by the MediaWiki {$GLOBALS['wgVersion']}
# installer. If you make manual changes, please keep track in case you
## http://www.mediawiki.org/wiki/Manual:Short_URL
\$wgScriptPath = \"{$this->values['wgScriptPath']}\";
\$wgScriptExtension = \"{$this->values['wgScriptExtension']}\";
-
-## The protocol and server name to use in fully-qualified URLs
-\$wgServer = \"{$this->values['wgServer']}\";
-
+${serverSetting}
## The relative URL path to the skins directory
\$wgStylePath = \"\$wgScriptPath/skins\";
{$groupRights}";
}
-
}