Bilansext : Diverses corrections
This commit is contained in:
parent
4efa250eb2
commit
1681173277
@ -53,7 +53,7 @@ $db = Zend_Db::factory($c->profil->db->metier);
|
||||
Zend_Db_Table_Abstract::setDefaultAdapter($db);
|
||||
|
||||
$pathSend = $c->profil->path->storage . '/clients/bilansext/send';
|
||||
$pathBackup = $c->profil->path->storage . '/clients/bilansext/done';
|
||||
$pathBackup = $c->profil->path->storage . '/clients/bilansext/send/done';
|
||||
|
||||
// Lecture du dossier des dépots de bilans à demander en saisie
|
||||
if ($opts->source == 'extranet')
|
||||
@ -69,13 +69,12 @@ if ($opts->source == 'extranet')
|
||||
{
|
||||
$filetime = date('YmdHis', filectime($pathSend.'/'.$filename));
|
||||
|
||||
|
||||
$siren = $t[0];
|
||||
$cloture = $t[1];
|
||||
$duree = $t[2];
|
||||
$confidentiel = $t[2];
|
||||
$userId = $t[4];
|
||||
$extranetId = $t[5];
|
||||
$siren = $t[1];
|
||||
$cloture = $t[2];
|
||||
$duree = $t[3];
|
||||
$confidentiel = $t[4];
|
||||
$userId = $t[5];
|
||||
$extranetId = $t[6];
|
||||
|
||||
if ( false !== ( $file = file_get_contents($pathSend.'/'.$filename) ) )
|
||||
{
|
||||
@ -115,8 +114,8 @@ if ($opts->source == 'extranet')
|
||||
|
||||
//Copier le fichier
|
||||
if ($insertOk === true) {
|
||||
if (!copy($pathSend.'/'.$filename, $pathBackup.'/'.$filename)) {
|
||||
echo date('Y-m-d H:i:s') ." - Impossible de copier le fichier $filename.\n";
|
||||
if (!rename($pathSend.'/'.$filename, $pathBackup.'/'.$filename)) {
|
||||
echo date('Y-m-d H:i:s') ." - Impossible de déplacer le fichier $filename.\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user