FIX takepos hook

can add more than 1 button within 1 module
This commit is contained in:
ptibogxiv 2020-07-01 15:20:42 +02:00 committed by GitHub
parent e2a9743dd4
commit 5e259d26ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;');