diff --git a/core/_bootstrap.php b/core/_bootstrap.php index 2611854e..1d146f1f 100644 --- a/core/_bootstrap.php +++ b/core/_bootstrap.php @@ -17,6 +17,7 @@ _version_check(); _sanitise_environment(); // load base files +$_shm_ctx->log_start("Bootstrap"); $_shm_ctx->log_start("Opening files"); $_shm_files = array_merge( zglob("core/*.php"), @@ -48,5 +49,9 @@ $page = class_exists("CustomPage") ? new CustomPage() : new Page(); $_shm_ctx->log_endok(); // hook up event handlers +$_shm_ctx->log_start("Loading extensions"); _load_event_listeners(); +$_shm_ctx->log_endok(); + send_event(new InitExtEvent()); +$_shm_ctx->log_endok(); diff --git a/core/send_event.php b/core/send_event.php index 3420df05..9cdf3b8c 100644 --- a/core/send_event.php +++ b/core/send_event.php @@ -9,9 +9,7 @@ $_shm_event_listeners = []; function _load_event_listeners(): void { - global $_shm_event_listeners, $_shm_ctx; - - $_shm_ctx->log_start("Loading extensions"); + global $_shm_event_listeners; $cache_path = data_path("cache/shm_event_listeners.php"); if (COMPILE_ELS && file_exists($cache_path)) { @@ -23,8 +21,6 @@ function _load_event_listeners(): void _dump_event_listeners($_shm_event_listeners, $cache_path); } } - - $_shm_ctx->log_endok(); } function _set_event_listeners(): void