Explorar el Código

[Backend] Documents : regénération du document à chaque affichage

refactoring
Guillaume Bourgeois hace 2 años
padre
commit
86d11f7b4f
Se han modificado 1 ficheros con 3 adiciones y 2 borrados
  1. +3
    -2
      common/models/Document.php

+ 3
- 2
common/models/Document.php Ver fichero

@@ -285,9 +285,10 @@ class Document extends ActiveRecordCommon
{
$filenameComplete = $this->getFilenameComplete();

if (!file_exists($filenameComplete)) {
/*if (!file_exists($filenameComplete)) {
$this->generatePdf(Pdf::DEST_FILE);
}
}*/
$this->generatePdf(Pdf::DEST_FILE);

if (file_exists($filenameComplete)) {
return Yii::$app->response->sendFile($filenameComplete, $this->getFilename(), ['inline' => true]);

Cargando…
Cancelar
Guardar