From: Tim Starling Date: Fri, 19 Nov 2010 01:31:16 +0000 (+0000) Subject: * In CoreInstaller, fixed notice when extensions are present, due to incorrect format... X-Git-Tag: 1.31.0-rc.0~33819 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/?a=commitdiff_plain;h=96dfddaec2db64ec9eb60e5fcc79a8f7bfb8f96a;p=lhc%2Fweb%2Fwiklou.git * In CoreInstaller, fixed notice when extensions are present, due to incorrect format of extensions callback entry * In LocalSettingsGenerator, fixed PHP escaping of extension name. --- 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"; } }