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

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

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

Всего: 1347 Доступных коммитов | Отфильтровано: 1347 Коммиты | Страница: 92 из 135
24.03.2026
Feature: universal theme asset discovery and legacy shell removal
Автор: Eduard Laas | Дата: 22:53 24.03.2026

Add automatic CSS/JS loading from theme directories, removing the need to manually list theme files in config. Remove legacy admin shell files and the archived default_old theme directory as part of Phase 12 cleanup.

Core changes:

  1. Universal theme asset loader (core/system.php):
  • Add getThemeAssets(theme, ext) — scans theme root, assets/vendor/*/, assets/{ext}/, and legacy js/ subdir in the correct load order
  • Modify doCss() to auto-append theme CSS dirs (root, vendor, assets/css)
  • Modify doScript() to auto-append theme JS files via getThemeAssets()
  1. Config decoupling (config/global.php):
  • Remove templates/[theme]/ and plugins/bootstrap/ from css_f (bootstrap now loaded from theme vendor dir automatically)
  • Theme assets are fully discovered at runtime, not config-driven
  1. Legacy removal (templates/admin/, templates/default_old/):
  • Delete templates/admin/index.html and index-home.html (Phase 12)
  • Delete templates/default_old/ directory (archived legacy theme)
  • Clean up templates/admin/index.php (data-only provider)
  1. Fix statistic path (core/user.php):
  • Replace CONFIG_DIR with COUNTER_DIR for statistic.log read

Benefits:

  • Adding a new theme requires zero config changes for CSS/JS loading
  • Vendor libs bundled with a theme are picked up automatically
  • Load order guaranteed: root → vendor → assets/css|js

Technical notes:

  • getThemeAssets() uses glob() with GLOB_ONLYDIR for vendor subdirs
  • Applies to both frontend and admin rendering paths
  • Cache invalidation: existing CSS/JS caches are bypassed on next request
Refactor: migrate setHead/setFoot to Template-based page rendering
Автор: Eduard Laas | Дата: 15:38 24.03.2026

Replace the string-replace index.php pipeline in setHead()/setFoot() with $tpl->getHtmlPage(); introduce pages, layouts, partials and fragments for all themes; migrate setExit() in access.php and security.php to the same engine.

Core changes:

  1. Render pipeline (core/system.php):
  • setHead() buffers output via ob_start() and stores vars in $sitevars / $adminvars
  • setFoot() renders the full page via $tpl->getHtmlPage() using those vars
  • Unified theme resolution: getTheme() no longer returns 'admin' for ADMIN_FILE
  • $tpl always instantiated with resolved theme (no more separate admin branch)
  • addblocks() calls for left/right/down/message/center/foot moved into setFoot()
  1. setExit() migration (core/access.php, core/security.php):
  • Both versions replaced inline HTML with $tpl->getHtmlPage('message')
  • alert fragment used for the error message body
  1. Template structure — new files per theme (admin, default, lite, simple):
  • layouts: app.html, home.html, admin.html, bare.html
  • pages: module.html, home.html, admin.html, login.html, message.html, preview.html
  • partials: login.html, registration.html, searchbox.html, preview.html
  • fragments: block-left, code, comment, form-conf, hide, list-bottom, open, close, pagenum, panel-admin, panel-modul, quote, spoiler, voting-*, basic-monitor, basic
  1. Fragment updates:
  • title.html extended in all themes with icon/subtitle/content layout block
  1. Theme head/foot vars (templates/admin/index.php, templates/lite/index.php):
  • getAdminHeadVars() / getThemeHeadVars() / getThemeFootVars() return plain array keys (no {%key%} format) to match the new Template data contract
  1. Fixes and tests:
  • modules/news/index.php: guard is_user() before $user[1] access
  • tests: updated AdminLoginBridgeFlowTest, AdminPreviewBridgeFlowTest, AdminSearchboxBridgeFlowTest for unified theme; added ViewBridgeSmokeTest cases for module/home page render; added AdminPageRenderFlowTest
  1. Config:
  • config/global.php: sitekey rotated, active theme set to 'simple'

Benefits:

  • Page rendering fully managed by the Template class for all themes and contexts
  • setHead/setFoot no longer depend on index.php file or string-replace placeholders
  • All three render contexts (frontend, admin, exit) use the same engine

Technical notes:

  • index.php file is no longer read or parsed by setHead/setFoot
  • {%placeholder%} vars in theme index.php files are no longer used for page assembly
Refactor: complete migration to Template class and remove legacy template system
Автор: Eduard Laas | Дата: 12:33 24.03.2026

Drop core/template.php content and all setTemplate* functions; wire all remaining call sites to $tpl->getHtmlFrag(); extract visitor tracking from setHead() into three dedicated functions.

Core changes:

  1. Legacy template system (core/template.php, core/system.php):
  • Emptied core/template.php — all setTemplate* functions removed
  • Switched require from core/template.php to core/classes/template.php
  • Replaced $GLOBALS['tpl'] with direct global $tpl in closures
  • Renamed param $tpl to $frag in setPageNumbers() and num_ajax()
  • Fixed uninitialized $barr in getBlocks()
  1. Visitor tracking extraction (core/system.php):
  • Extracted session tracking into updateSessionTrack()
  • Extracted referer tracking into updateRefererTrack()
  • Extracted statistics tracking into updateStatsTrack()
  1. Theme template function refactor (templates/admin/index.php, templates/lite/index.php):
  • setTemplateHead() replaced by getAdminHeadVars() / getThemeHeadVars() — returns array
  • setTemplateFoot() replaced by getThemeFootVars() — returns array
  • setTemplateBlock() removed from both template files
  1. Call site migration (core/admin.php, core/user.php, admin/index.php, index.php):
  • All remaining setTemplateBlock() and setTemplateWarning() calls replaced with $tpl->getHtmlFrag()
  1. Tests cleanup (tests/):
  • Removed TemplateBridgeFallbackTest, TemplateBridgeFlowTest, TemplateIfTest, TemplateTest
  • Updated ViewTestBootstrap and TemplateValidationTest for new class path
  1. Misc (modules/main/index.php, templates/default/layouts/main.html):
  • Fixed mojibake in Russian content strings to proper UTF-8
  • Added templates/default/layouts/main.html as new default layout file

Benefits:

  • Single Template class is now the only rendering engine; old string-replace system removed
  • Visitor tracking isolated in named functions; setHead() reduced in scope
  • Theme functions return data arrays instead of rendered strings

Technical notes:

  • setTemplateBlock(), setTemplateWarning(), setTemplateBasic() no longer exist
  • storage/counter/ips.log removed from version control
23.03.2026
Docs: migrate order admin info to Markdown and update database docs
Автор: Eduard Laas | Дата: 15:32 23.03.2026

Core changes:

  • modules/order/admin/info/russian.html: removed (replaced by Markdown)
  • modules/order/admin/info/ru.md: new Markdown version of order admin docs
  • admin/info/database/ru.md: updated database admin documentation
Refactor: migrate setTemplateBasic to getHtmlFrag in core system files
Автор: Eduard Laas | Дата: 15:32 23.03.2026

Extended description: Complete replacement of setTemplateBasic() calls with $tpl->getHtmlFrag() in the core system files.

Core changes:

  • core/system.php: code, quote, hide, categories fragments via $GLOBALS['tpl']
  • core/admin.php: admin panel core helpers
  • core/template.php: template engine core
  • core/user.php: user system helpers

Benefits:

  • Core layer fully migrated to new Template API
  • setTemplateBasic() can now be considered deprecated/unused
Refactor: migrate setTemplateBasic to getHtmlFrag in remaining frontend modules
Автор: Eduard Laas | Дата: 15:32 23.03.2026

Extended description: Complete replacement of setTemplateBasic() calls with $tpl->getHtmlFrag() in all remaining frontend module index.php and common.php files.

Core changes:

  • modules/auto_links/index.php
  • modules/changelog/common.php
  • modules/clients/index.php
  • modules/content/index.php
  • modules/faq/index.php, files/index.php, forum/index.php
  • modules/help/index.php, jokes/index.php, links/index.php
  • modules/media/index.php, news/index.php, pages/index.php
  • modules/search/index.php, users/index.php
  • modules/voting/index.php, whois/index.php

Benefits:

  • All frontend modules now use unified Template API
  • Completes the full setTemplateBasic -> getHtmlFrag migration
Refactor: migrate setTemplateBasic to getHtmlFrag in core admin files
Автор: Eduard Laas | Дата: 15:32 23.03.2026

Extended description: Complete replacement of setTemplateBasic() calls with $tpl->getHtmlFrag() in admin/index.php and all admin/modules/*.php files.

Core changes:

  • admin/index.php: main admin entry point
  • admin/modules/*.php: 24 admin panel modules (admins, blocks, categories, comments, config, database, editor, favorites, fields, groups, lang, messages, modules, monitor, newsletter, privat, ratings, referers, replace, scheduler, security, statistic, template, uploads)

Benefits:

  • Completes full admin layer migration to Template API
  • monitor.php: nested helper arrays cleaned of {%key%} wrappers

Technical notes:

  • global $tpl; moved inside function bodies where needed
  • basic-monitor.html handles 60+ variables via flat key/value map
Refactor: migrate setTemplateBasic to getHtmlFrag in all module admin files
Автор: Eduard Laas | Дата: 15:32 23.03.2026

Extended description: Complete replacement of setTemplateBasic() calls with $tpl->getHtmlFrag() across all 23 module admin/index.php files.

Core changes:

  • 23 files: modules/*/admin/index.php
  • Primary patterns: open, close, form-conf fragments
  • Added global $tpl; where missing inside function bodies

Benefits:

  • Uniform Template API across entire admin layer
  • Fragments resolved from templates/admin/fragments/ directory

Technical notes:

  • setTemplateBasic('open') -> $tpl->getHtmlFrag('open', [])
  • setTemplateBasic('form-conf', ['{%key%}' => $val]) -> $tpl->getHtmlFrag('form-conf', ['key' => $val])
Refactor: migrate setTemplateBasic to getHtmlFrag in account and shop modules
Автор: Eduard Laas | Дата: 15:32 23.03.2026

Extended description: Complete replacement of all setTemplateBasic() calls with $tpl->getHtmlFrag() in the account and shop frontend modules.

Core changes:

  • modules/account/index.php: migrated ~57 calls across all functions (newuser, finnewuser, view, profil, last, privat, favorites, passlost, passmail, edithome)
  • modules/shop/index.php: migrated 24 calls across all functions (shop, liste, view, kasse, clients, rech, partners)
  • Added global $tpl; declarations to clients() and rech() functions in shop

Benefits:

  • Consistent Template API usage across all frontend modules
  • Auto-escaped output via {{ }} prevents XSS by default
  • Flat key/value arrays instead of nested {%key%} wrappers

Technical notes:

  • if_flag booleans flattened: ['if_flag' => ['bool' => $x]] -> ['key' => $x]
  • Raw HTML passed via {{{ }}} triple braces in templates
Feature: relocate template root files to fragments/ and add new fragment templates
Автор: Eduard Laas | Дата: 15:30 23.03.2026

All existing template root files for admin and lite themes have been moved into the fragments/ subdirectory to align with the new Template runtime API. New fragment templates for account, shop, assoc, liste, and base UI elements were added to templates/default/fragments/ and matching themes.

Core changes:

  1. Admin templates relocated (templates/admin/):
  • Moved 18 root HTML files (open, close, form-conf, panel-admin, etc.) into fragments/
  • form-conf.html converted from {%var%}/{%if%} to {{ }}/{{{ }}}/{% if %} syntax
  1. Lite templates relocated (templates/lite/):
  • Moved ~120 root HTML files into fragments/ subdirectory
  • All account-, shop-, assoc-, liste-, forum-, voting- fragments migrated
  1. New default fragments (templates/default/fragments/):
  • 22 account-* templates (login, register, view, edit, avatar, passlost, etc.)
  • 13 shop-* templates (title-link, kasse-form, order-table, rech, partners-*, etc.)
  • basic-shop.html, basic.html, assoc-, liste-, table-close, users-*, voting-basic

Benefits:

  • Fragment templates now resolved via $tpl->getHtmlFrag() in all themes
  • Consistent fragments/ subdirectory layout across default, admin, lite, simple themes
  • XSS boundary enforced: {{ }} for text, {{{ }}} for pre-built HTML

Technical notes:

  • templates/admin/fragments/ previously only had alert.html; now has 19 files
  • templates/lite/fragments/ newly populated with full fragment set
  • No change to template engine code; only file locations updated
Хотите опробовать SLAED CMS в действии?
Идеи и предложения
Обратная связь
Подтверждение

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

Предварительный просмотр