Commit a072fd54 authored by Michael Stucki's avatar Michael Stucki
Browse files

* Fixed a diff isue on Windows


git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@611 709f56b5-9817-0410-a4d7-c38de5d9e867
parent 729a9e93
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...
......
......@@ -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;
}
/**
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment