From fab63f680610c027bc7d6bb06b7faf9a21da3ba1 Mon Sep 17 00:00:00 2001 From: Eduard Wisch Date: Wed, 8 Apr 2026 15:34:31 +0200 Subject: [PATCH] fix: Tabs nach Stundenzettel-Pattern (mit /custom/ Prefix, ohne array-data wrap) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Tab-URL-Pfad braucht /custom/-Prefix damit Apache ihn richtig auflöst, und das einfache String-Array-Format (wie Stundenzettel) ist robuster als die ['data' => ...] Variante. Ungenutzte Hook-Contexts entfernt. Co-Authored-By: Claude Opus 4.6 (1M context) [deploy] --- core/modules/modBericht.class.php | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/core/modules/modBericht.class.php b/core/modules/modBericht.class.php index 911abbc..2444037 100644 --- a/core/modules/modBericht.class.php +++ b/core/modules/modBericht.class.php @@ -43,11 +43,7 @@ class modBericht extends DolibarrModules 'theme' => 0, 'css' => array('/bericht/css/bericht.css'), 'js' => array(), - 'hooks' => array( - 'invoicecard', - 'ordercard', - 'propalcard', - ), + 'hooks' => array(), 'moduleforexternal' => 0, ); @@ -84,9 +80,9 @@ class modBericht extends DolibarrModules // dynamisch hinzugefügt, weil wir die Sichtbarkeit pro Element-Typ über Konstanten steuern wollen. // Statisch geht aber auch — sicherer und einfacher: $this->tabs = array( - 0 => array('data' => 'invoice:+bericht:Bericht:bericht@bericht:$user->hasRight(\'bericht\', \'read\') && getDolGlobalString(\'BERICHT_TAB_ON_INVOICE\', \'1\'):/bericht/bericht_card.php?id=__ID__&element=invoice'), - 1 => array('data' => 'order:+bericht:Bericht:bericht@bericht:$user->hasRight(\'bericht\', \'read\') && getDolGlobalString(\'BERICHT_TAB_ON_ORDER\', \'1\'):/bericht/bericht_card.php?id=__ID__&element=order'), - 2 => array('data' => 'propal:+bericht:Bericht:bericht@bericht:$user->hasRight(\'bericht\', \'read\') && getDolGlobalString(\'BERICHT_TAB_ON_PROPAL\', \'1\'):/bericht/bericht_card.php?id=__ID__&element=propal'), + 'invoice:+bericht:Bericht:bericht@bericht:$user->hasRight("bericht","read"):/custom/bericht/bericht_card.php?id=__ID__&element=invoice', + 'order:+bericht:Bericht:bericht@bericht:$user->hasRight("bericht","read"):/custom/bericht/bericht_card.php?id=__ID__&element=order', + 'propal:+bericht:Bericht:bericht@bericht:$user->hasRight("bericht","read"):/custom/bericht/bericht_card.php?id=__ID__&element=propal', ); $this->dictionaries = array();