Skip to content

Commit 80369c6

Browse files
authored
Merge pull request #18 from iMattPro/fixes
Fixes
2 parents 0a52a0b + 12bed99 commit 80369c6

3 files changed

Lines changed: 10 additions & 9 deletions

File tree

adm/style/consentmanager_acp.html

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,15 @@ <h3>{{ lang('WARNING') }}</h3>
5151
{ id: 'media', label: lang('CONSENTMANAGER_CATEGORY_MEDIA') }
5252
] %}
5353
{% set category_has_services = false %}
54-
{% for service in services if service.category == category.id %}
55-
{% if not category_has_services %}
56-
{% set category_has_services = true %}
57-
<strong>{{ category.label }}</strong>
58-
<ul>
54+
{% for service in services %}
55+
{% if service.category == category.id %}
56+
{% if not category_has_services %}
57+
{% set category_has_services = true %}
58+
<strong>{{ category.label }}</strong>
59+
<ul>
60+
{% endif %}
61+
<li style="font-size: 0.7rem">{{ service.label }} » <em>{{ service.id }}</em></li>
5962
{% endif %}
60-
<li style="font-size: 0.7rem">{{ service.label }} » <em>{{ service.id }}</em></li>
6163
{% endfor %}
6264
{% if category_has_services %}
6365
</ul>

tests/controller/acp_controller_test.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ protected function setUp(): void
6969
'user_form_salt' => 'form-salt',
7070
];
7171
$this->user->session_id = 'session-id';
72-
$this->user->lang = $this->language->get_lang_array();
7372

7473
$this->template = $this->createMock('\phpbb\template\template');
7574
$this->acp_manager = $this->createMock('\phpbb\consentmanager\service\acp_manager');

tests/service/acp_manager_test.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ public function test_stream_logs_csv_row_format_is_correct()
582582
$content = stream_get_contents($handle);
583583
fclose($handle);
584584

585-
$row = str_getcsv(trim($content));
585+
$row = str_getcsv(trim($content), ',', '"', '\\');
586586
self::assertCount(4, $row);
587587

588588
// anonymized_id: 64-char hex
@@ -627,7 +627,7 @@ public function test_stream_logs_csv_sanitizes_formula_injection_in_categories()
627627
$handle = fopen('php://memory', 'wb+');
628628
$this->create_manager(1, 'session')->stream_logs_csv($handle);
629629
rewind($handle);
630-
$row = str_getcsv(trim(stream_get_contents($handle)));
630+
$row = str_getcsv(trim(stream_get_contents($handle)), ',', '"', '\\');
631631
fclose($handle);
632632

633633
// category cell must be prefixed with a tab to defuse the formula

0 commit comments

Comments
 (0)