Skip to content

Commit

Permalink
Merge pull request #247 from dbarzin/dev
Browse files Browse the repository at this point in the history
fix get template
  • Loading branch information
dbarzin authored Jan 21, 2025
2 parents 8e16435 + 2b7970c commit 9f447f8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions app/Http/Controllers/ControlController.php
Original file line number Diff line number Diff line change
Expand Up @@ -1652,9 +1652,12 @@ public function template()
abort_if($control === null, Response::HTTP_NOT_FOUND, '404 Not Found');

// Get template file
$template_filename = storage_path('app/models/control_'.Auth::User()->language.'.docx');
$template_filename = storage_path('app/models/control_.docx');
if (! file_exists($template_filename)) {
$template_filename = storage_path('app/models/control.docx');
$template_filename = storage_path('app/models/control_'.Auth::User()->language.'.docx');
if (! file_exists($template_filename)) {
$template_filename = storage_path('app/models/control_en.docx');
}
}

// create templateProcessor
Expand Down

0 comments on commit 9f447f8

Please sign in to comment.