Последнии сообщения форума
Completes path-constant migration across admin modules, core, parser, and front-end modules so all filesystem operations use absolute paths regardless of the working directory. Also rewrites the shop CSV import to eliminate raw SQL string concatenation in favour of getSqlValue() closures.
Core changes:
- Path constants (admin/modules/, core/system.php, core/admin.php, blocks/img.php):
Replace 'blocks/', 'templates/', 'uploads/', 'config/' literals with BASE_DIR, UPLOADS_DIR, CONFIG_DIR throughout scandir/file_exists/include/fopen * blocks.php: scandir, file_get_contents, fopen, file_exists all absolutised * config.php: logo dir scans, is_file checks use BASE_DIR prefix * template.php: all template dir reads use BASE_DIR/templates/ * uploads.php: all upload dir ops use UPLOADS_DIR * core/admin.php: getAdminUploadFiles() separates filesystem path from web URL ($pub) * blocks/img.php: opendir uses UPLOADS_DIR constant
- Parser (core/classes/parser.php):
- file_exists/getimagesize/create_img_gd use absolute $path/$tpath
- mkdir() adds 0777 + recursive flag
- Web-facing $file/$tfile remain relative for URL output
- Core system (core/system.php):
- upload(): normalise $directory to absolute at function entry
- render_blocks(): include via absolute BASE_DIR path
addSitemapTask(): sitemap.xml and sitemap-N.xml use BASE_DIR prefix; addCompress() receives dirname($file); web links use basename() only
- getImgText(): file_exists check uses absolute path
- getEditorFileData(): strip BASE_DIR prefix to produce relative web URL
- getEditorUploadData(): return both 'dir' (relative) and 'path' (absolute)
- doScript(): config/header.php include uses CONFIG_DIR constant
- Modules (modules/):
- account/admin, account: scandir/is_dir use BASE_DIR/templates/
- clients/admin, clients/index: filemtime/file_exists/addCompress use UPLOADS_DIR
- files/admin: file_exists/filesize/rename use absolute path helper
- main, media: file_exists for img check uses BASE_DIR prefix
- shop/index: CSS existence check uses BASE_DIR/templates/
- Shop CSV import (modules/shop/admin/index.php):
- Replace raw string interpolation ('...' = '$data[N]') with getSqlValue() closure
- Build SET and VALUES as arrays, implode for final query
- Add continue guard for unrecognised CSV type
- Guard setRedirect with $idb !== '' check
- Fix broken © encoding in file header
Benefits: - All filesystem I/O uses absolute paths — no CWD dependency - shop import no longer builds raw SQL strings from CSV data - parser thumbnail creation is race-condition safe (mkdir recursive)
Technical notes: - Web-facing URLs (image src, href, download links) remain relative — only filesystem calls received absolute paths - BASE_DIR/UPLOADS_DIR/CONFIG_DIR defined in core bootstrap (index.php)
Completes the relocation of all runtime-generated data (cache, sitemap, counter) from hardcoded config/ subdirectories to CACHE_DIR, SITEMAP_DIR, COUNTER_DIR constants; adds mkdir() auto-creation guards so placeholder files are no longer needed in the repository.
Core changes:
- Storage paths (core/system.php, core/user.php):
Replace all config/cache/, config/sitemap/ literals with constants * setHead(), setFoot(), doScript(), doCss(), setScript(), setCss() * getOpenXsl() uses SITEMAP_DIR constant
- Directory auto-creation guards (core/system.php, core/admin.php):
- setSchedulerState(), addSchedulerHeartbeat(), addSchedulerTrigger(): create LOGS_DIR/scheduler/ if absent
- addSitemapTask(): create SITEMAP_DIR before file_put_contents; return 'failed' on mkdir error
- getStatistic(): create COUNTER_DIR/statistic/ before imagepng() write
- Sitemap module (modules/sitemap/, modules/sitemap/admin/):
- xslsave(): create SITEMAP_DIR on first XSL save
- sitemap(): wrap content in block-content fragment; show alert when empty
- Statistic (core/user.php, admin/modules/statistic.php):
- Guard file() call with is_file()/is_readable() check on statistic.log
- Guard scandir() against missing statistic dir
- Repository cleanup:
- Delete all tracked runtime data from config/backup/, config/cache/, config/counter/, config/sitemap/
- Rename config/sitemap/sitemap.xsl -> storage/sitemap/sitemap.xsl
- Update .gitignore: drop config/cache|counter|logs ignore rules, add !/storage/sitemap/sitemap.xsl exception
Benefits: - All runtime data behind constants — no hardcoded paths remain - Directories created on-demand; no empty placeholder files needed - Prevents fatal errors on clean installs where storage dirs are absent
Technical notes: - mkdir() pattern: !is_dir($d) && !mkdir($d, 0777, true) && !is_dir($d) — race-condition safe - sitemap.xsl retained as tracked file via .gitignore exception - Backward-compatible: CACHE_DIR/SITEMAP_DIR/COUNTER_DIR already defined in core bootstrap
Resolves dynamic var() references in admin base.css to concrete hex values for changelog, hover, vote-meter and progress tokens, avoiding cascading failures if source vars are absent. Standardises section comment headers in admin and lite theme CSS to a consistent English 'Category: description' format, replacing Russian and German inline headers.
Core changes:
- Admin base tokens (templates/admin/assets/css/base.css):
Replaced var(--sl-color-*) with concrete hex for changelog, hover, vote-meter, and progress token groups
- Admin theme comments (templates/admin/assets/css/theme.css):
- Standardised section headers to 'Category: description' format
- Lite base (templates/lite/assets/css/base.css):
- Removed blank lines after section comment headers
- Lite theme comments (templates/lite/assets/css/theme.css):
- Translated Russian/German section headers to English
- Merged redundant split comment blocks into single descriptive headers
Benefits: - Admin tokens no longer depend on var() resolution order - Consistent English comment style across admin and lite templates
Updates global.php to disable dev_mode for production and rotates the sitekey. Regenerates local.php as a full runtime cache in the new format (_meta + _config) reflecting the current merged source config state.
Core changes:
- Config cache (config/local.php):
Expanded from minimal _meta stub to full _meta + _config snapshot * _meta: updated base_fingerprint, cache_version = 1, generated_at timestamp * _config: complete merged configuration for all active modules
- Global settings (config/global.php):
- dev_mode: '1' -> '0'
- sitekey: rotated to new value
Benefits: - Runtime config is pre-built; no rebuild overhead on first cold request - dev_mode off prevents automatic fingerprint updates in production
Technical notes: - local.php is auto-regenerated by getConfig() on any cache miss
Replaces the previous four-function approach (getConfig + filterConfigMerge + getConfigFingerprint + setConfigFingerprint) with a single getConfig that either returns the cached _config from local.php on a cache hit, or rebuilds and writes the full cache on a miss.
Core changes:
- Config loader (core/system.php):
Replaced runtime merge of local.php overrides with cache-first read * Returns _config directly when cache_version sentinel matches * Rebuilds full local.php cache on miss, then returns $conf
- Removed filterConfigMerge, getConfigFingerprint, setConfigFingerprint helpers
- Renamed $exp -> $export closure in setConfigFile for consistency
Benefits: - Eliminates repeated filesystem glob and array merge on every request - Simplifies config flow: one path to load, one path to rebuild - local.php is now the authoritative runtime snapshot, not an override layer
Technical notes: - local.php now stores _meta.cache_version = 1 as cache sentinel - Cache invalidated automatically when any source config file changes - Backward-compatible: falls back to full rebuild if local.php is absent
Separates lite template CSS into base.css (element styles only) and theme.css (all .sl-* component classes). Removes retired templates/default and templates/simple directories. Switches active theme to 'lite'.
Core changes:
- CSS architecture (templates/lite/assets/css/):
- Created base.css with @font-face, :root vars, CSS reset and element styles only
- Moved all .sl-* component classes from old base.css into theme.css
- Deleted new.css and system.css (intentionally unused)
- Applied Prettier formatting across both files
- Admin CSS (templates/admin/assets/css/):
- Moved .bi { font-size: var(--sl-size-icon); } from base.css to theme.css
- Applied Prettier formatting across base.css and theme.css
- Template cleanup:
- Removed templates/default/ entirely (retired template)
- Removed templates/simple/ entirely (retired template)
- Renamed block-languages to sl-block-languages in lite/partials/form-wrap.html
- Renamed admin-searchbox to sl-admin-searchbox in lite/partials/searchbox.html
- Config (config/global.php):
- Switched active theme from 'default' to 'lite'
- Updated sitekey and base_fingerprint
Benefits: - Clear separation: base.css = element styles only, theme.css = all components - All component classes consistently under sl-* namespace - Codebase free of unused legacy template directories
Technical notes: - Prettier 2-space indent applied; compact CSS expanded to multiline - templates/lite/assets/css/base.css is a new file (previously merged into theme.css)
Document the full performance audit covering frontend and admin paths, measured with Playwright and PHP-side profiling across warm and cold request scenarios.
Core changes:
- Docs (docs/PERFORMANCE_AUDIT_REPORT.md):
- Full audit report with measured ms timings per function
- Frontend findings: getBlocks, setHead, GeoIP, getConfig
- Admin findings: admininfo, getAdminPanelBlocks, news admin page
- Prioritized fix targets and bottom-line summary
- Docs (docs/PERFORMANCE_AUDIT_2026-05-18.md):
- Browser TTFB measurements (Playwright v1.60)
- v6.2 vs v6.3 comparison table
- 50 categorized findings: 17 KRITISCH, 20 MITTEL, 13 GERING
- Cold-start analysis and top-10 fix priorities
- Docs (docs/PERFORMANCE_TEMPLATE_IO.md):
- Template I/O findings from the audit session
Benefits: - Traceable baseline for optimization work - Concrete measured numbers per hotspot - Prioritized fix list with expected ms savings
Rotate the sitekey value and regenerate the base_fingerprint to match the current config state after local testing.
Core changes:
- Config (config/global.php):
- Update sitekey to current value
- Config (config/local.php):
- Regenerate base_fingerprint





