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 = new Zend_Http_Client($url);
|
||||||
$client->setStream();
|
$client->setStream();
|
||||||
$response = $client->request('GET');
|
$response = $client->request('GET');
|
||||||
if ( $response->isSuccessful() && copy($response->getStreamName(), $this->path.'/'.$file) ) {
|
if ( $response->isSuccessful() ) {
|
||||||
return $file;
|
if ( copy($response->getStreamName(), $this->path.'/'.$file) ) {
|
||||||
} else {
|
return $file;
|
||||||
return false;
|
}
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
} catch (Zend_Http_Client_Exception $e) {
|
} catch (Zend_Http_Client_Exception $e) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user