mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-06 19:19:19 +02:00
App::consumeFlash() had 18-line legacy fallback chains reading from seven old session keys (error, admin_error, edit_error, form_error, success, admin_success, edit_success) that were written by no code in the codebase. All action handlers have used App::flash() -> _flash_error / _flash_success since the App class was introduced. Removed the dead fallbacks; consumeFlash() is now 4 lines. admin/import.php was the last admin template with inline style= attributes. Extracted four of them to named CSS classes in admin.css: - admin-error-list — error <ul> spacing (was style="margin:.5rem 0 0;padding-left:1.2rem") - admin-file-hint — <small> display + margin (was style="margin-top:.5rem") - admin-import-results — results panel margin (was style="margin-top:2rem") - admin-import-results__title — <h2> typography (was multi-property inline style) Closes the 'unify flash message keys' item in todo/02-php-components.md and the import.php inline style item in todo/01-css-semantic-refactor.md.
2.6 KiB
2.6 KiB
PHP Components (Reusable Partials)
Form field partials — templates/partials/form/
text-field.php— already implemented; used acrossadd.phpandedit.phpfor all single-line fieldsselect-field.php— already implemented; used for orientation, ap, finality, license, access type, etc.checkbox-list.php— already implemented with<fieldset>/<legend class="sr-only">/<ul>structure for WCAG 1.3.1file-field.php— already implemented; used for cover image, banner, and TFE filesjury-fieldset.php— already implemented; single partial shared byadd.phpandedit.php; includes all WCAG aria-labels and JS for dynamic rows
Shared UI partials — templates/partials/
pagination.php— partial created and used in bothsearch.phpand (now)admin/index.php;admin/index.phpalso gained proper server-side pagination (25/page) with filter-aware$baseParamsstatus-badge.php— partial fully implemented (templates/partials/status-badge.php) with$badgeType/$badgeValueAPI; CSS rules inadmin.css; used inadmin/index.phpfor publish + access badgesadmin-alert.php— already done;flash-messages.phpcallsApp::consumeFlash()which handles all legacy key variants (_flash_error,error,admin_error,edit_error,form_error,success,admin_success,edit_success) and clears them all
Controller Extraction (In Progress)
- Extract
SearchController— most complex public page - Extract
SystemController— biggest single-file win, 500→8 lines - Extract
ThesisEditController— mergesedit.php+actions/edit.php, deduplicates jury fieldset - Extract remaining controllers one by one
- Consolidate action handlers into controller methods
- Unify flash message keys project-wide to
_flash_error/_flash_success— all callers already useApp::flash(); removed dead legacy-key fallback chains (error,admin_error,edit_error,form_error,success,admin_success,edit_success) fromconsumeFlash() - Move OG tag construction into controller logic
- Extract inline CSS/JS from
system.phpinto separate assets
Backend Maintenance
RateLimitcache dir — already instorage/cache/rate_limit;justfiledeploy excludesstorage/cache/*from rsync. APCu/SQLite migration deferred (not blocking).apropos.phpcontacts and credits — moved toconfig/apropos.phpconfig array (contacts[],credits[],erg_url);apropos.phploops over the config withhtmlspecialchars; update names/emails by editing only the config file