mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-06 19:19:19 +02:00
Move all data-fetching and view-variable assembly out of public/index.php into a new src/HomeController.php, following the same pattern as SearchController, TfeController, SystemController, and ThesisEditController. HomeController::create() builds the Database singleton dependency. HomeController::handle() encapsulates: - GET param parsing (page, year) with safe type coercion - Display-mode detection: default random-latest view / year-filtered / paginated-all theses - All DB calls: getLatestPublishedYear, getLatestYearTheses, searchTheses, countSearchResults, getPublishedTheses, countPublishedTheses, getCoverPathsForTheses, getAvailableYears - Batch cover-image loading for theses without a banner_path - baseParams assembly for the pagination partial - OG / meta tag array construction - Graceful error handling (logs exception, returns safe empty state) - Returns a flat array of view variables public/index.php is now a 6-line dispatcher (require + create + handle + extract) followed by a pure view template. Reduced from 100 to 71 lines. All error-handling and data logic removed from the view layer entirely.
TODO Index
Pending tasks split by topic. Completed tasks have been removed.
| File | Topic |
|---|---|
| 01-css-semantic-refactor.md | CSS class audit, semantic HTML for templates (public + admin), inline style extraction, favicon |
| 02-php-components.md | Form field partials, shared UI partials, controller extraction, backend maintenance |
| 03-system-cache.md | system_cache table, SystemCache class, system.php refactor |
| 04-accessibility.md | WCAG 2.1 AA — remaining failures grouped by success criterion |