Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions adm/style/consentmanager_acp.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,15 @@ <h3>{{ lang('WARNING') }}</h3>
{ 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 %}
<strong>{{ category.label }}</strong>
<ul>
{% for service in services %}
{% if service.category == category.id %}
{% if not category_has_services %}
{% set category_has_services = true %}
<strong>{{ category.label }}</strong>
<ul>
{% endif %}
<li style="font-size: 0.7rem">{{ service.label }} » <em>{{ service.id }}</em></li>
{% endif %}
<li style="font-size: 0.7rem">{{ service.label }} » <em>{{ service.id }}</em></li>
{% endfor %}
{% if category_has_services %}
</ul>
Expand Down
1 change: 0 additions & 1 deletion tests/controller/acp_controller_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
4 changes: 2 additions & 2 deletions tests/service/acp_manager_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Loading