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

@ -7,16 +7,16 @@
// Define path to application directory // Define path to application directory
defined('APPLICATION_PATH') defined('APPLICATION_PATH')
|| define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/application')); || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/application'));
// Define application environment // Define application environment
defined('APPLICATION_ENV') defined('APPLICATION_ENV')
|| define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production')); || define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));
// Ensure library/ is on include_path // Ensure library/ is on include_path
set_include_path(implode(PATH_SEPARATOR, array( set_include_path(implode(PATH_SEPARATOR, array(
realpath(APPLICATION_PATH . '/../library'), realpath(APPLICATION_PATH . '/../library'),
get_include_path(), get_include_path(),
))); )));
/** Zend_Application */ /** Zend_Application */
@ -79,22 +79,22 @@ if ( $result->count() > 0 ) {
'/' . 'recv' . '/' . 'recv' .
'/' . $item->fileOut; '/' . $item->fileOut;
$depotDir = 'recv'; $fluxRepository = 'recv';
if ($item->depotDir != '') { if ($item->depotDir != '') {
$depotDir = $item->depotDir; $fluxRepository = $item->depotDir;
} }
switch ($item->depotType) { switch ($item->depotType) {
case 'FTP': case 'FTP':
$dest = $c->profil->path->ftp . $dest = $c->profil->path->ftp .
'/' . $item->client . '/' . $item->client .
'/' . $depotDir . '/' . $fluxRepository .
'/' . $item->fileOut; '/' . $item->fileOut;
break; break;
case 'SFTP': case 'SFTP':
$dest = $c->profil->path->sftp . $dest = $c->profil->path->sftp .
'/' . $item->client . '/' . $item->client .
'/' . $depotDir . '/' . $fluxRepository .
'/' . $item->fileOut; '/' . $item->fileOut;
break; break;
@ -115,6 +115,7 @@ if ( $result->count() > 0 ) {
foreach ($clientPrestations as $i => $p) foreach ($clientPrestations as $i => $p)
{ {
// Not default repository dir // Not default repository dir
$repositoryDir = 'recv';
if (array_key_exists('directory', $p) && !empty($p['directory'])) if (array_key_exists('directory', $p) && !empty($p['directory']))
{ {
$repositoryDir = $p['directory']; $repositoryDir = $p['directory'];

View File

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