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='';