From c5fcd99f6e92f6228cddc3c998c28b758230dbd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20NASSIET?= Date: Mon, 23 Jan 2023 19:51:00 +0100 Subject: [PATCH] Adding a hook addToLandingPageList in userihm context --- htdocs/user/param_ihm.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/htdocs/user/param_ihm.php b/htdocs/user/param_ihm.php index 3d2e3240ce3..136da34e1bd 100644 --- a/htdocs/user/param_ihm.php +++ b/htdocs/user/param_ihm.php @@ -215,6 +215,16 @@ if (isModEnabled('ticket')) { $tmparray['ticket/list.php?mainmenu=ticket&leftmenu='] = 'Tickets'; } +// Hook for insertion new items in the List of possible landing pages +$reshook = $hookmanager->executeHooks('addToLandingPageList', $tmparray, $object); +if ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} elseif ($reshook > 0) { + $tmparray=$hookmanager->resArray; +} elseif ($reshook == 0) { + $tmparray=array_merge($tmparray, $hookmanager->resArray); +} + $head = user_prepare_head($object); $title = $langs->trans("User");