commit 17f5cb5ac126e31ae0852c2f95d8581f5fde5e2e
parent cf04eef10ae66438728b0198b67c70a09d735707
Author: dankert <devnull@localhost>
Date: Mon, 5 Jul 2010 23:13:17 +0200
Beim Veröffentlichen das Modification-Datum der Datei setzen, damit Sync-Skripte die Datei nicht unnötig kopieren müssen.
Diffstat:
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/objectClasses/File.class.php b/objectClasses/File.class.php
@@ -646,7 +646,7 @@ EOF
$this->publish = new Publish();
$this->write();
- $this->publish->copy( $this->tmpfile(),$this->full_filename() );
+ $this->publish->copy( $this->tmpfile(),$this->full_filename(),$this->lastchangeDate );
$this->publish->publishedObjects[] = $this->getProperties();
}
diff --git a/serviceClasses/Publish.class.php b/serviceClasses/Publish.class.php
@@ -179,7 +179,7 @@ class Publish
* @param String $tmp_filename
* @param String $dest_filename
*/
- function copy( $tmp_filename,$dest_filename )
+ function copy( $tmp_filename,$dest_filename,$lastChangeDate=null )
{
if ( !$this->ok)
return;
@@ -204,6 +204,8 @@ class Publish
$this->log[] = 'destination: '.$dest;
return; // Fehler beim Kopieren, also abbrechen.
}
+ if ( ! is_null($lastChangeDate) )
+ touch( $dest,$lastChangeDate );
}
if (!empty($conf['security']['chmod']))