From 6401c8a58e72d5de3b9a189090510dd34f9354e4 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Sat, 7 Oct 2017 20:05:02 +0200 Subject: [PATCH] NEW add doActions hook in admin ihm --- htdocs/admin/ihm.php | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/htdocs/admin/ihm.php b/htdocs/admin/ihm.php index 9d140d5a370..256dd08f9a8 100644 --- a/htdocs/admin/ihm.php +++ b/htdocs/admin/ihm.php @@ -1,8 +1,8 @@ +/* Copyright (C) 2001-2005 Rodolphe Quiedeville * Copyright (C) 2004-2015 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2016 Juanjo Menent + * Copyright (C) 2005-2017 Regis Houssin + * Copyright (C) 2016 Juanjo Menent * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -47,14 +47,21 @@ if (! $user->admin) accessforbidden(); $action = GETPOST('action','aZ09'); - if (! defined("MAIN_MOTD")) define("MAIN_MOTD",""); +// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context +$contextpage=array('adminihm','globaladmin'); +$hookmanager->initHooks($contextpage); + /* * Action */ +$parameters=array(); +$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks +if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + if (GETPOST('cancel','alpha')) { $action='';