Commit Graph

561 Commits

Author SHA1 Message Date
Divarion-D
b544357172 refactor(redis): add type hints, PHPDoc, null-safety and health-check ping 2026-04-11 22:06:04 +03:00
Divarion-D
5e0bfe343c fix(streaming): add null coalescing guards for undefined array keys 2026-04-11 22:06:04 +03:00
Divarion-D
c4540f7d11 fix: check isset api_key before ctype_xdigit in UserService 2026-04-10 20:31:22 +03:00
Divarion-D
6b7780e2be fix: check headers_sent() before setcookie in Translator 2026-04-10 20:31:22 +03:00
Divarion-D
a34a4aaac4 docs: update ARCHITECTURE.md after Phase 15 completion 2026-04-10 20:31:22 +03:00
Divarion-D
62dc6c200b remove obsolete redis-server_6.2.2 binary 2026-04-10 20:31:22 +03:00
Divarion-D
76fe99c438 installer: use static redis.conf instead of inline template 2026-04-10 20:22:18 +03:00
Divarion-D
b345331ba6 add static redis.conf template to src/bin/redis 2026-04-10 20:22:18 +03:00
Divarion-D
6d05a60feb docs: update MIGRATION.md - delete completed phases 14 and 15, update contents 2026-04-09 21:48:26 +03:00
Divarion-D
407eefc7ae docs: update MIGRATION.md — add Phase 16.5, remove completed items 2026-04-09 21:35:57 +03:00
Divarion-D
475c493c35 refactor: eliminate proxy functions, migrate to direct class method calls
312 files changed, 2866 insertions(+), 24110 deletions(-)

Proxy function replacements (130+ functions):
- goHome() -> AdminHelpers::goHome()
- checkPermissions() -> PageAuthorization::checkPermissions()
- getBouquet/getCategory/etc -> Service::getById()
- deleteStream/deleteLine/etc -> Repository/Service::delete()
- APIRequest/systemapirequest -> ApiClient::request/systemRequest()
- prepareArray/preparecolumn -> QueryHelper methods
- confirmIDs/parserelease/etc -> AdminHelpers methods
- getSettings/clearSettingsCache -> SettingsManager methods
- destroySession -> SessionManager::clearContext()
- getMag/getEnigma/deleteMAG/etc -> MagService/EnigmaService
- getSeriesTrailer/getMovieTMDB/etc -> TMDbService methods

Removed legacy files:
- src/includes/admin.php (main proxy hub)
- src/includes/libs/ (35+ files moved to core/modules)
- src/includes/python/ (moved to bin/python)
- src/includes/api/ (moved to Controllers)
- src/includes/ts.php, reseller_api.php
- src/infrastructure/legacy/admin_proxies.php
- tools/run_scan.sh, update_redis_conf.sh

Additional fixes:
- SQL query placeholder migration (BouquetService, CategoryService)
- PHP 8.x null-safe access (live.php, server_view.php, stream.php)
- TmdbCron: extracted variable for repeated similar_text calls
2026-04-09 21:24:48 +03:00
Divarion-D
5b3ba6a4c2 feat: add new core/domain architecture classes and migrated libraries
New core classes:
- PageAuthorization, QueryHelper, ApiClient, AdminHelpers
- Logger, Translator, XmlStringStreamer, DropboxClient
- GithubReleases, MobileDetect

New domain classes:
- M3UParser, M3UEntry, TicketRepository, TMDbService

Migrated libraries:
- TMDb SDK → modules/tmdb/lib/
- Python scripts → bin/python/
- permissions.php → config/
- Table controllers → public/Controllers/
- AsyncFileOperations, TimeshiftClient → streaming/

New docs:
- translations.md (en/ru)
2026-04-09 21:23:16 +03:00
Divarion-D
c522dfa390 Add common JavaScript utilities for admin pages
- Introduced a new common.js file containing essential functions for admin page operations.
- Implemented utilities for modal handling, error/success notifications, domain/IP validation, session management, and SPA navigation.
- Added functions for managing tooltips, search functionality, and URL parameter manipulation.
- Enhanced user experience with toast notifications and modal interactions.
2026-04-07 22:18:23 +03:00
Divarion-D
027f6df708 Add EventDispatcher integration to bootstrap and module loader
- Updated the XC_Bootstrap class to include the EventDispatcher class in the service container.
- Modified the ModuleLoader class to utilize the EventDispatcher for subscribing to events, enhancing the event handling mechanism.
2026-04-07 21:48:20 +03:00
Divarion-D
7ab3e02a0e refactor(GitHubReleases): replace getNextVersion with getLatestVersion for direct updates 2026-04-07 21:23:00 +03:00
Divarion-D
bb9571bd2d fix(view): improve dark mode handling in server view cards 2026-04-07 21:05:53 +03:00
Divarion-D
1b8050cb04 fix(docs): update console paths in documentation and scripts 2026-04-07 20:49:44 +03:00
Divarion-D
c6f3e0461a fix(docs): update release checklist to include disabling development mode 2026-04-07 20:26:06 +03:00
Divarion-D
6eee69e248 Merge branch 'main' of https://github.com/Vateron-Media/XC_VM 2026-04-07 20:07:53 +03:00
Divarion-D
60dc784fb5 fix(docs): update supported OS section and clarify installation recommendations 2026-04-07 20:07:49 +03:00
Danil
f89d26fdd5 Merge pull request #104 from Vateron-Media/feature/split-binaries
Feature/split binaries
2026-04-07 19:58:30 +03:00
Divarion-D
44d7287ea6 Rename test_installer to install 2026-04-07 19:55:28 +03:00
Divarion-D
d40e2f5172 feat(lb): download distribution-specific binaries from GitHub 2026-04-07 19:49:44 +03:00
Divarion-D
02c230fb62 build: Makefile cleanup — UPDATE_EXCLUDE_DIRS, rewrite update targets, simplify permissions 2026-04-07 19:49:29 +03:00
Divarion-D
ddedf533a1 chore: auto_install.sh — switch from install to test_installer 2026-04-07 19:49:19 +03:00
Divarion-D
35d39a7964 refactor: installer overhaul — remove php-ssh2, GitHub binary downloads, security hardening 2026-04-07 19:48:49 +03:00
Divarion-D
afdf1a469a Merge branch 'main' into feature/split-binaries 2026-04-07 17:26:09 +03:00
Divarion-D
c8a30b657d feat(docs): Added a section about the development workflow using SFTP 2026-04-07 15:57:55 +03:00
Divarion-D
a4e5a719df feat(WatchItem): enable transcoding based on transcode profile ID 2026-04-07 15:43:48 +03:00
Divarion-D
5145fdae0e fix(docs): update release preparation checklist for clarity and automation 2026-04-06 22:08:35 +03:00
Divarion-D
5c3dbfe019 Bump version to 2.0.2 2.0.2 2026-04-06 21:54:11 +03:00
Divarion-D
59ec5a26e1 style(docs): update index.html with dark theme and improved sidebar styles 2026-04-06 21:48:18 +03:00
Divarion-D
7f7d936fd9 fix(RadioService): handle potential null values in bouquet and category lists 2026-04-06 21:11:38 +03:00
Divarion-D
a5d57ccdd0 fix(issue-templates): update issue links to point to the correct repository 2026-04-06 21:09:09 +03:00
Divarion-D
b39ea928c8 fix(issue-templates): change version field from dropdown to input for better flexibility 2026-04-06 21:03:50 +03:00
Divarion-D
27c5574906 docs(templates): overhaul all GitHub issue templates
bug_report.yml:
- Add required version dropdown (XC_VM 2.0.1/2.0.0/1.x)
- Add steps to reproduce (was completely missing)
- Add expected vs actual behavior fields
- Add build type (MAIN/LoadBalancer)
- Add severity and affected area dropdowns
- Add environment info section
- Fix misnamed howtoreplicate field

security.yml:
- Add public disclosure warning with link to GH Security Advisories
- Add required version dropdown (multi-select)
- Add severity classification (CVSS-like)
- Add affected component dropdown
- Add suggested fix field
- Replace misleading confidentiality checkbox

feature_request.yml:
- Add affected area dropdown for triage
- Add alternatives considered field
- Improve field descriptions

other.yml:
- Add category dropdown (question/config/performance/etc)
- Add optional version field

config.yml (new):
- Disable blank issues
- Add private security advisory link
- Add documentation link
2026-04-06 21:01:08 +03:00
Divarion-D
d09e1f414f refactor(admin): extract curl result + propagate rModal in layout
- systemapirequest(): store curl_exec result before return
- renderUnifiedLayoutHeader(): propagate $rModal to GLOBALS
  so renderUnifiedLayoutFooter() can access it
2026-04-06 20:40:18 +03:00
Divarion-D
a131be473e fix(stream): replace truthy checks with empty() in InternalApiController
Prevent undefined index notices when request fields are missing.
Affects user_agent, http_proxy, cookies, headers checks in
stream probe/prebuffer logic.
2026-04-06 20:39:53 +03:00
Divarion-D
6061c77f0a fix(api): null-safe access for stream codec metadata 2026-04-06 20:39:12 +03:00
Divarion-D
797410989f refactor: remove deprecated legacy resize image handlers 2026-04-06 19:42:15 +03:00
Divarion-D
9abd0c6674 fix(api): handle null from probeSource() to prevent array offset on null 2026-04-06 19:37:40 +03:00
Divarion-D
f935d33593 fix(table): add is_array() guard for codecs in streams and radios blocks
Blocks 1 (streams) and 2 (radios) were missing the || !is_array()
guard that blocks 3 (movies) and 4 (episodes) already had.
When codecs.video or codecs.audio is a string, isset() returns true
but accessing ["width"] or ["codec_name"] on a string causes TypeError.
2026-04-06 19:33:24 +03:00
Divarion-D
1cbea0522e fix(table): use is_array() guard for codecs.video/audio in all 4 blocks
isset() returns true when codecs.audio is a string (not array),
so the fallback never triggers and accessing ["codec_name"]
on a string causes TypeError. Added || !is_array() check.
2026-04-06 19:23:25 +03:00
Divarion-D
1aad18e382 fix(admin): prevent TypeError and warnings on undefined array keys
- api.php:2503: replace ?: with ?? for optional RequestManager keys
  (http_proxy, cookies, headers, user_agent)
- table.php: json_decode can return string instead of array when
  stream_info contains non-object JSON; add is_array() guard in all 4
  occurrences to prevent "Cannot access offset of type string on string"
2026-04-06 18:59:09 +03:00
Divarion-D
8c76312099 chore: misc fixes — m3u improvements, review page update, cleanup add_headers
- m3u.php: minor output improvements
- review.php: admin view updates
- Remove obsolete tools/add_headers.php
- test_release.sh: extend sync logic
2026-04-06 18:44:05 +03:00
Divarion-D
0b796f9d71 refactor(resize): add admin resize route, unify 3 duplicate handlers into resize_body.php
- Create AdminResizeController + register GET /resize in admin routes
- Extract unified resize_body.php from 3 near-identical legacy files
- Player/Reseller controllers now set config vars and require resize_body.php
- Remove duplicated code from player_resize_body.php and reseller_resize_body.php
- Update ARCHITECTURE.md legacy directory documentation
2026-04-06 18:43:53 +03:00
Divarion-D
0e5e5288c2 fix(StreamService): replace ?: with ?? to prevent Undefined array key warnings
All Elvis operators (?:) on potentially missing array keys replaced with
null coalescing (??) and added ?? [] fallbacks for foreach() arguments.
Fixes ~7 categories of PHP 8 warnings in stream add/edit/import flows.
2026-04-06 18:42:17 +03:00
Divarion-D
41ad8d854e fix(cron): fix post-install errors in cron jobs and watchdog
- Encryption::generateUniqueCode(): null-coalesce $pass to prevent
  md5(null) deprecation when live_streaming_pass is not yet set
- CacheCronJob: mkdir() with 0755 perms, recursive flag, and
  chown to xc_vm user — fixes Permission denied on tmp/cache/*
- WatchdogCommand: null-safe decode of watchdog_data — fixes
  array offset on null when server has no watchdog history
- ConnectionTracker: guard file_put_contents with is_dir() check
  to prevent writes when CACHE_TMP_PATH does not exist yet
- Dockerfile: install cron package and enable cron.service for
  systemd-based test container
2026-04-06 16:19:09 +03:00
Divarion-D
e1e4fed47e docs(readme): add legal notice and AGPL-3.0 license enforcement section
- Replace generic License and Legal Disclaimer sections with
  detailed Legal & Project Independence Notice and
  License Enforcement (AGPL-3.0) sections
- Clarify XC_VM independence from XUI.one
- Document AGPL-3.0 requirements: open-source redistribution,
  source availability for SaaS, copyright preservation
- Update TOC links to match new section anchors
2026-04-05 22:40:58 +03:00
Divarion-D
59ca08924c docs(php): add standardized file headers across codebase
- Add @author, @copyright, @link, @version, @license to 399 PHP files
- MERGE mode: inject metadata into 243 existing docblocks (preserving docs)
- INSERT mode: create new docblocks for 156 files without headers
- Skip 3 files that already had correct headers
- Exclude third-party libs (TMDb, mobiledetect, Dropbox, etc.)
- Exclude bin/, ministra/, content/, tmp/, resources/, module views
- Update tools/add_headers.php to v2 with MERGE strategy
2026-04-05 22:38:36 +03:00