Журнал изменений
PHP_EOL resolves to \r\n on Windows, producing incorrect line endings in HTTP responses. Web output must always use Unix \n regardless of the server OS.
Core changes:
- Error page meta output (core/security.php, core/access.php):
- Replace PHP_EOL with "\n" in
$jumpand$metastring concatenation - Replace
implode(PHP_EOL, ...)withimplode("\n", ...)for$links
Benefits:
- Correct Unix line endings in all HTML responses on Windows hosts
- Consistent output across platforms
Technical notes:
- PHP_EOL is appropriate for file I/O and CLI output, not HTTP responses
All favicon references in the core layer now point to
templates/{theme}/images/favicon.svg instead of the deprecated
PNG and ICO variants, consistent with the overall SVG asset migration.
Core changes:
- Error page (core/access.php, core/security.php):
- Remove intermediate
$themedir/$basedirvariables Replace PNG/ICO fallback chain with single SVG check via
is_file()type="image/svg+xml"set explicitly
- Page head (core/system.php):
Wrap favicon link in
is_file()guard for SVG path- Previously unconditional PNG reference
- OpenSearch descriptor (core/user.php):
Replace dual PNG/ICO
<Image>entries with single conditional SVG entry- Falls back to empty string if SVG absent
Benefits:
- Single source of truth for favicon format across all core outputs
- No broken link when legacy PNG/ICO files are removed
Technical notes:
- SVG path:
templates/{theme}/images/favicon.svg - is_file() guards prevent broken links on themes without SVG yet
Fixes a typo in the admin module dispatch switch block where a semicolon was used instead of a colon after the case label, causing check_admin() to never be called correctly.
Core changes:
- Admin dispatch (admin/index.php):
Replace
;with:aftercase 'check_admin'- Was:
case 'check_admin'; check_admin(); break; - Now:
case 'check_admin': check_admin(); break;
- Was:
Benefits:
- Correct PHP switch-case syntax
- check_admin() is now properly invoked
Technical notes:
- No functional change beyond fixing the unreachable call
SVG flags have no intrinsic size (viewBox only), so without explicit CSS they render at 300×150 px. This commit adds size, border, and the Bootstrap Icons hover scale pattern to every flag placement in the admin theme.
Core changes:
- .sl-menu-list-image (sidebar menu, left navigation icons):
- width: 24px; height: auto (replaces fixed 24×24 with object-fit)
- border: 1px solid var(--sl-color-border-strong)
- border-radius: var(--sl-radius-control)
- .sl-table-list-sort .sl-col-ip .sl-geo-flag img (IP column in tables):
- width: 24px; height: auto; border and border-radius as above
- .sl-session-icon .sl-geo-flag img (online-users sidebar widget):
- Same 24 px sizing, border, border-radius treatment
- .sl-admin-language-link (header language switcher):
- Transition eased to background-color 0.15s (matches Bootstrap Icons)
:hover applies transform: scale(0.84) to the child .sl-menu-list-image (rule already present; transition value corrected here)
Benefits:
- Flags render at a consistent 24 px across all admin placements
- Rounded border provides visual framing identical to icon buttons
Hover scale follows the Bootstrap Icons interaction pattern without introducing background-color bleed artefacts during transition
Technical notes:
--sl-color-border-strong and --sl-radius-control are defined in base.css; no new custom properties added here
The 0.15s timing eliminates the white-shimmer artefact visible at non-default browser zoom levels with the previous .18s ease value
Add 266 SVG files per theme (1064 total) under templates/*/images/flags/. Files use ISO 3166-1 Alpha-2 lowercase filenames (e.g. de.svg, ua.svg) plus an unknown.svg fallback used when no matching code is found.
Core changes:
- templates/{admin,default,lite,simple}/images/flags/ (new directories):
- 265 country flag SVGs sourced from a standard flag icon set
- unknown.svg — grey placeholder shown for unresolved language codes
- All filenames are lowercase ASCII; no spaces or special characters
Benefits:
- Scalable vector flags render crisp at any DPI and zoom level
ISO 3166-1 Alpha-2 naming eliminates the need for a translation map for the common case (only edge cases like en→gb require mapping)
Four identical copies keep each theme self-contained; no cross-theme asset dependencies
Technical notes:
SVG files contain viewBox but no width/height attributes; CSS sets the rendered size (24px) via the .sl-menu-list-image rule
- Flag files are identical across all four themes at this point
Flag images were resolved from templates/*/images/lang/ as PNG files named after full country names (germany.png). This replaces the logic with a central getLanguageFlagSrc() function that resolves ISO 3166-1 Alpha-2 codes from templates//images/flags/.svg.
Core changes:
- getLanguageFlagSrc() (core/system.php ~3022):
- Accepts a language code string and returns an absolute file path
Maintains a small normalisation map for edge cases: en → gb (British flag), uk → ua (Ukraine)
- Falls back to flags/unknown.svg when the resolved file does not exist
- Uses img_find() so the current theme's flags/ directory is resolved
- user_geo_ip() (core/system.php ~3096):
- Fallback flag src updated to flags/unknown.svg via img_find()
- Removed dead variable \$flag_src; inline img_find() call
- modules/clients/index.php ~102:
Package builder probe updated from lang/germany.png to flags/de.svg to detect whether flag assets are present for inclusion
Benefits:
- Single function owns flag resolution; no more scattered img_find calls
- ISO 3166-1 codes match the SVG filenames 1:1 without a large map
- unknown.svg fallback prevents broken image tags for unmapped locales
Technical notes:
Old lang/ PNG directory is not deleted here; a separate migration step or manual cleanup can remove it once confirmed unused
- All four themes must have a flags/ directory with unknown.svg
The two logo references pointed to legacy PNG files that no longer exist after the SVG migration. Config values are updated to the new SVG filenames. The base fingerprint in local.php is regenerated to reflect the changed base config.
Core changes:
- config/global.php:
- admin_logo: slaed_logo_256x79.png → slaed-logo-wordmark-gradient-blue.svg
- site_logo: slaed_logo_256x340.png → slaed-logo-mark-gradient-blue.svg
- sitekey: regenerated
- config/local.php:
- base_fingerprint: updated to match new global.php hash
Benefits:
- Logo references point to existing SVG files; no 404s on logo load
- Config fingerprint stays consistent with the updated global config
Technical notes:
- New SVG files are present under templates/admin/images/logos/
- Only the config references and fingerprint change; no PHP logic touched
The original helper only returned an &-joined string with no control over the separator or trailing delimiter. Several call sites need a raw & separator (for redirect URLs) or a trailing separator (for building paginated links), and hash fragment support.
Core changes:
- getQueryString() (core/helpers.php):
- Add bool \$html = true — uses & when true, & when false
- Add bool \$tail = false — appends the separator after the last pair
- Add string \$hash = '' — appends #hash fragment when non-empty
- Skip false values in addition to empty string / null
- Preserve key encoding via rawurlencode on both name and value
Benefits:
- Single function covers all URL-building patterns in the codebase
- Removes ad-hoc string concatenation of & vs & at call sites
- Hash support eliminates a separate string append after the call
Technical notes:
- Backward-compatible: default arguments preserve old behaviour
false-skip allows boolean flags to be passed directly without wrapping in an if block at the call site
The comments list was a minimal read-only view with a fixed modul filter. This overhaul adds searchable columns, a reusable search bar function, a proper bulk-action endpoint, and URL state preservation so that filters survive navigation through edit, approve, and delete.
Core changes:
- getCommentsSearch() (new helper function):
- Extracted search bar construction into a reusable function
Fields: modul select, search-by select (id/body/author/modul/ip), text input for the search string, submit button
- comments() (main list view):
- getVar source changed to req to unify GET/POST handling
SQL query extended with LEFT JOIN to users; supports all five search columns including cross-table author search
- Table rebuilt with sortable columns using getHtmlFrag/table-row API
- info-tooltip added per row showing modul, CID, date, IP details
- Pager migrated to getTplPager with correct WHERE/params
- actions() (new bulk-action handler, op=actions):
- Replaces the old op=approve route for form-submitted bulk ops
- Handles status toggle (a0/a1) and delete (d) for arrays of IDs
- numcom() called correctly to keep comment counters in sync
- edit(), editsave(), approve(), delete():
- All now accept and pass through status/modul/search/chng params
- Redirect back URL preserves the full filter state
Benefits:
- Admins can search comments by text, author, IP, or module name
- Bulk operations no longer reset the filter to the default view
- Less SQL string concatenation; parameterised WHERE throughout
Technical notes:
- op=approve still works for single-row links; actions handles forms
- All modul/chng values are rawurlencode()d in redirect URLs
Files that are no longer loaded or referenced are deleted to keep the asset tree clean.
Core changes:
- templates/default/assets/css/blocks.css (deleted):
- 199-line legacy block stylesheet superseded by new.css rules
- templates/lite/assets/css/blocks.css (deleted):
- 483-line equivalent for the lite theme; same reason
- templates/admin/images/logos/slaed-logo-mark-gradient-blue-big.svg (deleted):
- Oversized logo variant not referenced by any template or config
Benefits:
- Removes 682 lines of dead CSS from the served asset set
- Eliminates stale file that would mislead future asset lookups
Technical notes:
- blocks.css rules were already migrated or deleted; no regressions
- Logo filename updated in config/global.php in a separate commit