Чтение RSS каналов

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

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

Всего: 500 Доступных коммитов | Отфильтровано: 500 Коммиты | Страница: 24 / 50
04.03.2026
Docs: Update project documentation and harden security
Автор: Eduard Laas | Дата: 14:10 04.03.2026

This commit audits and rectifies critical discrepancies across our project documentation (README, CONTRIBUTING, UPGRADING, PRINCIPLES, TESTS) aligning them with our current 6.3.x codebase. It also includes comprehensive security hardening configurations and minor syntax optimizations inside admin/modules/monitor.php and core/security.php based on recent audits.

Core changes:

  1. Project Documentation (README.md, CONTRIBUTING.md, UPGRADING.md, docs/):
  2. Rectified module counts and naming (26 modules, 'media' instead of 'gallery').
  3. Replaced outdated 'phpcs' check with 'php-cs-fixer' in contribution guidelines. * Ensures contributors use the correct static analysis tool.

  4. Standardized documentation to strictly refer to the 5 Core SLAED Principles (Fast, Stable, Effective, Productive, Secure).
  5. Added previously omitted testing suites (LanguageConstantsUsageTest.php, UnusedCodeAuditTest.php) to docs/TESTS.md.
  6. Uniformly enforced setRedirect() in code examples, removing obsolete header()+exit; legacy patterns.
  7. Codebase Security & Optimization (core/security.php, admin/modules/monitor.php):
  8. Strengthened input validation and regex application to avoid false-positives and potential regex injections.
  9. Eliminated redundant queries and unnecessary type-casts in monitor.php.
  10. Improved checkFiles array checks to mitigate potential TypeError deprecations in PHP 8.4+.
  11. Refined blocker configurations and logging bounds for Super Admin monitoring clarity.

Benefits: - Eliminates developer confusion by thoroughly ensuring alignment between official guidelines and actual PHP 8.4 codebase implementations. - Reinforces protection mechanisms against configuration corruption or user-input injections. - Minor efficiency gain by removing duplicate database server version queries inside monitoring logic.

Technical notes: - The documentation now precisely matches the codebase capabilities signifying ~85% modernization completeness. - Removed arbitrary references to obsolete .rules/ files that never existed.

03.03.2026
Perf: replace unset() with null assignment for qresult in getSqlQuery()
Автор: Eduard Laas | Дата: 15:07 03.03.2026

unset() on an object property removes the property entirely from the object, causing a property lookup overhead on next access. Assigning null keeps the property slot initialized and avoids re-allocation.

Core changes:

  1. Database::getSqlQuery() (core/classes/pdo.php):
  2. if (\$this->qresult) unset(\$this->qresult) → \$this->qresult = null

  3. Unconditional assignment removes the conditional branch overhead

Benefits: - Performance: avoids property re-declaration on each query cycle - Consistency: property remains defined on the object at all times - Maintainability: clearer intent (reset vs. remove)

Technical notes: - Functional behavior identical: qresult is falsy in both cases - Backward compatibility: no API changes

Fix: replace bare header('Location:') calls with setRedirect() in index.php
Автор: Eduard Laas | Дата: 15:07 03.03.2026

Raw header() calls without exit were used for geo-IP language redirects and fallback routing, violating the SLAED guardrail (exit after every redirect). setRedirect() encapsulates both header() and exit atomically.

Core changes:

  1. Geo-IP language redirect block (index.php):
  2. header('Location: index.php?newlang=...') → setRedirect(...) for en, fr, de, pl, ru, uk locales (6 occurrences)

  3. Removes implicit fall-through risk after redirect
  4. Fallback routing block (index.php):
  5. header('Location: index.php') + exit → setRedirect('index.php') (2 occurrences; exit now handled internally by setRedirect)

Benefits: - Guardrail compliance: no output possible after redirect - Reduced duplication: exit not repeated manually - Architecture alignment with setRedirect() API

Technical notes: - setRedirect() defaults to HTTP 302; behavior unchanged - Backward compatibility: identical HTTP response for clients

Fix: correct UTF-8 encoding of copyright symbol in admin module headers
Автор: Eduard Laas | Дата: 15:06 03.03.2026

The copyright line in 14 admin module files contained a mojibake sequence (•) instead of the UTF-8 © symbol, caused by incorrect encoding during a prior batch operation.

Core changes:

  1. Copyright header fix (14 files: modules/*/admin/index.php):
  2. clients, contact, content, faq, files, forum, help, jokes, links, news, order, pages, rss, voting, whois

  3. • 2005 - 2026 → © 2005 - 2026

Benefits: - Correct UTF-8 output in file headers across all admin modules - Consistent copyright notice project-wide

Technical notes: - Single-character encoding fix; no logic changes - Backward compatibility: not applicable

Refactor: polish getUserNav() and finalize core/user.php cleanup
Автор: Eduard Laas | Дата: 14:31 03.03.2026

Follow-up fixes after the main VerbNoun rename commit: corrects navi() naming conflict, optimizes getUserNav(), and updates all function comments.

Core changes:

  1. navi() → getUserNav(): string (core/user.php):
  2. Renamed to avoid collision with admin navi() in modules/account/admin
  3. Added missing return type declaration: string
  4. 4 parallel arrays → single $navs tuple array
  5. getUserInfo() null-safe: (getUserInfo() ?? [])['user_id'] ?? 0
  6. $conf['shop'] global mutation removed; replaced with ?? 0 read
  7. Strict comparisons: != → !, 1 → === 1
  8. foreach destructuring: [$titl, $itit, $link, $icon]
  9. Function comments updated (core/user.php):
  10. All 19 functions now have accurate, descriptive single-line comments
  11. Old comments reflected legacy names (savecom, editpost, prmess, etc.)
  12. Call sites updated (3 files):
  13. modules/account/index.php (4 calls)
  14. modules/clients/index.php (1 call)
  15. modules/shop/index.php (2 calls)

Benefits: - No redeclaration risk between user and admin navi() - $navs tuple pattern eliminates parallel-array sync errors - Null-safe uid lookup prevents notices on unauthenticated edge cases

Refactor: rename functions in core/user.php to SLAED VerbNoun convention
Автор: Eduard Laas | Дата: 14:19 03.03.2026

Standardizes all 16 non-conforming function names in core/user.php and updates every call site across 20 files so the codebase is consistent with the approved verb set (get, set, add, update, delete, is, check, filter).

Core changes:

  1. Function renames (core/user.php):
  2. getusrinfo() → getUserInfo() (no camelCase)
  3. is_mod_group() → isModGroup() (snake_case)
  4. userblock() → getUserBlock() (missing verb)
  5. savecom() → addComment() (save not in SLAED verbs)
  6. editpost() → updatePost() (edit not in SLAED verbs)
  7. prmess() → getPmView() (no verb, no camelCase)
  8. prmesssend() → addPmMsg() (no verb, no camelCase)
  9. prmesssave() → setPmSaved() (no verb, no camelCase)
  10. prmessdel() → deletePmMsg() (no verb, no camelCase)
  11. favorview() → getFavorBtn() (no verb, no camelCase)
  12. favoradd() → addFavor() (verb at end, no camelCase)
  13. favorliste() → getFavorList() (no verb, no camelCase)
  14. favordel() → deleteFavor() (no verb, no camelCase)
  15. rss_channel() → getRssChannel() (snake_case)
  16. open_search() → getOpenSearch() (snake_case)
  17. open_xsl() → getOpenXsl() (snake_case)
  18. Code quality fixes (core/user.php):
  19. list() → [] destructuring (28 occurrences)
  20. Indentation: 1-space global lines → 4 spaces
  21. getFavorBtn($fid, $mod): added type hints int/string
  22. Strict comparisons in isModGroup() and addComment()
  23. Call sites updated in 20 files:
  24. core/system.php, core/template.php, index.php
  25. blocks/block-user_info.php, templates/lite/index.php
  26. modules/account, auto_links, contact, faq, files, forum, help, links, media, money, news, order, pages, recommend, shop

Benefits: - Consistent SLAED VerbNoun naming across core/user.php - list() removal eliminates PHP 8 deprecation warnings - Strict comparisons prevent type-juggling edge cases

Technical notes: - op= URL routing strings (savecom, editpost, prmess, etc.) unchanged - No logic changes; signature types only on getFavorBtn - Backward compatibility: internal API only

Fix: rename addmail() → addAdminMail() to resolve fatal redeclaration
Автор: Eduard Laas | Дата: 13:47 03.03.2026

addmail() collided with addMail() (core/security.php) because PHP function names are case-insensitive; renamed to addAdminMail() to follow VerbNoun convention and eliminate the fatal redeclaration error.

Core changes:

  1. Function declaration (core/system.php):
  2. addmail() → addAdminMail(); comment updated
  3. No logic changes, signature unchanged
  4. Call sites (11 files):
  5. core/user.php
  6. modules/news, links, files, media, jokes, faq, pages, help, whois, auto_links

Benefits: - Resolves Fatal error: Cannot redeclare function addMail() - Consistent VerbNoun camelCase naming per SLAED §3-4 - No ambiguity between low-level addMail() and admin-notify addAdminMail()

Technical notes: - addMail() (security.php) queues a single email - addAdminMail() (system.php) dispatches notifications to all subscribed admins - Backward compatibility: internal API only; no external callers

Fix: complete is_admin → isAdmin rename in core/system.php
Автор: Eduard Laas | Дата: 13:44 03.03.2026

Replaces all remaining legacy function calls that were missed in the previous Refactor commit, ensuring system.php is consistent with the merged isAdmin(bool \$super = false) API in core/security.php.

Core changes:

  1. Function call replacements (core/system.php):
  2. is_admin() → isAdmin() (12 occurrences)
  3. isAdminSuper() → isAdmin(true) (4 occurrences)

Benefits: - No legacy shim required; all call sites now use unified API - Static cache in isAdmin() shared across all 16 call sites per request - One DB query per request regardless of super check

Technical notes: - isAdmin(true) is equivalent to removed isAdminSuper() - isAdmin() is equivalent to removed is_admin() - Backward compatibility: none needed; legacy functions deleted

Refactor: replace save_datetime() with getVar('req', ..., 'time') and fix quote style
Автор: Eduard Laas | Дата: 13:39 03.03.2026

Migrates remaining save_datetime() calls to the unified getVar() API, and corrects a single-quote style issue in the changelog French language file.

Core changes:

  1. modules/faq/admin/index.php:
  2. save_datetime(1, 'time') → getVar('req', 'time', 'time') (×2, add/save)
  3. modules/changelog/language/fr.php:
  4. Double to single quote on one define() line

Benefits: - Consistent input handling via getVar() throughout admin modules - No more calls to removed save_datetime() helper

Technical notes: - Behaviour unchanged; getVar 'time' type validates and formats identically

Test: update test suite for renamed functions and API changes
Автор: Eduard Laas | Дата: 13:39 03.03.2026

Adapts all test files to the camelCase rename sprint: function calls, helper wrappers and comments updated throughout the Unit and integration test suites.

Core changes:

  1. tests/Unit/InputFilterTest.php:
  2. saveText → filterHtml in helper and comments
  3. tests/Unit/PasswordHashTest.php, TemplateIfTest.php:
  4. Minor naming alignment
  5. tests/bootstrap.php:
  6. Updated function references
  7. Validation tests (BlockValidationTest, SecurityValidationTest, etc.):
  8. Updated function name expectations

Benefits: - Test suite reflects current API - No regressions introduced by the rename sprint

Technical notes: - phpunit: all tests expected to pass after rename completion

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

Хотите опробовать SLAED CMS в действии?

Технологии

PHP MySQL HTML 5 CSS 3 jQuery jQuery UI

Контакты

  • D-49179, Deutschland
    Ostercappeln, Im Siek 6
  • +49 176 61966679

  • https://slaed.net
Идеи и предложения
Обратная связь