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

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

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

Всего: 1045 Доступных коммитов | Отфильтровано: 1045 Коммиты | Страница: 55 / 105
08.04.2026
Refactor: database module — migrate table rendering and alerts to new fragment API
Автор: Eduard Laas | Дата: 15:27 08.04.2026

Replace getTplAdminTable, getTplAdminTableHead, getTplAdminTableRow, getTplAdminTableCells, getTplAdminFlagBox and old alert fragment calls with new/* fragment API throughout. Replace getTplAdminNavi with getTplAdminTabs in all handler functions.

Core changes:

  1. getSqltable (admin/modules/database.php):
  2. Replace getTplAdminFlagBox with inline new/inline-badge fragment call
  3. Replace getTplAdminTableRow + getTplAdminTableCells with new/table-row + new/table-cells
  4. Replace getTplAdminTable + getTplAdminTableHead with new/table fragment (disable_sort)
  5. getSqlsum (admin/modules/database.php):
  6. Replace getTplAdminInfoLine lines and old alert fragment with new/alert using lines array
  7. Inline status as plain text (_OK / _ERROR) instead of inline-badge
  8. All handler functions (dump, dblock, etc.):
  9. Replace getTplAdminNavi with getTplAdminTabs
  10. Replace old alert type-string calls with new/alert is_warn bool

Benefits:

  • Removes dependency on all deprecated getTplAdmin* table helpers
  • Alert rendering consistent with rest of admin via new/alert

Technical notes:

  • disable_sort: true used on SQL log table (row order is query-defined)
  • new/alert lines array renders each element as a separate paragraph
Refactor: editor module — migrate to new fragment API with HTMX form and CSRF guard
Автор: Eduard Laas | Дата: 15:27 08.04.2026

Replace all legacy fragment and helper calls with new/* fragment API. Rebuild getEditbox as a new/form with HTMX attributes, box_id anchor, and inline token. Add CSRF check to save() with HTMX-aware response. Replace robots button fragment with new/button and inline onclick. Add global $tpl declaration to renderEditorPage.

Core changes:

  1. getEditbox (admin/modules/editor.php):
  2. Replace getTplAdminNavi with getTplAdminTabs
  3. Replace admin-editor-note-panel with box partial using box_id repeditornote
  4. Replace alert fragments with new/alert (is_warn flag instead of type string)
  5. Replace getTplAdminForm + row helpers with new/form (form_attr, rows, hidden, submit_label)
  6. Replace textarea_code direct call with getTplCodeEditor helper
  7. getRobotsButton (admin/modules/editor.php):
  8. Replace admin-editor-robots-button fragment with new/button + button_attr containing data-robots-template and inline onclick for CodeMirror setValue/focus

  9. renderEditorPage (admin/modules/editor.php):
  10. Replace admin-editor-root-panel fragment with box partial using box_id repeditor
  11. Add missing global $tpl declaration
  12. save() (admin/modules/editor.php):
  13. Add checkSiteToken() guard with HTMX-aware early echo for new/alert is_warn
  14. info() (admin/modules/editor.php):
  15. Replace setAdminInfoPage with setTplAdminInfoPage

Benefits:

  • CSRF guard in save() closes missing token check for file write operations
  • HTMX partial replacement targets named box_id anchors (repeditor, repeditornote)
  • No module-specific fragments remain; all replaced by new/* contracts

Technical notes:

  • getTplCodeEditor called with mode, id, name, text — API unchanged
  • form_attr passed through new/form via form.html form_attr extension
Refactor: categories module — migrate to new fragment API with CSRF guard in fix()
Автор: Eduard Laas | Дата: 15:27 08.04.2026

Replace getTplAdminNavi with getTplAdminTabs throughout. Replace getTplAdminPlaceholder and legacy alert fragment calls with new/alert and box partial. Add CSRF token validation to fix() with early return on failure. Add module search widget as subtitle.

Core changes:

  1. categories(), add(), subadd(), addedit(), edit() (admin/modules/categories.php):
  2. Replace getTplAdminNavi with getTplAdminTabs (same op/tab arrays, no subtabs)
  3. Replace getTplAdminCatSearch + sub param with subtitle_html via getHtmlPart searchbox
  4. Replace getTplAdminPlaceholder with $tpl->getHtmlPart('box', ['box_id' => ...])
  5. Replace alert fragment calls with new/alert
  6. fix() (admin/modules/categories.php):
  7. Add checkSiteToken() guard with early return and getTplAdminTabs header output
  8. Prevents category reorder endpoint from being called without a valid CSRF token
  9. add() and related form functions:
  10. Replace admin-categories-add-rows fragment with getTplRadioGroup and new/* inputs
  11. Form rows passed as structured arrays to new/form fragment

Benefits:

  • CSRF protection in fix() closes a missing token check
  • Subtitle search widget aligned right in module head via new flex layout
  • All legacy admin- fragment calls replaced by new/ contracts

Technical notes:

  • getTplAdminNavi no longer called from this module
  • No behavioral changes to category CRUD logic
Refactor: core/admin — migrate category, block and favorite lists to new fragment API
Автор: Eduard Laas | Дата: 15:26 08.04.2026

Replace all module-specific table/row fragment helpers in getAdminCategoryList, getAdminBlockList and getAdminFavoriteList with direct new/table, new/table-row, new/table-cells, new/title-tip and new/row-actions fragment calls.

Core changes:

  1. getAdminCategoryList (core/admin.php):
  2. Build tipItems array for new/title-tip (description, subcategory, language)
  3. Replace getTplAdminCategoryRow with new/table-row + new/table-cells inline
  4. Replace getTplAdminCategoryTable with new/table fragment (disable_sort, colspan for weight)
  5. Replace getTplAdminMoveControls with getTplMoveControls
  6. Inline delete action as row-actions item with onclick_attr
  7. getAdminBlockList (core/admin.php):
  8. Build tipItems array for new/title-tip (name, language, expiry)
  9. Replace getTplAdminBlockRow with new/table-row + new/table-cells inline
  10. Replace getTplAdminBlockTable with new/table fragment (disable_sort, colspan for weight)
  11. Inline status-change, edit and delete as row-actions items with onclick_attr
  12. getAdminFavoriteList (core/admin.php):
  13. Analogous migration to new/table-row + new/table-cells + new/table

Benefits:

  • Removes dependency on all deleted module-specific row/table fragments
  • Table header defined inline as data; no separate head fragment needed
  • Action menus built from structured arrays; no string concatenation

Technical notes:

  • disable_sort: true used for reorderable lists where JS sort would conflict
  • Colspan 2 on weight column accounts for the adjacent move-controls cell
  • All onclick_attr values use htmlspecialchars on title to prevent XSS
Refactor: helpers — promote getTplMoveControls and extend getTplAdminTabs
Автор: Eduard Laas | Дата: 15:26 08.04.2026

Move getTplMoveControls from helpers-old to helpers as a stable new-layer helper. Extend getTplAdminTabs to pass tabs_id, is_runtime, tabs_index and tabs_sync_selector to the module-head fragment, and forward link_attr and rel per tab link. Remove deprecated module-specific table/row helpers from helpers-old.

Core changes:

  1. core/helpers.php:
  2. getTplAdminTabs: pass tabs_id, is_runtime, tabs_index (from tab or tabs_index key), tabs_sync_selector, link_attr and rel to the new/module-head fragment

  3. getTplMoveControls: new stable helper replacing getTplAdminMoveControls in old layer; renders new/move-controls fragment with HTMX transport and token-safe URLs

  4. core/helpers-old.php:
  5. Remove getTplAdminMoveControls (superseded by getTplMoveControls in helpers.php)
  6. Remove getTplAdminCategoryTable, getTplAdminCategoryRow
  7. Remove getTplAdminBlockTable, getTplAdminBlockRow
  8. Remove getTplAdminFavoriteTable, getTplAdminFavoriteRow
  9. Remove getTplAdminPrivateTable, getTplAdminPrivateRow
  10. Remove getTplAdminFilesTable, getTplAdminFilesRow
  11. Update getTplAdminFlagBox to use new/inline-badge fragment

Benefits:

  • getTplMoveControls is now a first-class new-layer helper
  • getTplAdminTabs covers all new module-head contract attributes in one call
  • Removes ~110 lines of deprecated, module-specific rendering code

Technical notes:

  • All callers of removed helpers have been migrated to direct fragment rendering
  • getTplAdminFlagBox still exists in helpers-old for legacy callers not yet migrated
Feature: tabs.js — add data-sl-tabs-sync selector support and extract index variable
Автор: Eduard Laas | Дата: 15:26 08.04.2026

Tab switching now reads data-sl-tabs-sync from the root element and updates matching DOM nodes (e.g. hidden inputs) with the active tab index on every pick.

Core changes:

  1. tabs.js (setAdminTabs):
  2. Read data-sl-tabs-sync attribute from the tabs root element
  3. Extract tab index into local var before the loop (avoids repeated indexOf call)
  4. On pick: query all syncSelector nodes and set their .value to the active index
  5. Reuse index var for sessionStorage and info-link URL param (no behavior change)

Benefits:

  • Enables tab index persistence into hidden form inputs without PHP-side coupling
  • Reduces redundant list.indexOf(link) calls inside the pick handler

Technical notes:

  • Backward compatible: if data-sl-tabs-sync is absent, behavior is unchanged
  • Complements the new tabs_sync_selector attr added to module-head.html
Refactor: CSS — migrate move-controls to new layer and polish admin layout
Автор: Eduard Laas | Дата: 15:26 08.04.2026

Move legacy sl_bl_up/down styles from system.css to new.css under sl-* naming. Improve alert border-radius and module-head flex layout for subtitle alignment.

Core changes:

  1. new.css:
  2. Add .sl-bl-up / .sl-bl-down (move controls, replaces legacy sl_* equivalents)
  3. Add border-radius: 6px to .sl-warn and .sl-info alert boxes
  4. Refactor .sl-module-head-body to flex with space-between for subtitle alignment
  5. Fix .sl-module-head-subtitle margin and searchbox float reset
  6. system.css:
  7. Remove legacy .sl_bl_up / .sl_bl_down rules (now covered by new.css)

Benefits:

  • Move-control styles now live in the new layer alongside the move-controls fragment
  • Alert boxes visually consistent with rounded corners
  • Module head subtitle (e.g. search widget) aligns right without float hacks

Technical notes:

  • No behavior change; purely visual and structural CSS migration
  • sl_* legacy classes remain unaffected elsewhere
Refactor: admin fragments — extend base layer and remove module-specific fragments
Автор: Eduard Laas | Дата: 15:25 08.04.2026

New fragment contracts replace module-specific HTML templates with neutral, reusable fragments aligned to the new admin base layer architecture.

Core changes:

  1. New fragments (templates/admin/fragments/new/):
  2. inline-badge.html: colored status badge (replaces admin-flag-box)
  3. move-controls.html: HTMX up/down reorder controls (replaces admin-move-controls)
  4. Extended fragments (templates/admin/fragments/new/):
  5. form.html: add optional form_attr pass-through for HTMX attributes
  6. label-hint.html: switch hint to triple-braces to allow HTML content
  7. module-head.html: add tabs_id, is_runtime, tabs_index, tabs_sync_selector attrs
  8. row-actions-item.html: add link_attr for HTMX and custom attributes on links
  9. table.html: add disable_sort flag to suppress data-sl-table-sort
  10. th.html: add colspan support
  11. Extended partials (templates/admin/partials/):
  12. box.html: add optional box_id attribute for HTMX target anchoring
  13. Removed module-specific fragments (13 files):
  14. admin-block-row.html, admin-block-table.html
  15. admin-category-row.html, admin-category-table.html
  16. admin-editor-note-panel.html, admin-editor-robots-button.html, admin-editor-root-panel.html
  17. admin-favorites-row.html, admin-favorites-table.html
  18. admin-files-row.html, admin-files-table.html
  19. admin-private-row.html, admin-private-table.html

Benefits:

  • All callers now use neutral new/* contracts instead of module-specific fragments
  • box_id enables HTMX partial replacement without extra wrapper elements
  • Reduces total fragment count; eliminates one-off module templates

Technical notes:

  • inline-badge replaces getTplAdminFlagBox output contract
  • move-controls replaces getTplAdminMoveControls output contract
  • Deleted fragments had no callers remaining after module migration
07.04.2026
Chore: enable dev_mode and update base_fingerprint for local dev
Автор: Eduard Laas | Дата: 23:05 07.04.2026

Local development configuration adjustments only; no production impact.

Core changes:

  1. config/global.php:
  2. Set dev_mode from '0' to '1' to activate debug output locally
  3. config/local.php:
  4. Remove header comment block and example overrides
  5. Set base_fingerprint to current computed value

Benefits:

  • Template debug alerts (getTemplateDebugComment) now active in dev
  • Fingerprint kept current for asset cache-busting

Technical notes:

  • These files should not be deployed to production as-is
Refactor: config module — migrate to new fragment API with tab persistence
Автор: Eduard Laas | Дата: 23:05 07.04.2026

Full rewrite of admin/modules/config.php UI layer to use the canonical fragment API. Tabs now persist across page loads via URL ?tab=N parameter, and the INFO link always reflects the currently active tab.

Core changes:

  1. config() function:
  2. Replace getTplAdminNavi() with getTplAdminTabs() and new/tabs fragment
  3. All 7 tab panels rebuilt using new/tabs-panel fragments
  4. All form inputs migrated: getTplTextInput/Textarea/Select → getHtmlFrag

    • input: text, url, email, number types with is_config, maxlength, placeholder
    • textarea: with is_config, is_required, cols_num, rows_num
    • select/select-option fragments replace getTplSelect/getTplOption
  5. Tabs rendered with init_attr="data-sl-tabs-index=N" for JS state sync
  6. INFO link rendered with data-sl-tab-info-link="config" for URL sync
  7. Form rebuilt via new/form fragment (hidden tokens, content_html slot)
  8. save() function:
  9. Add CSRF token check at entry; render alert on failure and return early
  10. Fix: getVar('req' → 'post') for startdate field
  11. Fix: $xhomeurl trailing-slash strip guarded against empty string
  12. info() function:
  13. Complete rewrite: replaces setAdminInfoPage() with inline rendering
  14. Tab nav built with new/tabs fragment (plain links, INFO tab is_active)
  15. Reads locale-specific .md/.html file from admin/info/config/
  16. Editable via new/form fragment when $conf['adminfo'] is set
  17. CSRF token checked on save_info POST; alert shown on failure

Benefits:

  • Tab state survives reload via ?tab=N without sessionStorage conflicts
  • Consistent API across all admin modules
  • CSRF check in save() closes gap that existed in original implementation

Technical notes:

  • getTplAdminNavi/getTplAdminTabContent/getTplAdminTabsSetup calls removed
  • Backward-compatible: config keys and save logic unchanged

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

1 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 105
Хотите опробовать SLAED CMS в действии?
Идеи и предложения
Обратная связь
Подтверждение

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