Backport code from production
This commit is contained in:
parent
9b91817aba
commit
d15b443a86
@ -54,11 +54,12 @@ class TelechargementController extends Zend_Controller_Action
|
||||
$client = new Zend_Http_Client($url);
|
||||
$client->setStream();
|
||||
$response = $client->request('GET');
|
||||
if ( $response->isSuccessful() && copy($response->getStreamName(), $this->path.'/'.$file) ) {
|
||||
if ( $response->isSuccessful() ) {
|
||||
if ( copy($response->getStreamName(), $this->path.'/'.$file) ) {
|
||||
return $file;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
} catch (Zend_Http_Client_Exception $e) {
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user