diff --git a/fileRecv.php b/fileRecv.php index 2b7ba84..57c7675 100644 --- a/fileRecv.php +++ b/fileRecv.php @@ -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']; diff --git a/fileSend.php b/fileSend.php index 9c7c6e4..98860dd 100644 --- a/fileSend.php +++ b/fileSend.php @@ -57,7 +57,7 @@ if ( isset($opts->file) ) $optionsCopyAddDate = false; $optionsCopyDeleteAfter = false; $optionsRunWithEndFile = false; - $optionsLog = false; + $optionsLog = true; $optionsRoute = array(); $optionsFilterName = false; $repositoryDir = 'send';