From 9b2f335444209e3dd1f6a68f1b17bd64d3ea1b18 Mon Sep 17 00:00:00 2001 From: Michael RICOIS Date: Tue, 6 May 2014 09:48:01 +0000 Subject: [PATCH] =?UTF-8?q?issue=20#0001946=20:=20Gestion=20du=20r=C3=A9pe?= =?UTF-8?q?rtoire=20de=20d=C3=A9pot?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fileRecv.php | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/fileRecv.php b/fileRecv.php index 16154d8..8cce634 100644 --- a/fileRecv.php +++ b/fileRecv.php @@ -75,22 +75,30 @@ if ( $result->count() > 0 ) { foreach ( $result as $item ) { $source = $c->profil->path->storage . - DIRECTORY_SEPARATOR . $item->client . - DIRECTORY_SEPARATOR . 'recv' . - DIRECTORY_SEPARATOR . $item->fileOut; + '/' . $item->client . + '/' . 'recv' . + '/' . $item->fileOut; + + /* + * ALTER TABLE `flux_fileout` ADD `depotDir` VARCHAR(20) NOT NULL COMMENT 'Répertoire de dépot du fichier si différent de ''recv''' AFTER `depotType`; + */ + $depotDir = 'recv'; + if ($item->depotDir != '') { + $depotDir = $item->depotDir; + } switch ($item->depotType) { case 'FTP': $dest = $c->profil->path->ftp . - DIRECTORY_SEPARATOR . $item->client . - DIRECTORY_SEPARATOR . 'recv' . - DIRECTORY_SEPARATOR . $item->fileOut; + '/' . $item->client . + '/' . $depotDir . + '/' . $item->fileOut; break; case 'SFTP': $dest = $c->profil->path->sftp . - DIRECTORY_SEPARATOR . $item->client . - DIRECTORY_SEPARATOR . 'recv' . - DIRECTORY_SEPARATOR . $item->fileOut; + '/' . $item->client . + '/' . $depotDir . + '/' . $item->fileOut; break; }