From 8fe9f6cc262c3d87071464b042db3063797cfa4b Mon Sep 17 00:00:00 2001 From: Guy Sartorelli <36352093+GuySartorelli@users.noreply.github.com> Date: Tue, 22 Oct 2024 12:53:34 +1300 Subject: [PATCH] ENH Avoid using deprecated API (#207) --- 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), + ])); } }