Журнал изменений

Журнал изменений

Фильтр и поиск

Всего: 1091 Доступных коммитов | Отфильтровано: 1091 Коммиты | Страница: 33 / 110
12.05.2026
Refactor: migrate GeoIP config from geoip.php to flat geoip_* keys in global.php
Автор: Eduard Laas | Дата: 10:29 12.05.2026

Removes the separate config/geoip.php file and merges GeoIP settings directly into config/global.php as flat top-level keys (geoip_anon, geoip_asn, geoip_cache, geoip_country, geoip_enabled, geoip_store, geoip_test). Aligns config schema with the Geoip class refactor.

Core changes:

  1. Config migration (config/global.php):
  2. Removed legacy geo_ip key
  3. Added flat geoip_* keys replacing nested geoip.php structure
  4. Config deletion (config/geoip.php):
  5. File removed; settings now live in global.php
  6. Config fingerprint (config/local.php):
  7. Updated base_fingerprint after schema change
  8. Admin config panel (admin/modules/config.php):
  9. getGeoipPanel(): reads $conf['geoip_*'] flat keys instead of $conf['geoip'][...]
  10. getGeoipRows(): calls Geoip::getInfo() directly; removed getGeoipInfo() wrapper
  11. Removed checkPerms(CONFIG_DIR.'/geoip.php') call from panel output
  12. save(): GeoIP settings now written into global.php via existing setConfigFile()
  13. Removed separate setConfigFile('geoip.php', ...) block
  14. Redirect simplified: testip param removed from redirect; test IP persisted in geoip_test key of global.php instead

Benefits:

  • Single config file for all settings; no extra file to manage
  • Consistent with existing global.php admin save pattern

Technical notes:

  • Old geo_ip boolean key removed; replaced by geoip_enabled int key
  • setConfigFile('geoip.php') call and geoip.php file both eliminated
  • No URL or DB schema changes
Refactor: rewrite Geoip as standalone pure-PHP MMDB reader; drop geoip2 library
Автор: Eduard Laas | Дата: 10:29 12.05.2026

Removes the geoip2/geoip2 Composer dependency and replaces the MaxMind PHP SDK reader with a self-contained pure-PHP MMDB binary parser inside the Geoip class. All lookup results and public API shape remain unchanged.

Core changes:

  1. Geoip class (core/classes/geoip.php):
  2. Removed getReader() which required GeoIp2\Database\Reader
  3. Added getMmdb(): loads and caches the raw MMDB binary payload + metadata
  4. Added getRecord(): walks the radix search tree to locate a data record
  5. Added getMmdbNode(), getMmdbDecode(), getMmdbValue(), getMmdbSize(), getMmdbPointer(), getMmdbUint(): pure-PHP MMDB binary format decoder

  6. Extracted getCountryData() and getAsnData() private helpers with own caches
  7. Config keys changed from nested $conf['geoip'][...] to flat $conf['geoip_*']
  8. Added getFlagHtml(): returns flag <span> HTML for a given IP
  9. Added getIpHtml(): returns flag + IP link HTML for admin display
  10. getCountry(): now calls getCountryData() directly; avoids full getInfo() cost
  11. Composer (composer.json):
  12. Removed geoip2/geoip2 ^3.1 requirement

Benefits:

  • Zero external runtime dependency for GeoIP lookups
  • Database files read with file_get_contents() and cached in static property
  • Fully self-contained; works without Composer autoload for GeoIP

Technical notes:

  • Supports MMDB record sizes 24, 28, and 32 bits
  • IPv4-in-IPv6 mapping handled via 96-bit prefix traversal
  • Backward compatible: getInfo(), getCountry(), getEmpty(), getFileInfo() unchanged
11.05.2026
Chore: add GeoIP language constants to all admin language files
Автор: Eduard Laas | Дата: 15:26 11.05.2026

Adds 14 new i18n constants for GeoIP UI labels across all six admin language files (de, en, fr, pl, ru, uk) and updates the existing _GEO_IP constant with clearer active-voice phrasing aligned to the new panel.

Core changes:

  1. Language files (admin/lang/*.php — all six locales):
  2. Updated _GEO_IP to shorter active-voice phrasing
  3. Added _GEOLOCATION section heading
  4. Added GeoIP-specific constants: _GEOIP_ANON, _GEOIP_ASN, _GEOIP_ASNDB, _GEOIP_CACHE, _GEOIP_CONTINENT, _GEOIP_COUNTRYDB, _GEOIP_COUNTRYNAME, _GEOIP_ORG, _GEOIP_PROVIDER, _GEOIP_STORE, _GEOIP_TESTIP

  5. Added generic reusable constants: _FOUND, _NOTFOUND, _PARAMETERS, _VALUE

Benefits:

  • All GeoIP panel labels are fully localized in six languages
  • Generic constants (_FOUND, _NOTFOUND, _PARAMETERS, _VALUE) are reusable across other admin modules

Technical notes:

  • Constants inserted in alphabetical order at the existing _GEO_IP position
  • No logic changes; pure i18n additions
Feature: add GeoIP settings panel to admin config
Автор: Eduard Laas | Дата: 15:26 11.05.2026

Extends admin/modules/config.php with a GeoIP configuration section rendered on the Multilingual tab and a save handler that persists settings to config/geoip.php. The panel also shows live database status and a per-IP lookup test.

Core changes:

  1. Admin config panel (admin/modules/config.php):
  2. getGeoipPanel(): renders GeoIP settings form rows, DB status table, and test-IP result

    • getGeoipBadge(): renders found/not-found status badge via inline-badge fragment
    • getGeoipFileRow(): renders one DB file status row (name, status, size, date, path)
    • getGeoipRows(): renders live lookup result for a test IP address
  3. config(): merged GeoIP panel into tab 2 (Multilingual / Geolocation)
  4. save(): persists geoipenabled, geoipcache, geoipanon, geoipstore via setConfigFile()
  5. Redirect preserves testip query param so the test result survives after save

Benefits:

  • Operators can verify database files and test IP lookup without shell access
  • All GeoIP settings (TTL, anonymization, IP storage) are configurable via UI

Technical notes:

  • geoip.php is written by setConfigFile(), aligned with the global.php pattern
  • Tab label changed from Multilingual to Multilingual / Geolocation
  • No schema or URL contract changes; redirect path extended with optional testip param
Feature: add GeoIP subsystem with MaxMind integration
Автор: Eduard Laas | Дата: 15:26 11.05.2026

Introduces the Geoip class, configuration, and system-level autoloading to resolve visitor country and ASN data from MaxMind GeoIP2 databases. The subsystem is opt-in, isolated in core/classes/geoip.php, and exposes two thin wrappers in core/system.php.

Core changes:

  1. GeoIP class (core/classes/geoip.php):
  2. Static class with in-request per-process cache keyed on IP hash

    • getInfo(): returns country, continent, ASN, organization, provider, status
    • getCountry(): shorthand returning the ISO country code
    • getFileInfo(): returns database file metadata for admin UI
  3. IP anonymization: SHA-1 hash used as cache key unless store_ip is set
  4. MaxMind reader lazily opened once per process per DB path
  5. System bootstrap (core/system.php):
  6. Added require_once for geoip.php after parser.php
  7. Exposed getGeoipInfo() and getGeoipCountry() as public system helpers
  8. GeoIP configuration (config/geoip.php):
  9. New config file with enabled, country_database, asn_database, cache_ttl, anonymize_ip, store_ip keys

  10. GeoIP storage directory (storage/geoip/):
  11. Added .htaccess and index.html directory protection files
  12. Composer dependency (composer.json):
  13. Added geoip2/geoip2 ^3.1 requirement
  14. Config fingerprint (config/local.php):
  15. Updated base_fingerprint after adding config/geoip.php

Benefits:

  • Country and ASN resolution available project-wide without additional setup
  • Opt-in: gracefully no-ops when databases are absent
  • IP anonymization on by default; full IP storage is opt-in

Technical notes:

  • Databases expected at storage/geoip/country.mmdb and storage/geoip/asn.mmdb
  • Reader is opened lazily and cached statically per process
  • Backward compatible: existing code unchanged; new functions are additive
08.05.2026
Chore: add directory protection files and normalize redirect URLs
Автор: Eduard Laas | Дата: 11:43 08.05.2026

All theme directories now have index.html protection files redirecting to https://slaed.net. The default theme's outdated 212-line demo template is replaced with the same one-line redirect. All existing redirects are updated from http://www.slaed.net to https://slaed.net.

Core changes:

  1. New protection files:
  2. Add templates/admin/index.html (redirect to https://slaed.net)
  3. Add templates/lite/index.html (redirect to https://slaed.net)
  4. Add templates/simple/index.html (redirect to https://slaed.net)
  5. Add templates/simple/.htaccess (deny .html direct access)
  6. Replace outdated demo template (templates/default/index.html):
  7. Remove 212-line legacy demo HTML
  8. Replace with standard one-line directory protection redirect
  9. URL normalization (templates/*/images/index.html):
  10. Update http://www.slaed.net to https://slaed.net

    • default/images/, lite/images/, simple/images/

Benefits:

  • Consistent directory protection across all four themes
  • No stale http:// redirect URLs remain in template directories

Technical notes:

  • Redirect target: https://slaed.net (no www, HTTPS)
Chore: add SVG favicon to images/ for default, lite, and simple themes
Автор: Eduard Laas | Дата: 11:43 08.05.2026

The admin theme already received its favicon.svg in a prior commit. The remaining three themes now get the same file in their images/ dirs so all favicon lookups via is_file() resolve correctly.

Core changes:

  1. SVG favicon (templates/default/images/favicon.svg):
  2. Add favicon.svg (8998 bytes)
  3. SVG favicon (templates/lite/images/favicon.svg):
  4. Add favicon.svg (8998 bytes)
  5. SVG favicon (templates/simple/images/favicon.svg):
  6. Add favicon.svg (8998 bytes)

Benefits:

  • All four themes now have a valid favicon.svg at the expected path
  • is_file() guards in core will resolve to true for all themes

Technical notes:

  • Path convention: templates/{theme}/images/favicon.svg
Chore: remove deprecated PNG/ICO image assets across all themes
Автор: Eduard Laas | Дата: 11:42 08.05.2026

Legacy PNG and ICO files for favicons, logos, flag images, and misc icons have been superseded by their SVG counterparts in all four themes. All code references were updated in previous commits.

Core changes:

  1. Favicons (all themes):
  2. Remove favicon.ico and favicon.png from repo root and each theme root

    • admin, default, lite, simple
  3. Logo images (all themes):
  4. Remove templates//images/logos/png/.png and logos/*.png

    • SVG equivalents already present in templates/*/images/logos/
  5. Flag images (admin, default, lite, simple):
  6. Remove templates//images/lang/.png (948 files total)

    • SVG flags added in d14104b, PNG resolution removed in c621469
  7. Misc admin icons:
  8. Remove templates/admin/images/info.png and warn.png

Benefits:

  • Repository cleanup: 983 obsolete binary files removed
  • Eliminates PNG/SVG duplication for all image asset types

Technical notes:

  • SVG assets are already committed and referenced by all themes
  • No fallback to PNG remains in any template or core file
Fix: replace PHP_EOL with "\n" in HTML output (setExit)
Автор: Eduard Laas | Дата: 11:41 08.05.2026

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:

  1. Error page meta output (core/security.php, core/access.php):
  2. Replace PHP_EOL with "\n" in $jump and $meta string concatenation
  3. Replace implode(PHP_EOL, ...) with implode("\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
Refactor: migrate favicon lookup from PNG/ICO to SVG in core
Автор: Eduard Laas | Дата: 11:40 08.05.2026

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:

  1. Error page (core/access.php, core/security.php):
  2. Remove intermediate $themedir/$basedir variables
  3. Replace PNG/ICO fallback chain with single SVG check via is_file()

    • type="image/svg+xml" set explicitly
  4. Page head (core/system.php):
  5. Wrap favicon link in is_file() guard for SVG path

    • Previously unconditional PNG reference
  6. OpenSearch descriptor (core/user.php):
  7. 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

Всего: 1091 на 110 страницах по 10 на каждой странице

1 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 110
Хотите опробовать SLAED CMS в действии?
Идеи и предложения
Обратная связь
Подтверждение

Поделиться
QR-код