From 31d2a3bde8ff44ed718d8288ad4b30b5142b3368 Mon Sep 17 00:00:00 2001 From: slawkens Date: Sun, 16 Mar 2025 09:40:52 +0100 Subject: [PATCH] Make $action global (required by many scripts) --- system/init.php | 1 + system/src/Services/RouterService.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/system/init.php b/system/init.php index 8237e030..03a323ae 100644 --- a/system/init.php +++ b/system/init.php @@ -51,6 +51,7 @@ $hooks = app()->get('hooks'); require_once SYSTEM . 'twig.php'; // action, used by many pages +global $action; $action = $_REQUEST['action'] ?? ''; define('ACTION', $action); diff --git a/system/src/Services/RouterService.php b/system/src/Services/RouterService.php index caf15956..a7d81ab1 100644 --- a/system/src/Services/RouterService.php +++ b/system/src/Services/RouterService.php @@ -9,7 +9,7 @@ class RouterService { public function handleRouting(): array { - global $content, $template_path, $template; + global $content, $template_path, $template, $canEdit, $action; $db = app()->get('database'); $twig = app()->get('twig');