Infogreffe : Destination was not set correctly

This commit is contained in:
Michael RICOIS 2016-02-17 10:09:33 +00:00
parent de9e392d92
commit 0447dd7692

View File

@ -462,14 +462,14 @@ class Pieces extends Scores_Ws_Server
$c = Zend_Registry::get('config');
$file = null;
$dest = $c->profil->path->shared . '/files/' . basename($file);
if ( file_exists($c->profil->infogreffe->storage->path . '/OCR/' . $pdf) ) {
$file = $c->profil->infogreffe->storage->path . '/OCR/' . $pdf;
} elseif ( file_exists($c->profil->infogreffe->storage->path . '/' . $pdf) ) {
$file = $c->profil->infogreffe->storage->path . '/' . $pdf;
}
$dest = $c->profil->path->shared . '/files/' . basename($file);
if ( $file !== null && copy($file, $dest)) {
if ( $file !== null && copy($file, $dest) ) {
$hostname = 'http://'.$_SERVER['SERVER_NAME'];
if ( $_SERVER['SERVER_PORT'] != '80' ) {
$hostname.= ':'.$_SERVER['SERVER_PORT'];
@ -642,12 +642,12 @@ class Pieces extends Scores_Ws_Server
$c = Zend_Registry::get('config');
$file = null;
$dest = $c->profil->path->shared . '/files/' . basename($file);
if ( file_exists($c->profil->infogreffe->storage->path . '/OCR/' . $pdf) ) {
$file = $c->profil->infogreffe->storage->path . '/OCR/' . $pdf;
} elseif ( file_exists($c->profil->infogreffe->storage->path . '/' . $pdf) ) {
$file = $c->profil->infogreffe->storage->path . '/' . $pdf;
}
$dest = $c->profil->path->shared . '/files/' . basename($file);
if ( $file !== null && copy($file, $dest)) {