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
This commit is contained in:
Divarion-D
2026-04-20 20:34:19 +03:00
parent 69e067e2b7
commit 2b499bbd47
8 changed files with 193 additions and 10 deletions
+2 -4
View File
@@ -441,8 +441,7 @@ class XC_Bootstrap {
/**
* Initialize Admin API + Reseller API.
*
* Loads reseller_api.php,
* initializes ResellerAPI class and admin user info.
* Initializes ResellerAPI class and admin user info.
*/
private static function initAdminAPI(): void {
if (self::$adminReady) {
@@ -451,7 +450,6 @@ class XC_Bootstrap {
global $db;
require_once MAIN_HOME . 'infrastructure/legacy/reseller_api.php';
// Admin user info
if (isset($_SESSION['hash'])) {
@@ -612,7 +610,7 @@ class XC_Bootstrap {
$language = Translator::class;
$allowedLangs = $language::available();
// Sort servers by order (moved from infrastructure/legacy/admin.php)
// Sort servers by order
if (is_array($rServers)) {
uasort(
$rServers,