Commit Graph
480 Commits
Author SHA1 Message Date
Divarion-D fc08085cc2 Prepare release 2.1.3 2026-04-21 21:56:03 +03:00
Divarion-D 3bda154d47 Implement feature X to enhance user experience and optimize performance 2026-04-21 21:51:33 +03:00
Divarion-D 235547168a feat: enhance installation process with dynamic port configuration and database updates 2026-04-21 21:48:10 +03:00
Divarion-D e7c7144f17 fix: remove unnecessary closing PHP tags from multiple admin view files 2026-04-21 21:47:28 +03:00
Divarion-D 6dbffd30d9 Refactor configuration and improve error handling
- Updated `install` script to use dynamic thread pool max threads configuration.
- Simplified the check for MariaDB version in `secure_mariadb_installation`.
- Enhanced `generate_mysql_config` function to adjust max connections based on total RAM.
- Improved error handling in `BalancerCommand` for SFTP transfers.
- Refactored `CacheEngineCronJob` to ensure proper handling of cache validity checks.
- Updated `StreamsCronJob` to utilize Redis manager more effectively.
- Enhanced `UsersCronJob` to handle Redis connections safely.
- Refactored `portal.php` to improve handling of series and favorite channels.
- Updated `PortalHandler` to streamline category ID checks.
- Improved `EpgApiController` and `PlaylistApiController` to handle legacy actions more robustly.
- Refactored `StreamRedirector` to enhance server handling logic.
2026-04-21 20:48:05 +03:00
Divarion-D 2cc708034f fix: handle potential null values in JSON decoding for bouquet channels, movies, radios, and series 2026-04-21 19:03:37 +03:00
Divarion-D d2b160b7b6 feat: Introduce PhpM3u8 Stream Classes and Interfaces
- Added `StreamInterface` to define the contract for stream handling.
- Implemented `FileStream` class for file-based streaming.
- Implemented `TextStream` class for in-memory text streaming.
- Removed legacy `M3UParser` class and related resources.
- Added new tests for `AttributeStringToArray`, `Iso8601Transformer`, `Resolution`, `Byterange`, `Inf`, `Line`, and `Lines` classes.
- Updated bootstrap file to include new PhpM3u8 components.
2026-04-21 19:00:17 +03:00
Divarion-D f447c6276e fix(logger): adjust error reporting to exclude notices and deprecated warnings 2026-04-21 14:57:49 +03:00
Divarion-D d8a48520fe feat(stream): migrate to vendored M3uParser and add parser/import tests
- Replace legacy in-project M3U parser with vendored Gemorroj/M3uParser
- Initialize parser via bootstrap with proper namespacing
- Remove obsolete src/domain/Stream/M3UEntry.php implementation

- Update stream import/review mapping:
  - use logo as fallback when tvg-logo is missing

- Add third-party compliance files for vendored parser:
  - ATTRIBUTION.md
  - LGPL LICENSE

- Add full M3uParser unit test suite:
  - tag parsing
  - parser behavior
  - fixtures

- Add StreamService integration tests for M3U parsing/import flow

- Update test bootstrap:
  - add igbinary_serialize / igbinary_unserialize polyfills
  - explicitly load M3uParser bootstrap and custom test tag class
2026-04-21 14:52:46 +03:00
Divarion-D b008234897 fix: handle potential null values in JSON decoding for bouquet data 2026-04-21 13:39:35 +03:00
Divarion-D ca4f2abd54 fix: add opening PHP tag to stream_mass.php 2026-04-20 21:42:24 +03:00
Divarion-D fbe0cf63cf chore: update utils, cron jobs, table controller, and build config
- QueryHelper: add utility methods for safe SQL operations
- AdminHelpers/SystemInfo: extract reusable admin utility functions
- ServerRepository: update query methods
- CacheCronJob/ServersCronJob: align with service layer conventions
- TableController: refactor DataTable logic for admin views
- Update Makefile build configuration
2026-04-20 20:35:36 +03:00
Divarion-D 0437979ec8 refactor(reseller): extract ResellerAPI, ApiDispatcher, TableRenderer
- ResellerAPI: domain logic extracted from legacy reseller_api.php
- ResellerApiDispatcher: request routing from reseller_api_actions.php
- ResellerTableRenderer: DataTable rendering from reseller_table_body.php
- Update all reseller controllers to use extracted classes
- Remove legacy files and split-mode script files
- Update reseller layout header/footer
2026-04-20 20:35:18 +03:00
Divarion-D 4c1c09b478 refactor(resize): extract ImageResizeService from legacy resize_body
- Extract image resize logic into core/Util/ImageResizeService
- Update Admin/Player/Reseller resize controllers to use new service
- Remove legacy resize_body.php
2026-04-20 20:34:39 +03:00
Divarion-D 2b499bbd47 refactor(bootstrap): extract StreamingRequestBootstrap and WebApiBootstrap
- StreamingRequestBootstrap: unified entry for streaming endpoints
- WebApiBootstrap: unified entry for web API requests
- index.php: use new bootstrap classes instead of direct requires
- www/init.php, www/stream/init.php: mark as deprecated shims
- StatusCommand: use StreamingRequestBootstrap::init()
- autoload.php, bootstrap.php: register new classes
2026-04-20 20:34:19 +03:00
Divarion-D 69e067e2b7 fix(production): resolve timezone, end(explode), DB_ACCESS_ENABLED errors
- CacheEngineCronJob: fix end(explode()) strict notice by using variable
- admin/functions.php, admin_functions_fc.php: validate empty timezone '""'
- admin/settings.php, admin/database.php: add defined(DB_ACCESS_ENABLED) guards
2026-04-20 20:34:01 +03:00
Divarion-D ab9e8c8d18 fix(layout): prevent double footer rendering breaking Bootstrap dropdowns
renderUnifiedLayoutFooter() was called twice - once from view files and
once from BaseAdminController::render(). Since admin/footer.php uses
require (not require_once), this loaded vendor.min.js twice, recreating
jQuery and destroying Bootstrap's document-level dropdown handlers.

- Add static $rendered guard to renderUnifiedLayoutFooter() for idempotency
- Remove redundant footer call from BaseAdminController::render()
- Remove split-mode (.scripts.php) mechanism from BaseAdminController
- Add rRegisteredUsers, rLine to footer globals passthrough
2026-04-20 20:33:41 +03:00
Divarion-D 788ec37637 refactor: replace DEVELOPMENT flag, fix bootstrap and logging
- Remove DEVELOPMENT constant from AppConfig.php; introduce DB_ACCESS_ENABLED
  (controls phpMiniAdmin access in admin panel only, not core DB connections)
- Detach bootstrap.php from www/constants.php: load core/Config/* and
  core/Logging/Logger directly; define PHP_ERRORS fallback
- Switch Logger::init() to PHP_ERRORS in bootstrap.php, stream/init.php,
  RequestGuard.php; remove leftover TODO comment
- Logger: always set error_reporting(E_ALL); UI visibility controlled
  separately via display_errors; rename $development -> $showErrors
- MigrationRunner: track applied/failed counts separately; failed migrations
  are not marked as applied
- Replace DEVELOPMENT with DB_ACCESS_ENABLED in admin settings.php and
  database.php (phpMiniAdmin gate)
- Replace DEVELOPMENT with PHP_ERRORS in CertbotCronJob
- Docs (en/ru): add DB_ACCESS_ENABLED flag description; update feature-flags,
  updates_checklist, http-request-handling; remove DEVELOPMENT references
- MIGRATION.md: mark L-1 as done, remove from backlog and wave A;
  unblock L-2; renumber steps
2026-04-19 18:13:56 +03:00
Divarion-D db850b6065 Bump version to 2.1.2 2026-04-18 18:30:35 +03:00
Divarion-D 5c2f21d79c Bump version to 2.1.2 2026-04-18 18:21:45 +03:00
Divarion-D 3aa7ca23ce fix: update package list and improve privilege revocation logic 2026-04-18 17:33:21 +03:00
Divarion-D e1a88509fa fix: normalize database host and improve migration command output 2026-04-18 16:48:08 +03:00
Divarion-D e737025ff8 test: add targeted PHPUnit setup and docs, fix GitHubReleases cache switching
- add PHPUnit bootstrap and config under tests/
- add focused unit tests for GitHubReleases, InputValidator and FfmpegPaths
- fix GitHubReleases cache file handling when switching update channel
- document PHPUnit PHAR usage and debug run commands in RU/EN docs
- document SFTP sync for tests/ and contributor test workflow
- remove broad smoke coverage approach in favor of per-file tests
2026-04-17 22:55:54 +03:00
Divarion-D bb9059c58b docs: update architecture and migration docs, minor config/auth fixes
- Update ARCHITECTURE.md with current codebase state
- Update MIGRATION.md with migration progress
- Minor fixes in AppConfig.php and AuthService.php
2026-04-16 22:35:07 +03:00
Divarion-D 7484245623 fix(api): fix undefined array key warnings in AdminApiController
- Add null coalescing for api_key, action, start, limit parameters
- Remove duplicate RequestManager::getAll() call
2026-04-16 22:35:07 +03:00
Divarion-D a00974b5c5 refactor(controllers): add data-preparation logic to admin controllers
- Move data queries, permission checks, and variable setup from views
  into individual admin controllers (Controller → Service → Repository)
- Each controller now prepares $rViewData before rendering the view
- Controllers handle redirects, permission enforcement, and data loading
2026-04-16 22:35:07 +03:00
Divarion-D 84c7e943c3 refactor(views): remove $__viewMode guards from admin views
- Remove legacy \<?php if (!isset(\$__viewMode)): ?\> blocks from ~100 admin views
- Move data preparation logic to controllers/routes
- Update admin routes and AdminTableController
- Views now contain only HTML/template markup
2026-04-16 22:33:10 +03:00
Divarion-D f2e569df87 fix(api): restructure REST API dispatch in front controller
- Move REST API dispatch block before login redirect to prevent
  API access codes from being redirected to /login
- Add SessionController for admin session management
- Renumber index.php dispatch sections (3=REST API, 4=redirect)
2026-04-16 22:33:10 +03:00
Divarion-D c50d8e417f fix(certbot): support Certbot 2.x renewal detection string
- Change search string from 'cert not yet due for renewal' to
  'not yet due for renewal' for compatibility with both Certbot 1.x
  and Certbot 2.x (which says 'Certificate not yet due for renewal')
- Extract implode() to $rOutBlob variable
2026-04-16 22:33:10 +03:00
Divarion-D 3f81b577a7 fix(service): fix syntax error in reload function
Double bracket in reload() caused a syntax error preventing service reload.
2026-04-14 18:14:02 +03:00
Divarion-D 1bd4180b4b feat: add syntax check target to Makefile and update changelog for version 2.1.1 2026-04-13 22:06:39 +03:00
Divarion-D 9e22edbf14 Bump version to 2.1.1 2026-04-13 22:02:08 +03:00
Divarion-D 52024641fb feat: MD5 hash verification for downloads
- install: compute_md5()+download_release_hash() for XC_VM.zip
- BalancerCommand: MD5 verification for LB binary downloads via SSH
2026-04-13 21:52:20 +03:00
Divarion-D 131266dab4 fix: render() and view safety
- BaseAdminController: extract(data, EXTR_SKIP)
- ServerListController: compact('rServers')
- servers.php: watchdog defaults for bytes_sent, bytes_received
2026-04-13 21:51:08 +03:00
Divarion-D 48b3fbf0ca fix: Redis null-safety guards
- ConnectionTracker: null checks for RedisManager::instance()
- UsersCronJob: safe array access for getConnections()
- table.php: null coalesce for rFailsPS + Redis fallback
2026-04-13 21:51:08 +03:00
Divarion-D c34da2c92f fix: permission issues when running as root
- autoload.php: chown cache dir+file to xc_vm when root
- ProcessManager: chown lock dirs to xc_vm when root
- StartupCommand: chmod +x console.php if not executable
- CacheCronJob: is_dir/is_writable guards + LOCK_EX
2026-04-13 21:51:07 +03:00
Divarion-D 723d2c3abf feat: update language labels for consistency across multiple language files 2026-04-13 01:43:40 +03:00
Divarion-D ac3064436e feat: add target to generate deleted_files.txt for update process 2026-04-13 01:04:54 +03:00
Divarion-D b33b876766 feat: enhance update command with logging and error handling 2026-04-13 00:21:55 +03:00
Divarion-D 2c6935c929 feat: add changelog.json for version 2.1.0 and update release preparation checklist 2026-04-12 17:47:56 +03:00
Divarion-D d9bbd6c35b build: unify install and update into a single archive
Replace separate install/update build targets with a single archive that
serves both purposes. The update script (src/update) now extracts to a
temp directory, removes excluded dirs (binaries, config, user data), and
copies remaining files over the live installation.

Changes:
- Remove main_update, lb_update, lb_update_copy_files,
  main_update_copy_files Makefile targets and UPDATE_EXCLUDE_DIRS var
- Move exclude dirs list into src/update (Python) where filtering
  actually happens at runtime
- Rewrite doUpdate() to use tempdir extraction with try/finally cleanup
- Make delete_files_list/lb_delete_files_list gracefully skip when
  LAST_TAG is empty (warn instead of error)
- Simplify CI workflows: one make command per variant instead of
  conditional install + update steps
- Add ARCHITECTURE.md §5.5 documenting update flow
- Update en/ru docs: update-system.md, updates_checklist.md
- Update makefile-build.instructions.md with new targets
2026-04-12 17:38:35 +03:00
Divarion-D 61011455ad Bump version to 2.1.0 2026-04-12 16:44:39 +03:00
Divarion-D 7ca349ca37 fix(i18n): update language retrieval in database and settings views 2026-04-12 16:41:07 +03:00
Divarion-D a35fa31a73 fix(i18n): use English values as fallback for missing translation keys
- Translator::get() now returns English value (not raw key name)
  when a key is missing in the current language
- addMissingKeyToAllLanguages() writes English value as placeholder
  for non-English language files instead of key name
- Synced 800 missing keys from en.ini to all 6 language files
  (bg, de, es, fr, pt, ru) with English values as editable placeholders
2026-04-12 16:18:29 +03:00
Divarion-D 2b9192c365 i18n(views): replace hardcoded English with translation calls
Replaced ~1977 hardcoded English strings across 105 admin view files
with \$language::get() translation calls.

Categories processed:
- Page titles (57), Labels (394), Table headers (542)
- Buttons (161), Tooltips/placeholders (433)
- JS alerts (3), Options/spans/misc (387)

Handles both HTML and echo-string contexts correctly.
2026-04-12 16:08:46 +03:00
Divarion-D cbe3b136c8 i18n(langs): add 800+ translation keys to en.ini
Extracted hardcoded English strings from admin panel views:
- Page titles: 33 new keys
- Labels: 203 new keys
- Table headers: 113 new keys
- Buttons: 47 new keys
- Tooltips/placeholders: 301 new keys
- JS alerts: 3 new keys
- Options/spans/misc: 103 new keys

Total: ~800 new translation keys (was 762, now 1528)
2026-04-12 16:08:46 +03:00
Divarion-D 576271cfdf style(admin): widen boxed-layout-ext from 1040px to 1440px
Increase .boxed-layout-ext .container-fluid max-width to use more
screen real estate on modern displays.
2026-04-12 15:22:07 +03:00
Divarion-D 1b73fa69d6 fix(cron): null-safe guards for LB server environment
- ServersCronJob: guard against null watchdog_data from json_decode,
  use ?? [] for cpu_average_array access
- UsersCronJob: safe json_decode for php_pids — check is_array()
  before array_map to prevent TypeError on null
- CacheCronJob: suppress mkdir errors with @, check is_dir() before
  chown/chgrp to handle permission-denied on LB servers
2026-04-12 15:22:07 +03:00
Divarion-D 980968d3d9 fix(admin): use null coalescing for Redis connection counts
- Replace ?: with ?? for $rConnectionCount lookups (9 locations) —
  ?: treats 0 as falsy, ?? correctly handles missing keys
- Guard mGet() against empty $rKeys array — mGet([]) returns false,
  causing foreach to fail on bool
2026-04-12 15:22:06 +03:00
Divarion-D d89710791b fix(admin): null-safe guards for admin views and MovieService
- settings.php: htmlspecialchars() array guard for api_ips, is_array()
  guards for already-decoded allow_countries and allowed_stb_types
- api.php: null-safe parserelease title access, @var Database phpdoc
  annotations for closures with use (&$db)
- movie.php: !empty() for RequestManager import key access
- MovieController.php: default variable declarations before compact(),
  safe key access for direct_source and stream_status, proper movie
  fetch with redirect on invalid id
- MovieService.php: null coalescing for movie_symlink, direct_proxy,
  bouquet_create_list, category_create_list, bouquets, category_id
2026-04-12 15:22:06 +03:00