openrat-cms

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

commit 0afd9b454b2df979f533b140e9b06ef92946a7f8
parent 68dfa039b74444af8044cfb27f8dd8cfaa7316fc
Author: dankert <devnull@localhost>
Date:   Thu, 11 Sep 2008 20:50:15 +0200

Korrektur Systemkommando-Ausfuehrung

Diffstat:
serviceClasses/Publish.class.php | 16+++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/serviceClasses/Publish.class.php b/serviceClasses/Publish.class.php @@ -103,13 +103,16 @@ class Publish $this->content_negotiation = ( $project->content_negotiation == '1' ); $this->cut_index = ( $project->cut_index == '1' ); - - $this->cmd_after_publish = $project->cmd_after_publish; + + if ( $conf_project['override_system_command'] && !empty($project->cmd_after_publish) ) + $this->cmd_after_publish = $project->cmd_after_publish; + else + $this->cmd_after_publish = $conf_project['system_command']; // Im Systemkommando Variablen ersetzen - str_replace('{name}' ,$project->name ,$this->cmd_after_publish); - str_replace('{dir}' ,$this->local_destdir ,$this->cmd_after_publish); - str_replace('{dirbase}',basename($this->local_destdir),$this->cmd_after_publish); + $this->cmd_after_publish = str_replace('{name}' ,$project->name ,$this->cmd_after_publish); + $this->cmd_after_publish = str_replace('{dir}' ,$this->local_destdir ,$this->cmd_after_publish); + $this->cmd_after_publish = str_replace('{dirbase}',basename($this->local_destdir),$this->cmd_after_publish); } @@ -134,9 +137,8 @@ class Publish $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) && + if ( is_file($dest) && filemtime($source) <= filemtime($dest) ) return;