From: Alexandre Emsenhuber Date: Wed, 12 May 2010 20:30:01 +0000 (+0000) Subject: Don't escape $wgRightsIcon since it may contain "{$wgScriptPath}" X-Git-Tag: 1.31.0-rc.0~36869 X-Git-Url: http://git.cyclocoop.org/wiki/Target_page?a=commitdiff_plain;h=2c12a712272bc84ca8ae00808f43335bfb4651d1;p=lhc%2Fweb%2Fwiklou.git Don't escape $wgRightsIcon since it may contain "{$wgScriptPath}" --- diff --git a/includes/installer/LocalSettingsGenerator.php b/includes/installer/LocalSettingsGenerator.php index 5d8684ffae..4267b44a88 100644 --- a/includes/installer/LocalSettingsGenerator.php +++ b/includes/installer/LocalSettingsGenerator.php @@ -24,6 +24,7 @@ class LocalSettingsGenerator { 'wgRightsText', 'wgRightsCode', 'wgMainCacheType', 'wgEnableUploads', 'wgMainCacheType', '_MemCachedServers', 'wgDBserver', 'wgDBuser', 'wgDBpassword' ), $db->getGlobalNames() ); + $unescaped = array( 'wgRightsIcon' ); $boolItems = array( 'wgEnableEmail', 'wgEnableUserEmail', 'wgEnotifUserTalk', 'wgEnotifWatchlist', 'wgEmailAuthentication', 'wgEnableUploads' ); foreach( $confItems as $c ) { @@ -31,12 +32,14 @@ class LocalSettingsGenerator { if( in_array( $c, $boolItems ) ) { $val = wfBoolToStr( $val ); } + if ( !in_array( $c, $unescaped ) ) { + $val = self::escapePhpString( $val ); + } $this->values[$c] = $val; } $this->dbSettings = $db->getLocalSettings(); $this->safeMode = $installer->getVar( '_SafeMode' ); $this->values['wgEmergencyContact'] = $this->values['wgPasswordSender']; - $this->values = wfArrayMap( array( 'LocalSettingsGenerator', 'escapePhpString' ), $this->values ); } public static function escapePhpString( $string ) {