Update all SQL queries across blocks and feature modules to use normalized column names; rename whois st_*/hometext columns; drop bundled pclzip library.
Core changes:
- blocks/*.php:
- Column renames in all block queries (lang, status, etc.)
- modules//index.php, modules//admin/index.php:
- All module queries updated for Batches M–V renames
- hometext→body, bodytext→body, description→intro, etc.
- modules/whois/:
- hometext → body, st_domain/st_host/st_dc → sdomain/shost/sdc
- INSERT and SELECT queries updated in both user and admin panels
- modules/clients/pclzip.lib.php:
- Removed bundled third-party library (5693 lines)
Benefits: - All modules consistent with normalized schema after migration - Whois column names follow single-letter-prefix convention - Repository size reduced by removing bundled dependency
Technical notes: - No logic changes in any module; pure column name substitution - pclzip removal: dependency must be managed externally if still needed
Update all SQL queries in core bootstrap and admin panels to use the normalized column names established by Batches M–V migrations.
Core changes:
- core/system.php:
- blang → lang (blocks), module → modul (session)
- link → url (referer/auto_links)
- core/admin.php, core/user.php, core/security.php:
- Remaining session/user/admin column renames
- admin/modules/*.php:
- All admin panel queries updated to new column names
Benefits: - Core layer consistent with normalized schema - No more column-not-found errors after migration
Technical notes: - No logic changes; pure column name substitution
Align fresh-install schema and all migration paths with current column naming conventions; add _whois to table.sql; fix audit findings found in idempotency review; rename st_domain/st_host/st_dc → sdomain/shost/sdc.
Core changes:
- table.sql:
- Apply all Batches M–V renames (pwd→password, lvisit→lastvis, etc.)
- Add _whois table (was missing from fresh install)
- Rename st_domain/st_host/st_dc → sdomain/shost/sdc
- batch_migrate.sql:
- Add Batches M–V: structural MODIFY, semantic renames, consistency fixes
- Fix idempotency bugs in addidx calls (stale intermediate column names)
- Add rencol calls for sdomain/shost/sdc rename
- table_update6_3.sql:
- Mirror all batch_migrate.sql fixes for 6.2→current upgrade path
- Add Batch U: _whois type normalization
- table_update6_3_finalize_local.sql:
- Local one-off finalizer for partially migrated live DB (not public path)
- setup/index.php:
- Apply column rename fixes to installer
Benefits: - Fresh installs and all migration paths produce identical schemas - Re-running migrations on already-migrated DBs no longer crashes - _whois is now created on fresh installs
Technical notes: - BOOLEAN alias = tinyint(1) in MariaDB; no wire-format change - sdomain/shost/sdc follow single-letter-prefix pattern (luid, eip, etc.) - table_update6_3_finalize_local.sql intentionally not idempotent
Completes the multi-batch schema modernization: all SQL column references in PHP have been updated to match the new normalized table.sql schema, and a one-time migration script has been added for existing installations.
Core changes:
- _users / _users_temp (Batch L) — modules/account/{index,admin/index}.php, modules/forum/index.php, admin/index.php:
- user_id → id, user_name → name, user_rank → rank, user_email → email
- user_website → website, user_avatar → avatar, user_regdate → regdate
- user_occ → occ, user_from → origin, user_interests → interest
- user_sig → sig, user_viewemail → viewmail, user_password → password
- user_storynum → storynum, user_blockon → blockon, user_block → block
- user_theme → theme, user_newsletter → newslet, user_fsmail → fsmail
- user_psmail → psmail, user_lastvisit → lastvis, user_lang → lang
- user_points → points, user_last_ip → lastip, user_warnings → warnings
- user_acess → access, user_group → grp, user_birthday → birthday
- user_gender → gender, user_votes → votes, user_totalvotes → tvotes
- user_field → field, user_agent → agent, user_network → network
- check_num → code (users_temp)
- All other tables (Batches A–K) — 60+ PHP files across admin/, blocks/, core/, modules/, setup/, templates/:
- _admins: lastvisit → lvisit
- _auto_links: sitename → title
- _blocks: bid → id, bposition → bpos, active → status, blanguage → blang, blockfile → bfile
- _categories: parentid → parent, cstatus → status, lpost_id → lpost
- _clients/_partners: id_user → uid, id_product → prod, id_partner → part, adres → addr
- _comment: date → time, host_name → ip
- _faq/_help/_news/_pages: fid/sid/pid → id, catid → cid, ip_sender → ip
- _files/_links: lid → id, totalvotes → tvotes, totalcomments → tcom
- _forum: catid → cid, l_uid/l_name/l_id/l_time → luid/lname/lpost/ltime, e_uid/e_ip_send/e_time → euid/eip/etime
- _jokes: jokeid → id, cat → cid, joke → hometext, ratingtot → ratetot
- _media: createdby → author, totalvotes → tvotes, totalcom → tcom
- _message: mid → id, active → status, mlanguage → lang
- _order/_privat/_referer/_voting: date → time
- _products: preis → price, totalvotes → tvotes
- _rating: host → ip
- _search: sl_id → id, sl_word → word, sl_modul → modul, sl_time → time, sl_score → score
- _session: host_addr → ip
- setup/sql/batch_migrate.sql (new):
- One-time ALTER TABLE RENAME COLUMN script for all 27 tables
- Includes RENAME INDEX where index names also changed
- Special DROP/ADD for _rating UNIQUE KEY (column composition changed)
Benefits: - SQL column names now match table.sql schema exactly across all 65 files - No more legacy user_*/ip_sender/totalvotes/catid/ip_send naming in codebase - Migration script enables clean upgrade path for existing installations
Technical notes: - PHP placeholder names (:user_name, :user_id, etc.) intentionally unchanged - HTML form field names (name="user_name") intentionally unchanged - batch_migrate.sql requires MySQL 8.0+ or MariaDB 10.5+ (RENAME COLUMN support)
Complete overhaul of the search module and admin template covering security hardening, config migration, and the new search admin interface.
Core changes:
- Search module (modules/search/index.php, config/search.php):
- Extract getSearchRow() helper to avoid duplicated row-rendering logic
- Rename search_result() to search() and wrap in switch($op)
- Fix XSS: escape $cdesc and $ctitle via htmlspecialchars() in all HTML contexts
- Migrate config key: $conf['search'] string -> $conf['search']['mods'] array
- Add config/search.php with all search settings moved out of global config
- Search admin panel (modules/search/admin/):
- Add new admin interface for search module configuration
- Include multilingual info files (de, en, fr, pl, ru, uk)
- Admin template (templates/admin/index.php):
- Replace opendir/readdir/closedir with scandir(BASE_DIR.'/language')
- Fix XSS: escape $admin[1] via htmlspecialchars() before use in HTML
- Fix undefined $cach in setTemplateBlock() static cache on cache miss
- Replace SELECT * with SELECT 1 LIMIT 1 for admin existence check
- Add :string return types to all three template functions
- Remove unused global declarations ($user, $theme, $conf)
- Replace die() with exit; update copyright year to 2026
- Convert tabs to 4-space indentation per coding standard
- Language files (admin/language/*.php):
- Sync language constants across de, en, fr, pl, ru, uk
Core and config (core/admin.php, core/system.php, config/global.php, config/modules.php, admin/modules/config.php, admin/index.php, modules/order/index.php):
- Various refactors and config key updates aligned with new structure
Benefits: - Eliminates stored XSS vectors in search result rendering - Removes CWD-dependent filesystem path in admin template loader - Static template cache no longer risks undefined-variable TypeError in PHP 8.x - Search config is now isolated in config/search.php
Technical notes: - config/search.php is a new required config file - modules/search/admin/ is a new directory; activate via config/modules.php - No DB schema changes
Three related cleanups applied system-wide. Legacy function names replaced with camelCase equivalents matching project naming conventions. search_color (marked # OLD DELETE) deleted and replaced by an optimised filterTextHighlight. filterTextHighlight rewritten for performance: single combined regex instead of one pass per word, batch str_replace for tag extraction/restoration.
Core changes:
- Helper function renames (core/system.php + 24 call sites):
- defconst() → getConst()
- deflmconst() → getModuleName() (strtr replaced by array lookup $map[$k] ?? $k)
deflang() → getLangName() (same) Callers updated in: core/admin.php, core/user.php, admin/modules/,
blocks/block-{languages,modules}.php, templates/*/index.php,
modules/{account,search,voting/admin}/index.php
- filterTextHighlight() rewrite (core/system.php:1674):
- array_unique + sort words by length desc before building pattern
- preg_quote per word; all words joined into one alternation regex
- Tag placeholders switched to \x00TAGn\x00 (no risk of HTML collision)
- Batch str_replace(array, array) for tag extraction and restoration
- search_color() removed (core/system.php):
- Was marked # OLD DELETE; fully superseded by filterTextHighlight()
All 18 call sites migrated: modules/{content,forum,files,faq,search, auto_links,links,jokes,shop,pages,media,help,news}/index.php, modules/shop/admin/index.php
Benefits: - Consistent camelCase naming across all helper functions - filterTextHighlight: O(1) regex passes regardless of word count - No dead code (search_color deleted) - Safer tag placeholder avoids numeric pseudo-tags <1>, <2>
Split changelog language constants into user/admin scopes — user files now contain only what index.php needs, admin-only constants moved to the admin/language layer. Adds page title to setHead() in changelog/index.php. Removes two redundant require_once calls for config files already loaded automatically by getConfig() via glob in core/system.php.
Core changes:
- Language constants (modules/changelog/language/*.php):
Removed 19 admin-only constants from user language files (all 6 locales) * Kept: filter/search UI, date labels, error messages * Removed: source config, export, cache TTL, stats, GitHub API fields
- Admin language files (modules/changelog/admin/language/*.php):
- Added as new tracked files (were untracked)
- Removed one dead constant (_CHLOG_ERR_GH_API_JSON) unused anywhere
- Module entry point (modules/changelog/index.php):
- setHead() now receives ['title' => _CHANGELOG]
- System entry point (index.php):
- Removed require_once CONFIG_DIR.'/shop.php' (go==2 block)
- Removed require_once CONFIG_DIR.'/uploads.php' (go==4 block)
- Both configs are already merged by getConfig() on startup
Benefits: - Admin-only constants no longer loaded for regular users - No dead constants in language files - Page title set correctly in changelog module - Cleaner index.php without redundant file loads
This commit completes the current legacy text refactor by renaming the old replacement helper to filterReplaceText, migrating bb_decode call sites to filterMarkdown(..., false), and removing redundant wrapper experiments. It also includes the monitor fix, client archive flow updates, template style updates, and rule documentation needed to keep future refactors consistent.
Core changes:
- Legacy text pipeline (core/system.php):
- Renamed search_replace() to filterReplaceText()
- Migrated bb_decode()-based output paths to filterMarkdown(..., false)
- Removed redundant wrapper indirection and kept direct behavior-preserving calls
- Frontend and admin modules (modules/, admin/modules/, blocks/*):
- Updated legacy content rendering call sites to the new helper/parser naming
- Switched client archive generation away from PclZip to the core compression flow
- Fixed monitor database size handling to stop undefined array key warnings
- Project guidance and templates (.rules/, .agents/, templates/*):
- Added explicit migration guidance for rename-vs-wrapper decisions
- Synced architecture notes for parser and replacement helper migrations
- Adjusted template system styles alongside the current refactor batch
Benefits: - Lower maintenance cost by reducing legacy naming drift and wrapper noise - Better reliability through the monitor fix and centralized archive handling - Clearer project rules for future refactors with minimal behavior change
Technical notes: - Legacy content still uses filterMarkdown(..., false) where raw HTML passthrough is required - filterReplaceText() is now the canonical replacement helper name in the codebase - Backward compatibility is preserved at runtime, but old helper names were intentionally removed from the code
Normalize optional profile birthday values before passing them into the legacy datetime helper and apply a safe fallback for the account style class. This prevents runtime warnings and type errors on profile-related screens without changing user-visible behavior.
Core changes:
- Account profile form (modules/account/index.php):
Normalized
user_birthdayto a validated string before rendering the date picker * Empty and invalid values now fall back safely instead of reachingdatetime()asnull- Added a safe
sl_accountfallback when$conf['style']is missing or empty - User messaging view (core/user.php):
- Replaced direct
$conf['style']access with a guarded fallback - Preserved the existing account style default for account-context rendering
Benefits:
- Prevents datetime(): Argument #3 ($time) must be of type string, null given
- Removes Undefined array key "style" warnings in account flows
- Keeps legacy helpers working without widening the change scope
Technical notes:
- The legacy datetime() helper signature was not changed
- No database schema, routing, or template contracts were modified
Move all _CHLOG_* constants to module-local changelog language files and remove the duplicated global definitions. This eliminates repeated constant redefinition warnings while preserving public and admin changelog translations.
Core changes:
- Changelog module languages (modules/changelog/language/*.php):
Added the full
_CHLOG_*constant set required by both frontend and admin changelog screens * Included export, source, GitHub, cache, stats, and token-related strings * Kept module-local translations as the single source of truth- Preserved existing localized wording where available
- Global languages (language/*.php):
- Removed duplicated
_CHLOG_*constants from the shared language files - Prevented global language loading from colliding with module language loading
Benefits: - Eliminates changelog constant redefinition warnings in PHP logs - Reduces translation duplication across the codebase - Keeps changelog localization scoped to the module that owns it
Technical notes: - No routing or template behavior was changed - Backward compatibility is preserved for changelog pages and admin screens





