colder Tue Aug 22 17:23:08 2006 UTC
Modified files: /phpdoc/scripts fix-whitespace.php Log: Don't touch files that need no modifications http://cvs.php.net/viewvc.cgi/phpdoc/scripts/fix-whitespace.php?r1=1.1&r2=1.2&diff_format=u Index: phpdoc/scripts/fix-whitespace.php diff -u phpdoc/scripts/fix-whitespace.php:1.1 phpdoc/scripts/fix-whitespace.php:1.2 --- phpdoc/scripts/fix-whitespace.php:1.1 Tue Aug 22 13:46:15 2006 +++ phpdoc/scripts/fix-whitespace.php Tue Aug 22 17:23:07 2006 @@ -17,7 +17,7 @@ | Etienne Kneuss <[EMAIL PROTECTED]> | +----------------------------------------------------------------------+ - $Id: fix-whitespace.php,v 1.1 2006/08/22 13:46:15 colder Exp $ + $Id: fix-whitespace.php,v 1.2 2006/08/22 17:23:07 colder Exp $ */ if (PHP_SAPI !== 'cli') { @@ -73,6 +73,7 @@ } $lines = file($fullpath_file); + $hash = sha1(implode('', $lines)); $tmp = ''; @@ -207,7 +208,7 @@ } elseif (strlen($tmp) < 40) { $log['error'][] = "ERROR: File ($file) is empty"; continue; - } else { + } elseif (sha1($tmp) !== $hash) { $fp = fopen($fullpath_file, 'w'); if ($fp) { if (fwrite($fp, $tmp)) {