Fixed bug 4846: EM: inconsistent line ending
authorDmitry Dulepov <dmitry.dulepov@gmail.com>
Wed, 24 Jan 2007 14:16:01 +0000 (14:16 +0000)
committerDmitry Dulepov <dmitry.dulepov@gmail.com>
Wed, 24 Jan 2007 14:16:01 +0000 (14:16 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/branches/TYPO3_4-0@1937 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/mod/tools/em/class.em_index.php

index 4417d6e..89f7f20 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2007-01-24  Dmitry Dulepov  <dmitry@typo3.org>
+
+       * Fixed bug 4846: EM: inconsistent line ending
+
 2007-01-23  Michael Stucki  <michael@typo3.org>
 
        * Fixed bug #4643: File Upload did not recognize BE-User option "defaultFileUploads" (thanks to Benjamin Mack)
index 7076b8f..2855e78 100644 (file)
@@ -3791,9 +3791,9 @@ EXTENSION KEYS:
                $extInfo['EM_CONF']['_md5_values_when_last_written'] = serialize($this->serverExtensionMD5Array($extKey,$extInfo));
                $emConfFileContent = $this->construct_ext_emconf_file($extKey,$extInfo['EM_CONF']);
 
+               $absPath = $this->getExtPath($extKey,$extInfo['type']);
+               $emConfFileName = $absPath.'ext_emconf.php';
                if($emConfFileContent)  {
-                       $absPath = $this->getExtPath($extKey,$extInfo['type']);
-                       $emConfFileName = $absPath.'ext_emconf.php';
 
                        if(@is_file($emConfFileName))   {
                                if(t3lib_div::writeFile($emConfFileName,$emConfFileContent) === true) {
@@ -3835,7 +3835,7 @@ EXTENSION KEYS:
                $vDat = $this->renderVersion($EM_CONF['version']);
                $EM_CONF['version']=$vDat['version'];
 
-               return '<?php
+               $code = '<?php
 
 ########################################################################
 # Extension Manager/Repository config file for ext: "'.$extKey.'"
@@ -3850,6 +3850,7 @@ EXTENSION KEYS:
 $EM_CONF[$_EXTKEY] = '.$this->arrayToCode($EM_CONF, 0).';
 
 ?>';
+               return str_replace(chr(13), '', $code);
        }
 
        /**