diff --git a/AppConfig.json b/AppConfig.json index e0ad3fa..6c8b994 100644 --- a/AppConfig.json +++ b/AppConfig.json @@ -1,5 +1,5 @@ { - "APP_VERSION": "8.19", + "APP_VERSION": "8.20", "APP_NAME": "X Prober", "APP_URL": "https://github.com/kmvan/x-prober", "AUTHOR_URL": "https://inn-studio.com/prober", diff --git a/CHANGELOG.md b/CHANGELOG.md index d1f9b37..90cd7f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ All Notable changes to `X-Prober` will be documented in this file +## 8.20.0 - 2025-03-23 + +### Fix + +- Fix #224 + ## 8.19.0 - 2024-08-18 ### Optimize diff --git a/dist/prober.php b/dist/prober.php index 1e35e25..21db51f 100644 --- a/dist/prober.php +++ b/dist/prober.php @@ -5,24 +5,88 @@ version_compare($version, '5.4.0','<') && exit("PHP 5.4+ is required. Currently \define('XPROBER_TIMER', \microtime(true)); \define('XPROBER_IS_DEV', false); \define('XPROBER_DIR', __DIR__); +namespace InnStudio\Prober\Components\Bootstrap; use InnStudio\Prober\Components\Events\EventsApi; final class Action { public function __construct() { $action = (string) filter_input(\INPUT_GET, 'action', \FILTER_DEFAULT); EventsApi::emit('init', $action); if ($action) { http_response_code(400); exit; } } } +namespace InnStudio\Prober\Components\Bootstrap; final class Bootstrap { public function __construct() { new Action(); new Conf(); new Render(); } } +namespace InnStudio\Prober\Components\Bootstrap; class BootstrapConstants { protected $ID = 'bootstrap'; } +namespace InnStudio\Prober\Components\Bootstrap; use InnStudio\Prober\Components\Config\ConfigApi; use InnStudio\Prober\Components\Events\EventsApi; final class Conf extends BootstrapConstants { public function __construct() { EventsApi::on('conf', function (array $conf) { $conf[$this->ID] = array( 'isDev' => XPROBER_IS_DEV, 'version' => ConfigApi::$APP_VERSION, 'appName' => ConfigApi::$APP_NAME, 'appUrl' => ConfigApi::$APP_URL, 'appConfigUrls' => ConfigApi::$APP_CONFIG_URLS, 'appConfigUrlDev' => ConfigApi::$APP_CONFIG_URL_DEV, 'authorUrl' => ConfigApi::$AUTHOR_URL, 'authorName' => ConfigApi::$AUTHOR_NAME, 'authorization' => isset($_SERVER['HTTP_AUTHORIZATION']) ? $_SERVER['HTTP_AUTHORIZATION'] : '', ); return $conf; }); } } +namespace InnStudio\Prober\Components\Bootstrap; use InnStudio\Prober\Components\Config\ConfigApi; use InnStudio\Prober\Components\Events\EventsApi; final class Render { public function __construct() { $appName = ConfigApi::$APP_NAME; $version = ConfigApi::$APP_VERSION; $scriptConf = json_encode(EventsApi::emit('conf', array())); $styleUrl = \defined('XPROBER_IS_DEV') && XPROBER_IS_DEV ? 'app.css' : "?action=style&v={$version}"; $scriptUrl = \defined('XPROBER_IS_DEV') && XPROBER_IS_DEV ? 'app.js' : "?action=script&v={$version}"; echo << + +
+ + + + +