diff --git a/app/src/Controllers/SearchController.php b/app/src/Controllers/SearchController.php index 1b8c046..8acf385 100644 --- a/app/src/Controllers/SearchController.php +++ b/app/src/Controllers/SearchController.php @@ -194,7 +194,6 @@ class SearchController "currentNav" => "repertoire", "extraCss" => ["/assets/css/repertoire.css"], "bodyClass" => "search-body", - "db" => $this->db, ]; } @@ -224,6 +223,7 @@ class SearchController exit(); } + header('Cache-Control: public, max-age=300'); include APP_ROOT . '/templates/partials/student-preview.php'; exit(); } @@ -234,7 +234,6 @@ class SearchController ): never { header("Content-Type: text/html; charset=UTF-8"); $isHtmx = true; - $db = $this->db; include APP_ROOT . "/templates/partials/repertoire-index.php"; exit(); } diff --git a/app/templates/partials/repertoire-index.php b/app/templates/partials/repertoire-index.php index bc99c9d..74e8bb4 100644 --- a/app/templates/partials/repertoire-index.php +++ b/app/templates/partials/repertoire-index.php @@ -31,10 +31,7 @@ ksort($studentWorks); // Legacy alias for single-id use $studentMap = array_map(fn($ids) => $ids[0], $studentWorks); -// Batch-fetch all preview data for visible students (one query) -$previewsByAuthor = !empty($studentWorks) - ? $db->getThesesForAuthors(array_keys($studentWorks)) - : []; + /** * Build the toggle URL for a filter button. @@ -182,15 +179,18 @@ $hx = 'hx-target="#repertoire-index" hx-swap="outerHTML" hx-push-url="true" hx-i $ids): ?>
= htmlspecialchars($t['subtitle']) ?>
- - -= htmlspecialchars($synopsis) ?>
- -