fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [7929] property: import testing


From: Sigurd Nes
Subject: [Fmsystem-commits] [7929] property: import testing
Date: Mon, 24 Oct 2011 16:16:51 +0000

Revision: 7929
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=7929
Author:   sigurdne
Date:     2011-10-24 16:16:50 +0000 (Mon, 24 Oct 2011)
Log Message:
-----------
property: import testing

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 2011-10-24 
15:52:56 UTC (rev 7928)
+++ trunk/property/inc/cron/default/Import_fra_basware_X205.php 2011-10-24 
16:16:50 UTC (rev 7929)
@@ -253,7 +253,7 @@
                                        $sftp = @ssh2_sftp($connection);
 
                                        // Scan directory
-                                       $arr = array();
+                                       $files = array();
                                        echo "Scanning 
{$directory_remote}<br/>";
                                        $dir = 
"ssh2.sftp://$sftp$directory_remote";;
                                        $handle = opendir($dir);
@@ -273,21 +273,20 @@
                                                @fclose($stream);
                                                echo "CONTENTS: 
$contents<br/><br/>";
 */
-                                               $arr[] = $file;
+                                               $files[] = $file;
                                        }
 
                                        if ($this->debug)
                                        {
-                                               _debug_array($arr);
+                                               _debug_array($files);
                                        }
                                        else
                                        {
-                                               $total_files=count($arr);
-                                               for($i=0;$i<$total_files;$i++)
+                                               foreach($files as $file_name)
                                                {
-                                                       
$file_name=trim($arr[$i]);
-                                                       if($file_name!='' && 
stripos( $file_name, 'x205' ) === 0)
+                                                       if( stripos( 
$file_name, 'x205' ) === 0)
                                                        {
+_debug_array($file_name);
                                                                $file_remote = 
"{$directory_remote}/{$file_name}";         
                                                                $file_local = 
"{$directory_local}/{$file_name}";
                                                                
if(ssh2_scp_recv($connection, $file_remote,$file_local))




reply via email to

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