summaryrefslogtreecommitdiff
path: root/includes/installer/LocalSettingsGenerator.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/installer/LocalSettingsGenerator.php')
-rw-r--r--includes/installer/LocalSettingsGenerator.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/includes/installer/LocalSettingsGenerator.php b/includes/installer/LocalSettingsGenerator.php
index 5c803d3e..53939826 100644
--- a/includes/installer/LocalSettingsGenerator.php
+++ b/includes/installer/LocalSettingsGenerator.php
@@ -145,7 +145,12 @@ class LocalSettingsGenerator {
$ip = $this->installer->getVar( 'IP' );
foreach ( $this->extensions as $ext) {
- $path = str_replace( $ip, '$IP', $extensions[$ext]['path'] );
+ $path = str_replace( $ip, '', $extensions[$ext]['path'] );
+ $prefix = '';
+ if ( $path !== $extensions[$ext]['path'] ) {
+ $prefix = '$IP';
+ }
+ $path = $prefix . self::escapePhpString( $path );
$localSettings .= "require_once \"$path\";\n";
}
}