mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-06 11:09:18 +02:00
fix: replace mb_strlen/mb_substr with strlen/substr — mbstring not available on prod
This commit is contained in:
48
TODO.md
48
TODO.md
@@ -1,48 +1,4 @@
|
|||||||
# TODO
|
# TODO
|
||||||
|
|
||||||
## Done
|
## Fixes
|
||||||
- [x] Move CSV import from standalone import.php to inline dialog on the list page
|
- [x] Replace `mb_strlen`/`mb_substr` with `strlen`/`substr` in TfeController, SearchController, Parsedown — mbstring extension not available on production server
|
||||||
- [x] Import logic embedded in index.php (processed before render)
|
|
||||||
- [x] `<dialog>` with form, results log, and auto-opens on post-submit
|
|
||||||
- [x] "Importer un CSV" button in list header row next to h1
|
|
||||||
- [x] Nav link to import.php removed; import.php now redirects to /admin/
|
|
||||||
- [x] CSS: `.admin-dialog`, `.admin-list-header`, `.admin-import-log`
|
|
||||||
- [x] Create Paramètres page consolidating maintenance toggle and account settings into two sections
|
|
||||||
- [x] New `public/admin/parametres.php` with Maintenance + Compte administrateur sections
|
|
||||||
- [x] Nav updated: “Compte” replaced by “Paramètres” linking to `parametres.php`
|
|
||||||
- [x] Maintenance bar removed from `index.php`
|
|
||||||
- [x] `actions/maintenance.php` and `actions/account.php` redirect to `parametres.php` via POST `redirect` param
|
|
||||||
- [x] CSS added for `.admin-settings-section` and `.admin-maintenance-status`
|
|
||||||
- [x] Fix nav logo: revert to "Xamxam", apply display font (Combined), step-2 size, letter-spacing, text-shadow via .nav-logo class
|
|
||||||
- [x] Bump all font sizes ~10% across all CSS files (admin, system, search, main, apropos, common, tfe)
|
|
||||||
- [x] Migrate to utopia fluid type scale (--step--2 → --step-5) and space scale (--space-3xs → --space-3xl) across all CSS files
|
|
||||||
- [x] Split search logic into search.php
|
|
||||||
- [x] `public/search.php` — new page for text-query search results
|
|
||||||
- [x] `public/repertoire.php` — stripped to répertoire index only
|
|
||||||
- [x] `SearchController::handle()` split into `handleSearch()` + `handleRepertoire()`
|
|
||||||
- [x] Search bar (`header.php`, `search-bar.php`) now POSTs to `/search.php`
|
|
||||||
- [x] `tfe.php` `?query=` links updated to `/search.php`
|
|
||||||
- [x] Filter links (`?or[]=`, `?ap[]=`, `?fy[]=`, `?kw[]=`) stay on `repertoire.php`
|
|
||||||
- [x] TFE metadata values are hyperlinks to repertoire.php with correct filter/search params
|
|
||||||
- orientation → `or[]`, ap_program → `ap[]`, year → `fy[]`, keywords → `kw[]` (per keyword)
|
|
||||||
- languages, formats → `query=` (text search); jury members → `query=` (text search)
|
|
||||||
- access_type, license_type, file_size_info, context_note, baiu_link remain plain text/links as-is
|
|
||||||
- [x] Fix TFE page gradient bleed & layout collapse
|
|
||||||
- [x] Scope `header` nav CSS in common.css to `body > header` (prevents article `<header>` inheriting gradient)
|
|
||||||
- [x] Add `width: 100%` + `align-items: start` to `.tfe-layout` grid
|
|
||||||
- [x] Remove `overflow-y: auto` from `.tfe-main` (was clipping layout)
|
|
||||||
- [x] Redesign TFE detail page
|
|
||||||
- [x] Author moved above title (smaller body font)
|
|
||||||
- [x] Remove "← Retour" back link
|
|
||||||
- [x] Split jury promoteurs into interne/externe using `getThesisJury()`
|
|
||||||
- [x] Jury fields order: promoteur interne → externe → président → lecteurs
|
|
||||||
- [x] Contact URL strips `http(s)://` prefix for display
|
|
||||||
- [x] Right-column images get `border-radius: 8px`
|
|
||||||
- [x] Remove orphan `.tfe-back-link` CSS rule
|
|
||||||
- [x] Improve À propos page layout
|
|
||||||
- [x] Replace two-column (prose + aside) with sticky-TOC-nav + main-content layout
|
|
||||||
- [x] Sticky left nav with section anchors (À propos, Contacts, Crédits + erg link)
|
|
||||||
- [x] Contacts rendered as bordered rows instead of loose address blocks
|
|
||||||
- [x] Credits rendered as `<dl>` grid with label/value rows
|
|
||||||
- [x] Section dividers (border-bottom) between sections
|
|
||||||
- [x] Responsive: TOC collapses to horizontal bar on mobile
|
|
||||||
|
|||||||
@@ -185,7 +185,7 @@ class Parsedown
|
|||||||
|
|
||||||
while (($beforeTab = strstr($line, "\t", true)) !== false)
|
while (($beforeTab = strstr($line, "\t", true)) !== false)
|
||||||
{
|
{
|
||||||
$shortage = 4 - mb_strlen($beforeTab, 'utf-8') % 4;
|
$shortage = 4 - strlen($beforeTab) % 4;
|
||||||
|
|
||||||
$line = $beforeTab
|
$line = $beforeTab
|
||||||
. str_repeat(' ', $shortage)
|
. str_repeat(' ', $shortage)
|
||||||
|
|||||||
@@ -211,7 +211,7 @@ class SearchController
|
|||||||
$out = [];
|
$out = [];
|
||||||
foreach ($raw as $v) {
|
foreach ($raw as $v) {
|
||||||
$v = trim((string)$v);
|
$v = trim((string)$v);
|
||||||
if ($v !== '' && mb_strlen($v) <= $maxLen) {
|
if ($v !== '' && strlen($v) <= $maxLen) {
|
||||||
$out[] = $v;
|
$out[] = $v;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -126,8 +126,8 @@ class TfeController
|
|||||||
return 'Mémoire de fin d\'études – Posterg, répertoire des TFE de l\'erg.';
|
return 'Mémoire de fin d\'études – Posterg, répertoire des TFE de l\'erg.';
|
||||||
}
|
}
|
||||||
|
|
||||||
return mb_strlen($plain) > self::META_MAX_LEN
|
return strlen($plain) > self::META_MAX_LEN
|
||||||
? mb_substr($plain, 0, self::META_MAX_LEN - 3) . '…'
|
? substr($plain, 0, self::META_MAX_LEN - 3) . '…'
|
||||||
: $plain;
|
: $plain;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user