diff --git a/plugins/logs/bootstrap.php b/plugins/logs/bootstrap.php index 3bb1298..5ce2ad3 100644 --- a/plugins/logs/bootstrap.php +++ b/plugins/logs/bootstrap.php @@ -1,5 +1,8 @@ function($action, array $context = []) { @@ -34,7 +55,7 @@ if (!function_exists('logs_ensure_tables')) { if ($ensured) { return; } - $db = \App\App::db(); + $db = App::db(); if (!$db || !method_exists($db, 'getConnection')) { return; } @@ -73,6 +94,10 @@ if (!function_exists('logs_ensure_tables')) { // Logger plugin bootstrap register_hook('logger.system_init', function(array $context) { + if (!logs_plugin_is_enabled()) { + return; + } + // Ensure tables exist logs_ensure_tables(); diff --git a/plugins/logs/controllers/logs.php b/plugins/logs/controllers/logs.php index 589b1e9..ba7130e 100644 --- a/plugins/logs/controllers/logs.php +++ b/plugins/logs/controllers/logs.php @@ -1,5 +1,7 @@
diff --git a/plugins/register/controllers/register.php b/plugins/register/controllers/register.php index f87560e..820bb15 100644 --- a/plugins/register/controllers/register.php +++ b/plugins/register/controllers/register.php @@ -1,5 +1,7 @@