issue #0001541 : Change URL to download file

This commit is contained in:
Michael RICOIS 2014-02-20 15:00:06 +00:00
parent dd0ba55866
commit 1af412c90b

View File

@ -419,11 +419,10 @@ class PiecesController extends Zend_Controller_Action
$c = Zend_Registry::get('config');
$file = 'bilan-'.$siren.'-'.$type.'-'.$dateCloture.'.pdf';
if (copy($stream->getStreamName(), $c->profil->path->files . '/' . $file)) {
$this->view->assign('url', $this->url(array(
$this->view->assign('url', $this->view->url(array(
'controller' => 'fichier',
'action' => 'bilan',
'q' => $file,
), null, true));
), null, true).'/'.$file);
} else {
$this->view->assign('msg', "Impossible de distribuer le fichier.");
}