Check file exist

This commit is contained in:
Michael RICOIS 2014-12-09 09:12:40 +00:00
parent f3ba67be30
commit 275c302020

View File

@ -454,7 +454,7 @@ class ReportController extends Zend_Controller_Action
}
$row = $commandM->fetchRow($where);
if ( $row==null ) {
if ( $row === null ) {
$this->view->msg = "Commande introuvable !";
} else {
@ -477,26 +477,24 @@ class ReportController extends Zend_Controller_Action
$links = array();
if ( file_exists($pathCmd . DIRECTORY_SEPARATOR . $row->cmdId . '.html') ) {
//Define links to get the HTML and/or PDF
$links[] = array(
'title' => 'Fichier PDF',
'desc' => 'Télécharger le bilan financier',
'url' => $this->view->url(array(
'controller'=>'delivery',
'action'=>'pdf',
'id' => $row->cmdId))
);
//Facture
$links[] = array(
'title' => 'Facture',
'desc' => 'Télécharger votre facture',
'url' => $this->view->url(array(
'controller'=>'delivery',
'action'=>'bill',
'id' => $row->cmdId))
);
}
//Define links to get the HTML and/or PDF
$links[] = array(
'title' => 'Fichier PDF',
'desc' => 'Télécharger le bilan financier',
'url' => $this->view->url(array(
'controller'=>'delivery',
'action'=>'pdf',
'id' => $row->cmdId))
);
//Facture
$links[] = array(
'title' => 'Facture',
'desc' => 'Télécharger votre facture',
'url' => $this->view->url(array(
'controller'=>'delivery',
'action'=>'bill',
'id' => $row->cmdId))
);
$this->view->links = $links;
$this->view->CmdValide = true;