Nombre de lignes + correction chemin des fichiers
This commit is contained in:
parent
a67437a3d1
commit
805d6b6eaa
@ -97,6 +97,9 @@ if ( $result->count() > 0 ) {
|
||||
|
||||
if ( copy($source, $dest) ) {
|
||||
|
||||
$lines = file($source);
|
||||
$nbLines = count($lines);
|
||||
|
||||
chown($dest, $item->client);
|
||||
|
||||
$fluxM->update(array(
|
||||
@ -108,6 +111,7 @@ if ( $result->count() > 0 ) {
|
||||
$txt.= "Client : ".$item->client."\n";
|
||||
$txt.= "Mode de transmission : ".$item->depotType."\n";
|
||||
$txt.= "Fichier : ".$item->fileOut."\n";
|
||||
$txt.= "Nombre de Lignes : $nbLines\n";
|
||||
|
||||
$mail = new Zend_Mail('UTF-8');
|
||||
$tr = new Zend_Mail_Transport_Sendmail();
|
||||
|
@ -100,9 +100,12 @@ if ( isset($opts->file) )
|
||||
$extensionLength = 0;
|
||||
if ($extension!='') {
|
||||
$extensionLength = strlen($extension)+1;
|
||||
$filename = substr($filename, 0, strlen($filename)-$extensionLength);
|
||||
$filename = $filename . '_' . date('YmdHis') . '.' . $extension;
|
||||
} else {
|
||||
$filename = $filename . '_' . date('YmdHis');
|
||||
}
|
||||
$filename = substr($filename, 0, $extensionLength);
|
||||
$filename = $filename . '_' . date('YmdHis') . '.' . $extension ;
|
||||
|
||||
}
|
||||
|
||||
//Prepare mail
|
||||
@ -157,7 +160,7 @@ if ( isset($opts->file) )
|
||||
DIRECTORY_SEPARATOR . 'send';
|
||||
|
||||
if ( !is_dir($destDir) ) {
|
||||
mkdir($destDir, null, true);
|
||||
mkdir($destDir, 0755, true);
|
||||
}
|
||||
|
||||
if ( copy($opts->file, $destDir. DIRECTORY_SEPARATOR . $filename) ) {
|
||||
|
Loading…
Reference in New Issue
Block a user