RE: [PHP-DOC] cvs: phpdoc /scripts fix-whitespace.php

From: Date: Tue, 22 Aug 2006 14:55:49 +0000
Subject: RE: [PHP-DOC] cvs: phpdoc /scripts fix-whitespace.php
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969373796@lists.php.net to get a copy of this message
Just looking at this script. I notice that even when there is no physical change to a file (binary comparison results in identical file), the script still says the file was changed and a datetimestamp update is performed (I'm on windows). This means that files metadata are altered when they shouldn't be. Really minor patch. May be better ways ... Index: fix-whitespace.php =================================================================== RCS file: /repository/phpdoc/scripts/fix-whitespace.php,v retrieving revision 1.1 diff -u -r1.1 fix-whitespace.php --- fix-whitespace.php 22 Aug 2006 13:46:15 -0000 1.1 +++ fix-whitespace.php 22 Aug 2006 14:53:32 -0000 @@ -76,6 +76,8 @@ $tmp = ''; + // Get a hash for the data that has been read. + $s_OrigMD5 = md5(implode('', $lines)); // start a state machine through the lines @@ -207,7 +209,7 @@ } elseif (strlen($tmp) < 40) { $log['error'][] = "ERROR: File ($file) is empty"; continue; - } else { + } elseif (md5($tmp) !== $s_OrigMD5) { $fp = fopen($fullpath_file, 'w'); if ($fp) { if (fwrite($fp, $tmp)) { -----Original Message----- From: Etienne Kneuss [mailto:colder@php.net] Sent: 22 August 2006 14:46 To: phpdoc@lists.php.net Subject: [PHP-DOC] cvs: phpdoc /scripts fix-whitespace.php colder Tue Aug 22 13:46:15 2006 UTC Added files: /phpdoc/scripts fix-whitespace.php Log: Script fixing whitespaces issues to prepare the documentation to the new style

« previous php.doc (#969373796) next »