From 5e259d26ab3cbe4b0eebfa010107f695dc93d466 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Wed, 1 Jul 2020 15:20:42 +0200 Subject: [PATCH] FIX takepos hook can add more than 1 button within 1 module --- htdocs/takepos/index.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/htdocs/takepos/index.php b/htdocs/takepos/index.php index 63bbc5d1808..51358e24080 100644 --- a/htdocs/takepos/index.php +++ b/htdocs/takepos/index.php @@ -932,8 +932,14 @@ if ($resql) $hookmanager->initHooks(array('takeposfrontend')); $reshook = $hookmanager->executeHooks('ActionButtons'); if (!empty($reshook)) { +if (is_array($reshook) && !isset($reshook['title'])) { + foreach ($reshook as $reshook) { +$menus[$r++] = $reshook; + } +} else { $menus[$r++] = $reshook; } +} if ($r % 3 == 2) $menus[$r++] = array('title'=>'', 'style'=>'visibility: hidden;');