Журнал изменений
Replace legacy template helpers (getTplOption, getTplSelect, getTplAdminNavi, getTplAdminSearchBox, admin-*-form fragments) with the unified new/ fragment API across five admin modules, improving consistency and removing deprecated paths.
Core changes:
- Scheduler (admin/modules/scheduler.php):
- Replace getTplAdminNavi with getTplAdminTabs
- Replace getTplAdminTipLine string concatenation with structured $tips array
- Replace custom action form+link HTML with $acts arrays using row-actions-item fragments
Use token-carrying GET links for run/unlock/delete actions instead of POST forms
- run action now gated behind job[manual] === 1 flag
- Replace old alert() fragments with new/alert fragments
- Security / bansave (admin/modules/security.php):
- Refactor bansave(): move all logic under if (!$warn) guard using $warn pattern
Remove manual opcache_invalidate and file re-include for config reload
- Use $conf['security'] directly instead of re-reading security.php
- Migrate token-error path to setRedirect flash instead of inline echo
- Statistic (admin/modules/statistic.php):
- Replace getTplOption/getTplSelect with new/select-option + new/select fragments
- Replace getTplAdminSearchBox + admin-statistic-search-form with new/form + searchbox part
- Replace getTplAdminNavi with getTplAdminTabs using subtitle_html for search bar
- Replace admin-statistic-image with new/image-preview fragment
- Template (admin/modules/template.php):
Add getTemplateFiles(), getTemplateHtmlFiles(), getTemplateCssFiles() helpers
- Use RecursiveIteratorIterator instead of manual scandir loops
- Add getTemplateTabsOps() for consistent tab URL generation
- Migrate getTemplateSearch() to new/select-option + new/form + searchbox part
- Remove preg_match('/\./', $file) guard; replace with is_dir() check
- Uploads (admin/modules/uploads.php):
- Migrate getUploadsSearch() to new/select-option + new/form + searchbox part
- Migrate upload form to new/form with structured rows and hidden arrays
- Replace admin-uploads-upload-rows fragment with inline new/input fields
- Replace old alert() with new/alert fragments
Benefits:
- Eliminates six deprecated template helpers from admin module code paths
- Scheduler run/unlock/delete no longer require hidden POST forms per row
- Security bansave is simpler and does not perform redundant config file re-reads
Technical notes:
- Scheduler manual flag (job[manual]) gates the Run action; built-in jobs are not manually runnable
- Template RecursiveIteratorIterator replaces nested scandir and covers subdirectories
- No changes to config keys, DB schema, or public-facing URLs
Minor targeted fixes across four admin modules, each addressing a distinct correctness or style issue found during review.
Core changes:
- Security fix (admin/modules/blocks.php):
Replace filter_input(INPUT_POST, 'blocktext', FILTER_UNSAFE_RAW) with getVar('post', 'blocktext', 'raw', '')
- Aligns with project security baseline requiring getVar for all user input
- Fix tab index in add(): change active tab from 1 to 3 (Add new block tab)
- Comment config form (admin/modules/comments.php):
Replace deprecated com_access() helper with explicit $tpl->getHtmlFrag('new/select', ...) call
- Uses standard select-option fragments with three anonpost values: 0, 1, 2
- Indentation (admin/modules/config.php):
Fix save() function body: indent $protect/$kprotect block and $cont array
- Code was at column 0 inside the if (!$warn) block
- Replace module (admin/modules/replace.php):
Remove is_required => true from two field fragment calls
- Fields allow empty values; required constraint was incorrect
Benefits:
- All user input in blocks.php now goes through the getVar security layer
- Consistent indentation in config.php save() matches surrounding style
Technical notes:
- No behavior change in config.php or replace.php; purely cosmetic corrections
- com_access() is no longer referenced in comments.php
Extend two helper functions to support new use cases introduced by the admin module migration to the new template fragment API.
Core changes:
- setTplAdminInfoPage / getTplAdminTabs (core/helpers.php):
Pass subtitle_html from data array through to getTplAdminTabs call
- Allows info-page callers to inject a search or filter bar below tabs
- getTplCodeEditor (core/helpers.php):
- Add optional height parameter support
When height is set, emit inline script to call editor.setSize(null, height)
- Targets the specific editor instance by textarea id to avoid conflicts
- getAdminCategoryList (core/admin.php):
Reduce cutstr title length from 50 to 45 characters
- Prevents overflow in tip-label cells at standard column widths
Benefits:
- Admin modules using setTplAdminInfoPage can now pass subtitle search bars
- Code editors in full-width rows respect explicit height constraints
Technical notes:
- getHtmlScriptInline is used for the inline height script (existing helper)
- subtitle_html defaults to empty string when not provided
Two unrelated visual fixes in the admin stylesheet plus a new layout rule for full-width code editor fields inside sl-div-item-full containers.
Core changes:
- Table sort last-column header (new.css, system.css):
- Change text-align from right to left for consistency with other headers
- Restore padding-right from 8px to 16px to match standard header padding
- Sort icon pseudo-element (system.css):
- Add width: 10px and text-align: center to the ::after arrow indicator
- Reduce padding-right from 18px to 16px on .sl_sort* cells
- CodeMirror full-width in sl-div-item-full (new.css):
Add rule: .sl-div-item-full .sl-div-field .sl_form and .CodeMirror
- width: 100%, max-width: 100%, box-sizing: border-box
- Prevents code editor overflow in full-width layout rows
Benefits:
- Sort icons are properly centered and do not overflow cell padding
- Code editor fields render flush to the container in full-width rows
Technical notes:
- Both .sl_table_list_sort (system.css) and .sl-table-list-sort (new.css) updated
- No changes to HTML structure required
Update the display name for the search-bot settings section from the vague 'Search bots' / 'Поисковые боты' phrasing to the more precise technical term 'Crawlers' / 'Краулеры' across all six language files.
Core changes:
- Language constant _BOTSOPT (admin/lang/*.php):
- en.php: 'Search bots' → 'Crawlers'
- ru.php: 'Поисковые боты' → 'Краулеры'
- de.php, fr.php, pl.php, uk.php: equivalent rename applied
Benefits:
- Consistent terminology with industry-standard crawler terminology
- Cleaner distinction between bots (generic) and crawlers (indexing agents)
Technical notes:
- Constant key _BOTSOPT is unchanged; only the display string updated
- No impact on logic or config keys
Normalize config files to align with code style rules and bring runtime data up to date after recent admin module refactoring.
Core changes:
- Copyright header (config/filetype.php, config/replace.php, config/statistic.php, config/uploads.php):
- Replace Unicode © with ASCII (c) for encoding consistency
- Alignment padding (config/replace.php, config/statistic.php, config/uploads.php):
- Remove extra spaces used to align array key-value pairs
- Upload thumbnail sizes (config/uploads.php):
Unify thumbnail max-width to 150px across all upload contexts
- Was inconsistent: 250, 260, 220 for different modules
- Security dump_skip (config/security.php):
- Swap order: vendor/ before tests/ in dump exclusion list
- Base fingerprint (config/local.php):
- Update to reflect current config state
Benefits:
- ASCII-only headers are portable across all editors and terminals
- Uniform thumbnail limit simplifies upload behaviour expectations
- Consistent padding style matches global.md alignment rules
Technical notes:
- No behavioral changes beyond thumbnail size normalization
- CRLF line endings in config/scheduler.php normalized to LF
- config/local.php fingerprint is a runtime artifact updated automatically
admin/info/modules/ru.md was missing a trailing newline at end of file. No content change.
Core changes:
- admin/info/modules/ru.md:
- Add missing trailing newline (EOF) to last line
- admin/info/admins/ru.md:
- Normalize CRLF line endings to LF
Benefits:
- Consistent file endings across all documentation files
- Eliminates spurious diff noise in future patches
Technical notes:
- Content unchanged; whitespace normalization only
animateSlide previously measured scrollHeight before showing the element, producing zero on hide and an incorrect start height on show. Running simultaneous slide animations on the same element also left orphaned animation state. This commit cancels any in-progress animations before starting a new one, sets the initial height explicitly after the element is visible (triggering a reflow), and switches from ease to linear easing to prevent height overshoot on fast toggles.
Core changes:
- Animation cancellation (plugins/system/slaed.js — animateSlide):
Call element.getAnimations() and cancel all active animations before starting
- Prevents stacked/conflicting animations when toggled rapidly
- Height measurement fix:
For show: set height 0px and trigger reflow before reading scrollHeight
- Ensures correct endHeight even on first-time display
For hide: capture offsetHeight into style.height before animating
- Prevents jump when element has non-auto height
- Easing change:
Switch from 'ease' to 'linear'
- Avoids perceived overshoot at end of animation at high durations
Benefits:
- Collapse/expand no longer glitches when triggered before previous animation ends
- Correct height on all browsers regardless of display timing
- Predictable animation feel for UI elements like toggle-form-block
Technical notes:
- getAnimations() is supported in all modern browsers; gracefully defaults to []
- No changes to the public HideShow / SlideUp / SlideDown API surface
- Opacity keyframe removed from slide animation (only height animates now)
Add new admin UI fragments and extend existing ones to support the flash notification system, collapsible form blocks, HTMX-driven pager links, and a unified module footer. Remove five legacy fragments replaced by the new generic API. Add alerts.js for auto-hiding flash banners. Extend new.css with all new component styles.
Core changes:
- New fragments:
- new/toggle-form-block.html: collapsible labeled form section with optional add-trigger
- new/module-foot.html: module list footer combining pager and bulk-action select
- new/image-preview.html: generic inline image preview by id/src/alt
- rating-like-live.html: HTMX-wired rating widget (rate1_query / rate5_query)
- rating-like.html: static rating widget (no HTMX) for non-admin contexts
- Deleted fragments (replaced by generic API):
- admin-fields-field-block.html → new/toggle-form-block
- admin-ratings-module-block.html → new/toggle-form-block
- admin-referers-search-form.html → new/form subtitle
- admin-replace-field-block.html → new/toggle-form-block
- comment-bulk-actions.html → inline new/div rows
- Updated fragments:
- new/alert.html: add is_flash / alert_attr support; render sl-alert-flash-bar
- new/form.html: add actions_html slot alongside submit_label
- new/pager-link.html: support query/target_id/push_url for HTMX pagination
- new/table.html: add is_wrapless branch that omits basecont wrapper
- pager-link.html: add query/target_id/push_url branch for HTMX
- comment.html: replace date+IP inline text with meta_tip slot; add z-index to actions
- CSS (templates/admin/assets/css/new.css):
- .sl-toggle-form-block and inner grid layout
- .sl-alert-flash / .sl-alert-flash-bar auto-hide animation
- .sl-plus sprite icon for collapsible triggers
- .sl-module-foot layout classes
- .sl-ratings-inner-row and .sl-lang-edit-row column overrides
- Responsive breakpoint for toggle-form-block-item
- Fix .sl-div-actions margin-top (was padding-top)
- JS (templates/admin/assets/js/alerts.js):
- initAdminAlerts(): binds auto-hide timer to [data-sl-autohide] elements
- Runs on DOMContentLoaded and htmx:load for HTMX-injected content
Benefits:
- Flash alerts auto-dismiss after 15 s without user interaction
- Pager links in admin lists are HTMX-navigable with browser history push
- Collapsible form blocks reduce visual noise in fields/ratings/replace modules
- Module footer unifies pager + bulk-action placement across all list views
Technical notes:
- rating-like-live.html replaces hover_query with separate rate1_query/rate5_query
- is_wrapless on new/table renders a bare <table> for use inside other containers
- alerts.js must be included in the admin layout after htmx.js
- Deleted fragments have no remaining callers after commit 4
Replace all inline token-check error pages with setRedirect flash calls. Migrate table rendering, form widgets, and action menus to the new fragment API (new/table, new/div, new/row-actions, new/select, new/input, new/form, new/toggle-form-block). Drop legacy getTplAdminNavi in favor of getTplAdminTabs across all remaining modules. Affected: admins, blocks, categories, comments, config, database, editor, favorites, fields, groups, lang, messages, modules, monitor, newsletter, privat, ratings, referers, replace, uploads.
Core changes:
- Token-check pattern (all modules):
- Replace full setHead/echo/setFoot guard blocks with $warn = !checkSiteToken()
- Pass flash text and $warn flag to setRedirect() on every POST/GET action
- Use _TOKENMISS (warn) or _SUCC* (success) constants from the new lang set
- Navigation migration (groups, ratings, lang, modules, newsletter, replace, referers):
- Replace getTplAdminNavi with getTplAdminTabs
- Remove getTplAdminTabsSetup and getTplAdminConfSave wrapper calls
- Form widget migration (fields, groups, lang, modules, ratings, newsletter, replace):
- Replace getTplTextInput / getTplSelect / getTplOption with new/input, new/select, new/select-option
- Replace getTplAdminFormRow with new/div rows array
- Replace getTplAdminTableHead / getTplAdminTable / getTplAdminTableRow with new/table, new/table-row, new/table-cells
- Replace getTplAdminActionMenu / getTplLinkAction with new/row-actions items
- fields module:
- Complete rewrite: runtime tab system using getTplAdminTabs is_runtime mode
- Replace admin-fields-field-block with new/toggle-form-block
- Fix field data parsing: use array_pad/explode instead of preg_match
- ratings module:
- Replace admin-ratings-module-block with new/toggle-form-block
- Replace radio_form with getTplRadioGroup for all per-module radio groups
- comments module:
- Add module-filter select with live onchange submit
- Replace comment-bulk-actions fragment with new/div rows + new/select
- Wrap list bottom in new/module-foot fragment
- Extend getTplPager call to filter by modul when selected
- referers module:
- Replace admin-referers-search-form with inline new/form subtitle
- Add token to all action URLs
- replace module:
- Replace admin-replace-field-block with new/toggle-form-block
- Migrate sort select to new/select-option
- favorites / privat modules:
- Use is_wrapless table, getTplPager with HTMX target
- favorites: deletion moved to module (op=delete) with token + confirm dialog
- Misc modules (blocks, categories, database, editor, config, monitor, uploads):
- Align token handling to $warn pattern
- Add _SUCC* flash messages on successful saves
Benefits:
- Eliminates ~40 duplicated inline error-page guard blocks
- Consistent UX: every action returns a flash notification instead of blank reload
- All form and table UI rendered through the new fragment API
- Removes dependency on getTplAdminNavi and related legacy helpers
Technical notes:
- getTplAdminNavi is now unused across all admin modules
- All destructive GET actions include getSiteToken() in the URL
- Field data for fields.php now uses 1-based index (field1/field2 instead of field2/field3)
- No database schema changes