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

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

Всего: 872 Доступных коммитов | Отфильтровано: 872 Коммиты | Страница: 68 / 88
18.02.2026
Refactor: Add module config transition aliases to core/security.php
Автор: Eduard Laas | Дата: 21:56 18.02.2026

Extends the existing transition alias block to cover all module-specific config variables. This allows not-yet-modernized modules to keep using their legacy \$confX globals while the config files now return arrays instead of setting globals as side effects.

Core changes:

  1. Transition aliases (core/security.php):
  2. Added 17 new module aliases to the existing block:

    • \$confn / \$conffa / \$conff / \$confw / \$confal / \$confl (news, faq, files, whois, auto_links, links)
    • \$confj / \$conffo / \$confh / \$confp / \$confso / \$confm (jokes, forum, help, pages, shop, media)
    • \$confmo / \$confor / \$confco / \$confcn (money, order, contact, content)
    • \$confma / \$conflog (sitemap, changelog)
  3. All set at global scope once at startup via \$conf['namespace'] ?? []

Benefits:

  • 33 not-yet-modernized modules continue working without changes
  • include('config/config_X.php') calls in old modules become harmless no-ops
  • Single authoritative source: all values come from \$conf loaded by getConfig()
  • Enables gradual per-module migration without big-bang changes

Technical notes:

  • Aliases are temporary; remove after full migration to \$conf['namespace']
  • content module uses \$confcn (not \$confn) to avoid collision with news
  • Changelog and RSS admin modules set their alias locally (redundant, harmless)
Refactor: Convert all config/ files to return array format
Автор: Eduard Laas | Дата: 21:56 18.02.2026

Converts the entire config/ directory to the new unified architecture. Every data config file now returns ['namespace' => [...]] so getConfig() can safely merge them all into a single \$conf array without side effects.

Core changes:

  1. Legacy config files (config/config_*.php — 25 files):
  2. All converted from \$confX = array(...) assignments to return ['key' => [...]]
  3. Dangerous files set to return null (getConfig() skips null values safely):

    • config_global.php: was overwriting \$conf in getConfig() function scope
    • config_header.php: was executing echo during config load
    • config_comments.php, config_users.php, config_templ.php: superseded
    • config_chmod.php, system.php: empty files
  4. Active config files (config/comments.php, users.php, fields.php, etc.):
  5. Converted to return ['namespace' => [...]] format
  6. Heredoc strings preserved where needed (filetype.php, config_contact.php, etc.)
  7. Integer values kept as integers (sitemap.auto_t = 86400, not '86400')
  8. New file: config/local.php
  9. Template for server-specific overrides (DB credentials, dev_mode, etc.)
  10. Contains _meta.base_fingerprint placeholder for fingerprint tracking
  11. Only file the system writes to at runtime

Benefits:

  • Zero side effects when loading config files (no global assignments)
  • getConfig() collects all configs in one pass via glob()
  • local.php overrides applied safely via filterConfigMerge()
  • Dangerous files neutralized (return null) instead of deleted

Technical notes:

  • Namespace keys match the module names (news, forum, shop, etc.)
  • Backward compat: transition aliases defined in core/security.php
  • config_rewrite.php and config_rules.php left unchanged (executable code)
Refactor: Add unified config bootstrap to core/system.php
Автор: Eduard Laas | Дата: 21:55 18.02.2026

Replaces scattered per-module config loading with a single, centralized bootstrap system. All config files are now loaded once at startup into a unified \$conf array, eliminating duplicate includes and global variable pollution across modules.

Core changes:

  1. Config loader (core/system.php):
  2. getConfig(): loads all config/*.php via glob(), merges into \$conf

    • Skips local.php (overrides file); applies it separately via filterConfigMerge()
    • Triggers fingerprint update when dev_mode=true and configs have changed
  3. filterConfigMerge(): safe recursive merge — only existing keys, type-matched

    • Prevents adding unknown keys or type mismatches from local.php
  4. getConfigFingerprint(): SHA1 over basename+sha1_file for each default config

    • Including filename in hash detects file additions and removals
  5. checkConfigFingerprint(): convenience wrapper for fingerprint comparison
  6. setConfigFingerprint(): reads local.php as array, updates _meta.base_fingerprint

    • Atomic write: file_put_contents(tmp) + rename(); unlinks tmp on failure
    • var_export output converted to [...] syntax via post-processing regex
    • chmod(0640) only on newly created files

Benefits:

  • Single load point eliminates N redundant file includes per request
  • Fingerprint mechanism enables safe dev-mode config tracking
  • filterConfigMerge prevents accidental key injection from local.php
  • Atomic write prevents corrupt local.php on server crash

Technical notes:

  • config/local.php is the only writable runtime config file
  • dev_mode=true enables auto-update of local.php fingerprint
  • All config files must return ['namespace' => [...]] or null
  • Backward compat: old \$confX globals set as aliases in core/security.php
Feature: Add localized OG/Schema constants to admin config
Автор: Eduard Laas | Дата: 15:24 18.02.2026

Replace hardcoded Open Graph and Schema.org strings in the SEO settings panel with language constants across all 6 supported languages (ru, en, de, fr, pl, uk).

Core changes:

  1. Admin language files (admin/language/*.php):
  2. Add _OGRAPH - Open Graph toggle label

    • Identical in all languages (technical term)
  3. Add _OGRAPHT - Open Graph template field label

    • Translated per language
  4. Add _SCHEMA - Schema.org toggle label

    • Identical in all languages (technical term)
  5. Add _SCHEMAT - Schema.org template field label

    • Translated per language
  6. Add _TPLVARS - Template variables reference with descriptions

    • Format: <b>[var]</b> - Description (matches existing _TPINFO style)
    • Each variable on its own line via <br>
    • Fully translated descriptions per language
  7. Admin config module (admin/modules/config.php):
  8. Replace 4 hardcoded strings with constants _OGRAPH, _OGRAPHT, _SCHEMA, _SCHEMAT

  9. Replace hardcoded variable list with _TPLVARS in both OG and Schema.org template fields

Benefits:

  • Admin panel now fully translatable for OG/Schema section
  • Variable descriptions visible to admin with bold formatting
  • Consistent style with existing _TPINFO constant pattern
  • Zero hardcoded strings remaining in SEO config section

Technical notes:

  • _TPLVARS uses HTML (<b>, <br>) consistent with _TPINFO
  • HTML5 <br> used (not XHTML <br/>)
  • Constants appended after _SEOCTITLE group in each language file
Fix: Resolve PHP warnings and deprecated notices from error log
Автор: Eduard Laas | Дата: 09:47 18.02.2026

Addresses 6 distinct errors found in config/logs/error.txt (17.02.2026). All fixes eliminate PHP 8.x warnings without changing business logic.

Core changes:

  1. engines_word() (core/system.php):
  2. Add null coalescing for missing query key in parse_url() result

    • Fixes 116 log entries: Undefined key "query" + parse_str(null)
    • Triggered by referer URLs without query string
  3. checkFileChmod() (core/system.php):
  4. Create test file before chmod attempt, delete after test

    • config/chmod.php is a temporary test file, must be created first
    • Prevents chmod(): No such file or directory warning
  5. head() session cleanup (core/system.php):
  6. Guard unlink(sess.txt) with file_exists() check

    • Prevents unlink warning when file was never created
  7. create_dump() (core/system.php):
  8. Add is_readable() check before md5_file()

    • Skips files with permission denied (e.g. .htaccess)
  9. bb_decode() (core/system.php):
  10. Cast $sourse to string with null fallback before preg_replace

    • Prevents str_replace(null) deprecation notice
  11. $file initialization (index.php):
  12. Replace undefined $file reference with ?: operator

    • Fixes Undefined variable $file warning on line 39

Benefits:

  • Error log reduced from 120+ entries to 0 for these error types
  • No false warnings masking real errors in production log
  • PHP 8.x deprecation notices eliminated
17.02.2026
Test: Improve language and security validation tests
Автор: Eduard Laas | Дата: 21:38 17.02.2026

Add unused constants detection to PHPUnit, fix token analysis bug in security test, and remove standalone script replaced by the new test.

Core changes:

  1. Unused constants test (tests/LanguageValidationTest.php):
  2. Add testNoUnusedConstants() that dynamically discovers all ru.php files
  3. Scans entire codebase (core, admin, modules, blocks, templates, setup)
  4. Excludes language directories from search to avoid self-matches
  5. Reports file path and constant name for each unused definition
  6. Security test fix (tests/SecurityValidationTest.php):
  7. Fix testNoIncludesInsideFunctions() token analysis bug
  8. T_WHITESPACE between T_FUNCTION and function name was resetting nextIsFuncName flag, causing all include/require detections to fail

  9. Skip whitespace and comment tokens in the flag reset condition
  10. Removed standalone script (tests/check_constants.php):
  11. Functionality fully covered by new PHPUnit testNoUnusedConstants()
  12. PHPUnit test is broader: checks all module language files automatically

Benefits:

  • Automated detection of dead language constants in CI pipeline
  • Security test now correctly identifies include/require inside functions
  • Single test runner (PHPUnit) for all validation checks
Refactor: Sync language constants across all translations
Автор: Eduard Laas | Дата: 21:34 17.02.2026

Add missing SEO constants to non-Russian admin language files and remove unused constants detected by the new automated validation test.

Core changes:

  1. Added missing constants (admin/language/{en,de,fr,pl,uk}.php):
  2. _TSEP: Title separator for SEO URLs
  3. _SEOTITLE: Add title toggle label
  4. _SEOCTITLE: Add category title toggle label
  5. Removed unused _A_LINKS_LOGO (modules/auto_links/language/):
  6. Constant not referenced anywhere in application code
  7. Removed from all 6 language files (ru, en, de, fr, pl, uk)
  8. Removed unused _CSIZE (modules/clients/):
  9. Removed from admin/language/ (6 files) and language/ (6 files)
  10. Total: 12 files cleaned
  11. Removed unused _NEW_LINKS (modules/links/language/):
  12. Removed from all 6 language files

Benefits:

  • All languages have complete set of admin SEO constants
  • No dead constants cluttering language files
  • Automated test now passes for constant usage validation
Fix: Prevent double-encoding of template fields and update URLs to HTTPS
Автор: Eduard Laas | Дата: 21:34 17.02.2026

Fix config save function that double-encoded HTML in graph, schema, and mtemp fields through save_text() when admin editor was enabled.

Core changes:

  1. Config save function (admin/modules/config.php):
  2. Switch graph, schema, mtemp fields from 'text' to 'raw' type in getVar()
  3. Remove unnecessary preg_replace for <br> tag stripping
  4. Prevents save_text() from applying htmlspecialchars() to already-encoded HTML
  5. Global config (config/global.php):
  6. Update Schema.org context URLs from http to https
  7. Store raw quotes in graph/schema templates instead of HTML entities
  8. Alphabetical key reordering, add tsep separator setting
  9. Update slogan text
  10. Directory index (config/index.html):
  11. Update redirect URL from http://www.slaed.net to https://slaed.net

Benefits:

  • Eliminates progressive corruption of template fields on each save
  • Correct HTML output for OG meta tags and JSON-LD schema
  • HTTPS everywhere for external URLs

Technical notes:

  • Fields with 'raw' type bypass save_text() processing entirely
  • Output in core/system.php uses str_replace() on raw values, no encoding needed
Fix: Update admin blocks routing to unified URL scheme
Автор: Eduard Laas | Дата: 21:33 17.02.2026

Align block management URLs with the standard module routing convention used across the admin panel (name=blocks&op=action&id=N).

Core changes:

  1. Block toggle function (admin/modules/blocks.php):
  2. Rename parameter 'bid' to 'id' for consistency with other modules
  3. Update SQL binding to match new parameter name
  4. Block listing URLs (core/admin.php):
  5. Change action URLs from legacy format (op=blocks_change&bid=) to unified format (name=blocks&op=change&id=)

  6. Update edit and delete links to match new routing scheme

Benefits:

  • Consistent URL scheme across all admin modules
  • Eliminates legacy routing format for block management
Chore: Remove deprecated Flash radio plugin and IPB forum block
Автор: Eduard Laas | Дата: 21:33 17.02.2026

Remove legacy blocks and plugins that depend on obsolete technologies (Flash SWF player, IPB forum integration) no longer supported by modern browsers.

Core changes:

  1. Removed blocks (blocks/):
  2. block-radio.php: Flash-based SWF radio player block
  3. block-ipb_center_forum.php: IPB forum integration block with raw SQL
  4. Removed radio plugin (plugins/radio/):
  5. mju.swf: Flash player binary
  6. playlist.mpl: Radio station playlist with dead stream URLs
  7. radio.html: Popup window for radio player
  8. index.html: Directory index redirect

Benefits:

  • Reduces attack surface (raw SQL in IPB block, Flash vulnerabilities)
  • Removes dead code depending on discontinued technologies
  • Cleaner project structure without obsolete third-party integrations

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

1 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 88

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

Идеи и предложения
Обратная связь