From e7b3ad33dab4421ae8bc61afdfd7798d444b6435 Mon Sep 17 00:00:00 2001 From: Guy Sartorelli Date: Mon, 14 Oct 2024 14:36:13 +1300 Subject: [PATCH] ENH Avoid using deprecated API --- src/Publisher.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Publisher.php b/src/Publisher.php index e77758b..a4345d4 100644 --- a/src/Publisher.php +++ b/src/Publisher.php @@ -175,11 +175,11 @@ protected function generatePHPCacheFile($response) */ protected function generateHTMLCacheRedirection($destination) { - return SSViewer::execute_template( - 'SilverStripe\\StaticPublishQueue\\HTMLRedirection', - ArrayData::create([ - 'URL' => DBField::create_field('Varchar', $destination), - ]) - ); + $viewer = SSViewer::create('SilverStripe\\StaticPublishQueue\\HTMLRedirection'); + $viewer->setRewriteHashLinks(false); + $viewer->includeRequirements(false); + return $viewer->process(ArrayData::create([ + 'URL' => DBField::create_field('Varchar', $destination), + ])); } }