Correction

This commit is contained in:
Michael RICOIS 2015-07-02 14:57:29 +00:00
parent 3d20d60687
commit 769778cfc3
2 changed files with 10 additions and 9 deletions

View File

@ -79,22 +79,22 @@ if ( $result->count() > 0 ) {
'/' . 'recv' .
'/' . $item->fileOut;
$depotDir = 'recv';
$fluxRepository = 'recv';
if ($item->depotDir != '') {
$depotDir = $item->depotDir;
$fluxRepository = $item->depotDir;
}
switch ($item->depotType) {
case 'FTP':
$dest = $c->profil->path->ftp .
'/' . $item->client .
'/' . $depotDir .
'/' . $fluxRepository .
'/' . $item->fileOut;
break;
case 'SFTP':
$dest = $c->profil->path->sftp .
'/' . $item->client .
'/' . $depotDir .
'/' . $fluxRepository .
'/' . $item->fileOut;
break;
@ -115,6 +115,7 @@ if ( $result->count() > 0 ) {
foreach ($clientPrestations as $i => $p)
{
// Not default repository dir
$repositoryDir = 'recv';
if (array_key_exists('directory', $p) && !empty($p['directory']))
{
$repositoryDir = $p['directory'];

View File

@ -57,7 +57,7 @@ if ( isset($opts->file) )
$optionsCopyAddDate = false;
$optionsCopyDeleteAfter = false;
$optionsRunWithEndFile = false;
$optionsLog = false;
$optionsLog = true;
$optionsRoute = array();
$optionsFilterName = false;
$repositoryDir = 'send';