From 8229814c0dc0a37eab9c676f5f01e26e0790cdbb Mon Sep 17 00:00:00 2001 From: memurats Date: Mon, 24 Feb 2025 13:05:32 +0100 Subject: [PATCH 1/2] replace listener event --- appinfo/info.xml | 2 +- lib/AppInfo/Application.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/appinfo/info.xml b/appinfo/info.xml index d1f6703..3bb4e30 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -5,7 +5,7 @@ NMC Marketing Marketing tracking aspects for MagentaCLOUD Scripting and CSP rulset to integrate Telekom standard consent and marketing tracking - 0.0.5 + 1.1.0 agpl B. Rederlechner D. Engelschalk diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php index cb59ed0..bc035dd 100644 --- a/lib/AppInfo/Application.php +++ b/lib/AppInfo/Application.php @@ -9,6 +9,7 @@ use OCP\AppFramework\Bootstrap\IBootstrap; use OCP\AppFramework\Bootstrap\IRegistrationContext; use OCP\AppFramework\Http\Events\BeforeTemplateRenderedEvent; +use OCP\AppFramework\Http\Events\BeforeLoginTemplateRenderedEvent; use OCP\Security\CSP\AddContentSecurityPolicyEvent; class Application extends App implements IBootstrap { @@ -21,7 +22,7 @@ public function __construct() { public function register(IRegistrationContext $context): void { //Register the CSPListener and consent layer redirect brake $context->registerEventListener(AddContentSecurityPolicyEvent::class, CSPListener::class); - $context->registerEventListener(BeforeTemplateRenderedEvent::class, BeforeTemplateRenderedListener::class); + $context->registerEventListener(BeforeLoginTemplateRenderedEvent::class, BeforeTemplateRenderedListener::class); } public function boot(IBootContext $context): void { From 53c37f99be817f7fc30117a43f9c734c2439fa62 Mon Sep 17 00:00:00 2001 From: memurats Date: Mon, 24 Feb 2025 13:08:51 +0100 Subject: [PATCH 2/2] fixed code style --- lib/AppInfo/Application.php | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php index bc035dd..95ff278 100644 --- a/lib/AppInfo/Application.php +++ b/lib/AppInfo/Application.php @@ -8,7 +8,6 @@ use OCP\AppFramework\Bootstrap\IBootContext; use OCP\AppFramework\Bootstrap\IBootstrap; use OCP\AppFramework\Bootstrap\IRegistrationContext; -use OCP\AppFramework\Http\Events\BeforeTemplateRenderedEvent; use OCP\AppFramework\Http\Events\BeforeLoginTemplateRenderedEvent; use OCP\Security\CSP\AddContentSecurityPolicyEvent;