* Fixed a diff isue on Windows
authorMichael Stucki <michael.stucki@typo3.org>
Fri, 8 Apr 2005 00:00:51 +0000 (00:00 +0000)
committerMichael Stucki <michael.stucki@typo3.org>
Fri, 8 Apr 2005 00:00:51 +0000 (00:00 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@611 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_diff.php

index fd85c3b..54ed119 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2005-04-08  Michael Stucki  <michael@typo3.org>
+
+       * Fixed bug #0000941: The diff feature was disabled on Windows but works fine if diff.exe is present and TYPO3_CONF_VARS[BE][diff_path] is correctly set
+
 2005-04-06  Kasper Skårhøj,,,  <kasper@typo3.com>
 
        * Removed all "unsigned" attributes from .sql files in the core and implemented a complete list of those fields for which it has been removed in the t3lib_install class. By default the install tool will NOT detect that these fields should be changed to signed integers since if the field is found in the list in the install class this difference will be ignored. The reason is that it will be 200+ ALTER TABLe changes and the significance is mostly cosmetic. However if somebody wants to actually do the conversion they can switch an internal variable in the t3lib_install class to TRUE and the install tool WILL convert...
index 4bbb5e7..d4de417 100755 (executable)
@@ -149,7 +149,7 @@ class t3lib_diff {
        }
 
        /**
-        * Produce a diff (with the "diff" application on unix) between two strings
+        * Produce a diff (using the "diff" application) between two strings
         * The function will write the two input strings to temporary files, then execute the diff program, delete the temp files and return the result.
         *
         * @param       string          String 1
@@ -158,22 +158,20 @@ class t3lib_diff {
         * @access private
         */
        function getDiff($str1,$str2)   {
-               if (TYPO3_OS!='WIN')    {
-                               // Create file 1 and write string
-                       $file1 = t3lib_div::tempnam('diff1_');
-                       t3lib_div::writeFile($file1,$str1);
-                               // Create file 2 and write string
-                       $file2 = t3lib_div::tempnam('diff2_');
-                       t3lib_div::writeFile($file2,$str2);
-                               // Perform diff.
-                       $cmd = $GLOBALS['TYPO3_CONF_VARS']['BE']['diff_path'].' '.$this->diffOptions.' '.$file1.' '.$file2;
-                       exec($cmd,$res);
-
-                       unlink($file1);
-                       unlink($file2);
-
-                       return $res;
-               }
+                       // Create file 1 and write string
+               $file1 = t3lib_div::tempnam('diff1_');
+               t3lib_div::writeFile($file1,$str1);
+                       // Create file 2 and write string
+               $file2 = t3lib_div::tempnam('diff2_');
+               t3lib_div::writeFile($file2,$str2);
+                       // Perform diff.
+               $cmd = $GLOBALS['TYPO3_CONF_VARS']['BE']['diff_path'].' '.$this->diffOptions.' '.$file1.' '.$file2;
+               exec($cmd,$res);
+
+               unlink($file1);
+               unlink($file2);
+
+               return $res;
        }
 
        /**