Diverses correction après mise en prod
This commit is contained in:
parent
cb62af6a96
commit
3c1d77f9a6
@ -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);
|
||||
|
14
fileSend.php
14
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";
|
||||
}
|
||||
}
|
@ -1 +1 @@
|
||||
/home/data/sftp/gefacto/send IN_CLOSE_WRITE /home/scores/sftp-mail.sh $#
|
||||
/home/data/sftp/gefacto/send IN_CLOSE_WRITE php /home/batchFlux/fileSend.php --debug --file $@/$#
|
@ -1 +1 @@
|
||||
/home/data/sftp/sfrbtr/send IN_CLOSE_WRITE php /home/batchFlux/fileSend.php --file $@/$#
|
||||
/home/data/sftp/sfrbtr/send IN_CLOSE_WRITE php /home/batchFlux/fileSend.php --debug --file $@/$#
|
Loading…
Reference in New Issue
Block a user