Backport code from production

This commit is contained in:
Michael RICOIS 2014-03-12 14:12:41 +00:00
parent 9b91817aba
commit d15b443a86

View File

@ -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;
} }