Merge pull request #5116 from defrance/patch-3

Add addMoreActionsButtons Hook (standardisation)
This commit is contained in:
Laurent Destailleur 2016-05-05 21:31:02 +02:00
commit 92f9919f97
2 changed files with 190 additions and 179 deletions

View File

@ -852,7 +852,11 @@ else
* Boutons actions * Boutons actions
*/ */
print '<div class="tabsAction">'; print '<div class="tabsAction">';
$parameters = array();
$reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been
// modified by hook
if (empty($reshook))
{
if ($action != "edit" ) if ($action != "edit" )
{ {
// Modify // Modify
@ -989,6 +993,7 @@ else
} }
} }
} }
}
print "</div>"; print "</div>";

View File

@ -486,6 +486,11 @@ if ($id > 0 || ! empty($ref))
if ($action != 'edit') if ($action != 'edit')
{
$parameters = array();
$reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been
// modified by hook
if (empty($reshook))
{ {
/* /*
* Actions * Actions
@ -535,6 +540,7 @@ if ($id > 0 || ! empty($ref))
print '</td></tr></table>'; print '</td></tr></table>';
} }
} }
}
} }