openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 62e75623f86bb371107faf911503de9296489f21
parent 6bf57b859e3345efbfb5c2228d480ac4f5b0be28
Author: dankert <devnull@localhost>
Date:   Tue, 11 Dec 2007 01:19:04 +0100

Dateien nicht kopieren, wenn Quell- und Zieldatei gleich gro? und Quelldatei nicht neuer als die Zieldatei.

Diffstat:
serviceClasses/Publish.class.php | 10+++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/serviceClasses/Publish.class.php b/serviceClasses/Publish.class.php @@ -132,6 +132,13 @@ class Publish if ( $this->with_local ) { $dest = $this->local_destdir.'/'.$dest_filename; + + // Nicht kopieren, wenn + // - Quell- und Zieldatei gleich groß und + // - Quelldatei nicht neuer als die Zieldatei + if ( filesize($source) == filesize($dest) && + filemtime($source) <= filemtime($dest) ) + return; if (!@copy( $source,$dest )); { @@ -240,7 +247,8 @@ class Publish if ( $rc != 0 ) // Wenn Returncode ungleich 0, dann Ausgabe ins Log schreiben und Fehler melden. { - $this->log = $ausgabe; + $this->log = $ausgabe; + $this->log[] = 'OpenRat: System command failed - returncode is '.$rc; $this->ok = false; } }