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
defined('APPLICATION_PATH')
|| define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/application'));
|| define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/application'));
// Define application environment
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
set_include_path(implode(PATH_SEPARATOR, array(
realpath(APPLICATION_PATH . '/../library'),
get_include_path(),
realpath(APPLICATION_PATH . '/../library'),
get_include_path(),
)));
/** Zend_Application */
@ -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';