fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [8656] property: check for file move on remote


From: Sigurd Nes
Subject: [Fmsystem-commits] [8656] property: check for file move on remote
Date: Mon, 23 Jan 2012 15:24:29 +0000

Revision: 8656
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=8656
Author:   sigurdne
Date:     2012-01-23 15:24:28 +0000 (Mon, 23 Jan 2012)
Log Message:
-----------
property: check for file move on remote

Modified Paths:
--------------
    trunk/property/inc/cron/default/Import_fra_basware_X205.php

Modified: trunk/property/inc/cron/default/Import_fra_basware_X205.php
===================================================================
--- trunk/property/inc/cron/default/Import_fra_basware_X205.php 2012-01-23 
15:06:54 UTC (rev 8655)
+++ trunk/property/inc/cron/default/Import_fra_basware_X205.php 2012-01-23 
15:24:28 UTC (rev 8656)
@@ -301,11 +301,19 @@
 
                                                                if(fclose($fp))
                                                                {
-                                                                       echo 
"File remote: ".$file_remote." was copied to local: $file_local<br/>";
+                                                                       echo 
"File remote: {$file_remote} was copied to local: $file_local<br/>";
                                                                        if( 
ssh2_sftp_rename ($sftp, $file_remote, 
"{$directory_remote}/archive/{$file_name}" ))
                                                                        {
-                                                                               
echo "File remote: ".$file_remote." was moved to remote: 
{$directory_remote}/archive/{$file_name}<br/>";
+                                                                               
echo "File remote: {$file_remote} was moved to remote: 
{$directory_remote}/archive/{$file_name}<br/>";
                                                                        }
+                                                                       else
+                                                                       {
+                                                                               
echo "ERROR! File remote: {$file_remote} failed to move to remote: 
{$directory_remote}/archive/{$file_name}<br/>";
+                                                                               
if(unlink($file_local))
+                                                                               
{
+                                                                               
        echo "Lokal file was deleted: {$file_local}<br/>";
+                                                                               
}
+                                                                       }
                                                                }
                                                        }
                                                }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]