fix: pass enabledAccessTypes from ThesisEditController to edit view

This commit is contained in:
Pontoporeia
2026-04-29 21:34:47 +02:00
parent 885150ea45
commit 5c39e856a3
2 changed files with 7 additions and 3 deletions

View File

@@ -9,6 +9,10 @@
- [x] Update action redirects to point to new pages
- [x] Update admin nav header (merged 3 items → 2)
## Bug fixes
- [x] Fix `$enabledAccessTypes` undefined / `array_map()` TypeError on edit page — controller was fetching `getAccessTypes()` instead of `getEnabledFormAccessTypes()` and returning it under the wrong key
## CSS refactor
- [x] Move semantic HTML element baseline styles into common.css

View File

@@ -96,7 +96,7 @@ class ThesisEditController
$languages = $this->db->getAllLanguages();
$formatTypes = $this->db->getAllFormatTypes();
$licenseTypes = $this->db->getAllLicenseTypes();
$accessTypes = $this->db->getAccessTypes();
$enabledAccessTypes = $this->db->getEnabledFormAccessTypes();
$rawRow = $this->db->getThesisRawFields($thesisId);
$currentLicenseId = $rawRow['license_id'] ?? null;
@@ -120,7 +120,7 @@ class ThesisEditController
'languages' => $languages,
'formatTypes' => $formatTypes,
'licenseTypes' => $licenseTypes,
'accessTypes' => $accessTypes,
'enabledAccessTypes' => $enabledAccessTypes,
'currentLicenseId' => $currentLicenseId,
'currentAccessTypeId' => $currentAccessTypeId,
'currentContextNote' => $currentContextNote,