From 0bc5df1baa2e4ba2b20387f96d698ab73632d05f Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Mon, 18 May 2026 07:14:59 -0700 Subject: [PATCH 1/2] Fix tests --- tests/controller/acp_controller_test.php | 1 - tests/service/acp_manager_test.php | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/controller/acp_controller_test.php b/tests/controller/acp_controller_test.php index 1f7e43a..7c076e8 100644 --- a/tests/controller/acp_controller_test.php +++ b/tests/controller/acp_controller_test.php @@ -69,7 +69,6 @@ protected function setUp(): void 'user_form_salt' => 'form-salt', ]; $this->user->session_id = 'session-id'; - $this->user->lang = $this->language->get_lang_array(); $this->template = $this->createMock('\phpbb\template\template'); $this->acp_manager = $this->createMock('\phpbb\consentmanager\service\acp_manager'); diff --git a/tests/service/acp_manager_test.php b/tests/service/acp_manager_test.php index e3bff43..ae0f1c9 100644 --- a/tests/service/acp_manager_test.php +++ b/tests/service/acp_manager_test.php @@ -582,7 +582,7 @@ public function test_stream_logs_csv_row_format_is_correct() $content = stream_get_contents($handle); fclose($handle); - $row = str_getcsv(trim($content)); + $row = str_getcsv(trim($content), ',', '"', '\\'); self::assertCount(4, $row); // anonymized_id: 64-char hex @@ -627,7 +627,7 @@ public function test_stream_logs_csv_sanitizes_formula_injection_in_categories() $handle = fopen('php://memory', 'wb+'); $this->create_manager(1, 'session')->stream_logs_csv($handle); rewind($handle); - $row = str_getcsv(trim(stream_get_contents($handle))); + $row = str_getcsv(trim(stream_get_contents($handle)), ',', '"', '\\'); fclose($handle); // category cell must be prefixed with a tab to defuse the formula From 12bed99ca01262f5bc919d02b1025df0b2b301fc Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Mon, 18 May 2026 07:15:56 -0700 Subject: [PATCH 2/2] Fix unsupported twig operations --- adm/style/consentmanager_acp.html | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/adm/style/consentmanager_acp.html b/adm/style/consentmanager_acp.html index 4649c7d..c4a937a 100644 --- a/adm/style/consentmanager_acp.html +++ b/adm/style/consentmanager_acp.html @@ -51,13 +51,15 @@

{{ lang('WARNING') }}

{ id: 'media', label: lang('CONSENTMANAGER_CATEGORY_MEDIA') } ] %} {% set category_has_services = false %} - {% for service in services if service.category == category.id %} - {% if not category_has_services %} - {% set category_has_services = true %} - {{ category.label }} -