From 96dfddaec2db64ec9eb60e5fcc79a8f7bfb8f96a Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Fri, 19 Nov 2010 01:31:16 +0000 Subject: [PATCH] * In CoreInstaller, fixed notice when extensions are present, due to incorrect format of extensions callback entry * In LocalSettingsGenerator, fixed PHP escaping of extension name. --- includes/installer/CoreInstaller.php | 2 +- includes/installer/LocalSettingsGenerator.php | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/includes/installer/CoreInstaller.php b/includes/installer/CoreInstaller.php index acdef848b0..24b410c550 100644 --- a/includes/installer/CoreInstaller.php +++ b/includes/installer/CoreInstaller.php @@ -314,7 +314,7 @@ abstract class CoreInstaller extends Installer { ); if( count( $this->getVar( '_Extensions' ) ) ) { array_unshift( $installSteps, - array( 'extensions', array( $this, 'includeExtensions' ) ) + array( 'name' => 'extensions', 'callback' => array( $this, 'includeExtensions' ) ) ); } foreach( $installSteps as $idx => $stepObj ) { diff --git a/includes/installer/LocalSettingsGenerator.php b/includes/installer/LocalSettingsGenerator.php index 820729dddb..e3eb957101 100644 --- a/includes/installer/LocalSettingsGenerator.php +++ b/includes/installer/LocalSettingsGenerator.php @@ -112,8 +112,9 @@ class LocalSettingsGenerator { if( count( $this->extensions ) ) { $localSettings .= "\n# The following extensions were automatically enabled:\n"; - foreach( $this->extensions as $ext ) { - $localSettings .= "require( 'extensions/$ext/$ext.php' );\n"; + foreach( $this->extensions as $extName ) { + $encExtName = self::escapePhpString( $extName ); + $localSettings .= "require( \"extensions/$encExtName/$encExtName.php\" );\n"; } } -- 2.20.1