From fe0f414dc0211a4014581dc03fcfd514ed7ed02d Mon Sep 17 00:00:00 2001
From: Jonas Kohl
Date: Thu, 17 Oct 2024 10:56:01 +0200
Subject: Transition templating to Twig

---
 src/application/actions/search/get.php | 19 ++++---------------
 1 file changed, 4 insertions(+), 15 deletions(-)

(limited to 'src/application/actions/search/get.php')

diff --git a/src/application/actions/search/get.php b/src/application/actions/search/get.php
index d3de970..bc1bdba 100644
--- a/src/application/actions/search/get.php
+++ b/src/application/actions/search/get.php
@@ -41,25 +41,14 @@ if ($query !== null) {
     }
     $end_time = microtime(true);
     $search_duration = $end_time - $start_time;
-    
-    _view("template_start", ["_title" => __("Search results for “%query%”", [ "query" => $query ])]);
-    _view("template_navigation_start");
-    _view("template_navigation", ["user" => RequestUtils::getAuthorizedUser($db)]);
-    _view("template_navigation_end");
-    _view("form_search", [ "query" => $query ]);
-    _view("view_search_results", [
+
+    render("search.twig", [
         "posts" => &$posts,
         "topics" => &$topicLookup,
         "users" => &$userLookup,
         "attachments" => &$attachmentLookup,
         "search_duration" => $search_duration,
     ]);
-    _view("template_end", [...getThemeAndLangInfo()]);
 } else {
-    _view("template_start", ["_title" => __("Search")]);
-    _view("template_navigation_start");
-    _view("template_navigation", ["user" => RequestUtils::getAuthorizedUser($db)]);
-    _view("template_navigation_end");
-    _view("form_search");
-    _view("template_end", [...getThemeAndLangInfo()]);
-}
\ No newline at end of file
+    render("search.twig");
+}
-- 
cgit v1.2.3