瀏覽代碼

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

refactoring
Guillaume Bourgeois 2 年之前
父節點
當前提交
86d11f7b4f
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. +3
    -2
      common/models/Document.php

+ 3
- 2
common/models/Document.php 查看文件

@@ -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]);

Loading…
取消
儲存