diff --git a/fileRecv.php b/fileRecv.php index 16b22c6..4658a3c 100644 --- a/fileRecv.php +++ b/fileRecv.php @@ -91,12 +91,6 @@ if ( $result->count() > 0 ) { DIRECTORY_SEPARATOR . 'recv' . DIRECTORY_SEPARATOR . $item->fileOut; - switch($item->client) { - case 'sfr': - $user = 'sfrbtr'; - break; - } - break; } @@ -114,7 +108,7 @@ if ( $result->count() > 0 ) { $txt.= "Mode de transmission : ".$item->typeDepot."\n"; $txt.= "Fichier : ".$item->fileOut."\n"; - $mail = new Zend_Mail(); + $mail = new Zend_Mail('UTF-8'); $tr = new Zend_Mail_Transport_Sendmail(); $mail->setDefaultTransport($tr); $mail->setBodyText($txt); diff --git a/fileSend.php b/fileSend.php index 990c47e..d36d55a 100644 --- a/fileSend.php +++ b/fileSend.php @@ -84,10 +84,10 @@ if ( isset($opts->file) ) * @todo : links to prestation table and file rules */ switch ($client) { - case 'sfr' : + case 'sfrbtr' : $prestation = 'FICH_RCE'; $filemask = array( - 'FICH_RCE_SCORE_*.csv', + 'FICH_RCE_SCORE_.*.csv', ); break; case 'gefacto': @@ -115,7 +115,7 @@ if ( isset($opts->file) ) $txt.= "Fichier : ".$opts->file."\n"; $txt.= "Nombre de Lignes : $nbLines\n"; - $mail = new Zend_Mail('utf-8'); + $mail = new Zend_Mail('UTF-8'); $tr = new Zend_Mail_Transport_Smtp('smtp.celeste.fr'); $mail->setDefaultTransport($tr); $mail->setBodyText($txt); @@ -146,9 +146,9 @@ if ( isset($opts->file) ) 'dateInsert' => date('YmdHis'), 'dateExecute' => '0000-00-00 00:00:00', )); - echo date('Y-m-dTH:i:s')." - Enregistrement client:$client fichier:$filename\n"; + echo date('Y-m-d H:i:s')." - Enregistrement client:$client fichier:$filename\n"; } catch (Zend_Db_Exception $e) { - echo date('Y-m-dTH:i:s')." - ERREUR Enregistrement client:$client fichier:$filename\n"; + echo date('Y-m-d H:i:s')." - ERREUR Enregistrement client:$client fichier:$filename\n"; } //Copie du fichier @@ -161,13 +161,13 @@ if ( isset($opts->file) ) } if ( copy($opts->file, $destDir. DIRECTORY_SEPARATOR . $filename) ) { - echo date('Y-m-dTH:i:s')." - Copie du fichier $filename dans $destDir\n"; + echo date('Y-m-d H:i:s')." - Copie du fichier $filename dans $destDir\n"; if ($copyOptionsDeleteAfter) { unlink($opts->file); } } else { - echo date('Y-m-dTH:i:s')." - ERREUR Copie du fichier $filename dans $destDir\n"; + echo date('Y-m-d H:i:s')." - ERREUR Copie du fichier $filename dans $destDir\n"; } } \ No newline at end of file diff --git a/scripts/build/incron/gefacto b/scripts/build/incron/gefacto index 7517121..ac49d3f 100644 --- a/scripts/build/incron/gefacto +++ b/scripts/build/incron/gefacto @@ -1 +1 @@ -/home/data/sftp/gefacto/send IN_CLOSE_WRITE /home/scores/sftp-mail.sh $# \ No newline at end of file +/home/data/sftp/gefacto/send IN_CLOSE_WRITE php /home/batchFlux/fileSend.php --debug --file $@/$# \ No newline at end of file diff --git a/scripts/build/incron/sfrbtr b/scripts/build/incron/sfrbtr index c34004a..7be4523 100644 --- a/scripts/build/incron/sfrbtr +++ b/scripts/build/incron/sfrbtr @@ -1 +1 @@ -/home/data/sftp/sfrbtr/send IN_CLOSE_WRITE php /home/batchFlux/fileSend.php --file $@/$# \ No newline at end of file +/home/data/sftp/sfrbtr/send IN_CLOSE_WRITE php /home/batchFlux/fileSend.php --debug --file $@/$# \ No newline at end of file