File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -878,7 +878,8 @@ public function getFooterTemplate(): DataResponse {
878878 public function saveFooterTemplate (string $ template = '' , int $ width = 595 , int $ height = 50 ) {
879879 try {
880880 $ this ->footerService ->saveTemplate ($ template );
881- $ pdf = $ this ->footerService ->renderPreviewPdf ($ template , $ width , $ height );
881+ // Template was already persisted above; avoid a second save that can revert policy flags.
882+ $ pdf = $ this ->footerService ->renderPreviewPdf ('' , $ width , $ height );
882883
883884 return new DataDownloadResponse ($ pdf , 'footer-preview.pdf ' , 'application/pdf ' );
884885 } catch (\Exception $ e ) {
Original file line number Diff line number Diff line change @@ -22,6 +22,11 @@ public function __construct(
2222 }
2323
2424 public function isDefaultTemplate (): bool {
25+ $ legacyCustomTemplate = $ this ->appConfig ->getValueString (Application::APP_ID , 'footer_template ' , '' );
26+ if ($ legacyCustomTemplate !== '' ) {
27+ return false ;
28+ }
29+
2530 $ footerPolicy = $ this ->getEffectiveFooterPolicy ();
2631 return !$ footerPolicy ['customizeFooterTemplate ' ];
2732 }
You can’t perform that action at this time.
0 commit comments