fix: render DirectAdmin user hooks

This commit is contained in:
Marek Miklewicz
2026-06-02 19:32:58 +02:00
parent 6bd4a5fd74
commit a0bd158a2e
4 changed files with 13 additions and 3 deletions
+1 -1
View File
@@ -1 +1 @@
images/user_icon.svg <a href="/CMD_PLUGINS/global-autoresponder/index.html" target="_top"><img src="/CMD_PLUGINS/global-autoresponder/images/user_icon.svg" width="16" height="16" alt="Globalne autorespondery"/></a>
+1 -1
View File
@@ -1 +1 @@
Globalne autorespondery <a href="/CMD_PLUGINS/global-autoresponder/index.html" target="_top">Globalne autorespondery</a>
+1 -1
View File
@@ -2,6 +2,6 @@ name=global-autoresponder
id=global-autoresponder id=global-autoresponder
type=user type=user
author=HITME.PL author=HITME.PL
version=1.0.1 version=1.0.2
active=no active=no
installed=no installed=no
+10
View File
@@ -18,3 +18,13 @@ test('mockup forms include calendar classes and delete confirmation view', funct
assert_contains('Potwierdź usunięcie', $delete); assert_contains('Potwierdź usunięcie', $delete);
assert_false(stripos($delete, 'checkbox') !== false); assert_false(stripos($delete, 'checkbox') !== false);
}); });
test('directadmin user hooks are clickable and point to reserved icon path', function (): void {
$img = file_get_contents(PLUGIN_ROOT . '/hooks/user_img.html') ?: '';
$txt = file_get_contents(PLUGIN_ROOT . '/hooks/user_txt.html') ?: '';
assert_contains('<a href="/CMD_PLUGINS/global-autoresponder/index.html"', $img);
assert_contains('<img src="/CMD_PLUGINS/global-autoresponder/images/user_icon.svg"', $img);
assert_contains('<a href="/CMD_PLUGINS/global-autoresponder/index.html"', $txt);
assert_contains('Globalne autorespondery', $txt);
});