WIP Suche implementiert, sowie Sortieren der Ergebnisse #19

Merged
niklas.ortmann merged 54 commits from ImplementedSearch into dev 2026-06-03 16:07:42 +02:00
Showing only changes of commit 604dbeca93 - Show all commits
+4 -20
View File
@@ -1,23 +1,7 @@
<?php
//session_start();
//require_once '/../model/LocalArticleManager.php';
//require_once '/../model/ArticleManager.php';
//test
$modelPath1 = dirname(__DIR__, 2) . '/model/LocalArticleManager.php';
$modelPath2 = dirname(__DIR__, 2) . '/model/ArticleManager.php';
if (file_exists($modelPath1) && file_exists($modelPath2)) {
include_once $modelPath1;
include_once $modelPath2;
} else {
// Falls die Pfade falsch berechnet wurden, stürzt die Seite nicht ab, sondern zeigt das an:
echo "<div style='background: #ffedd5; color: #9a3412; padding: 15px; border: 2px solid #f97316; font-family: Arial;'>";
echo "<strong>Controller-Fehler:</strong> Die Model-Dateien wurden nicht gefunden.<br>";
echo "Gesuchter Pfad 1: <code>" . htmlspecialchars($modelPath1) . "</code><br>";
echo "Gesuchter Pfad 2: <code>" . htmlspecialchars($modelPath2) . "</code>";
echo "</div>";
}
session_start();
require_once '/../model/LocalArticleManager.php';
require_once '/../model/ArticleManager.php';
if ($_SERVER["REQUEST_METHOD"] === "GET" && isset($_GET["q"])) {
@@ -42,5 +26,5 @@ if ($_SERVER["REQUEST_METHOD"] === "GET" && isset($_GET["q"])) {
}
}
//
?>