diff --git a/htdocs/adherents/index.php b/htdocs/adherents/index.php index 1d1232a9d58..481a8e8fffd 100644 --- a/htdocs/adherents/index.php +++ b/htdocs/adherents/index.php @@ -1,8 +1,9 @@ - * Copyright (C) 2003 Jean-Louis Bergamo - * Copyright (C) 2004-2017 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2003 Jean-Louis Bergamo + * Copyright (C) 2004-2017 Laurent Destailleur + * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2019 Nicolas ZABOURI * * 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 @@ -29,6 +30,11 @@ require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/subscription.class.php'; +$hookmanager = new HookManager($db); + +// Initialize technical object to manage hooks. Note that conf->hooks_modules contains array +$hookmanager->initHooks(array('membersindex')); + // Load translation files required by the page $langs->loadLangs(array("companies","members")); @@ -435,6 +441,9 @@ print ""; print ''; +$parameters = array('user' => $user); +$reshook = $hookmanager->executeHooks('dashboardUsersGroups', $parameters, $object); // Note that $action and $object may have been modified by hook + // End of page llxFooter(); $db->close(); diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php index 651d2c54ec7..15e4e226587 100644 --- a/htdocs/comm/index.php +++ b/htdocs/comm/index.php @@ -3,6 +3,7 @@ * Copyright (C) 2004-2015 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2015 Jean-François Ferry + * Copyright (C) 2019 Nicolas ZABOURI * * 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 @@ -37,6 +38,11 @@ if (! empty($conf->fournisseur->enabled)) require_once DOL_DOCUMENT_ROOT.'/fourn if (! $user->rights->societe->lire) accessforbidden(); +$hookmanager = new HookManager($db); + +// Initialize technical object to manage hooks. Note that conf->hooks_modules contains array +$hookmanager->initHooks(array('commercialindex')); + // Load translation files required by the page $langs->loadLangs(array("commercial", "propal")); @@ -897,6 +903,9 @@ if (! empty($conf->commande->enabled) && $user->rights->commande->lire) print ''; +$parameters = array('user' => $user); +$reshook = $hookmanager->executeHooks('dashboardCommercials', $parameters, $object); // Note that $action and $object may have been modified by hook + // End of page llxFooter(); $db->close(); diff --git a/htdocs/comm/mailing/index.php b/htdocs/comm/mailing/index.php index c5d8bc47232..a835ca241a3 100644 --- a/htdocs/comm/mailing/index.php +++ b/htdocs/comm/mailing/index.php @@ -2,6 +2,7 @@ /* Copyright (C) 2005 Rodolphe Quiedeville * Copyright (C) 2005-2009 Laurent Destailleur * Copyright (C) 2010 Regis Houssin + * Copyright (C) 2019 Nicolas ZABOURI * * 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 @@ -27,6 +28,11 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT .'/comm/mailing/class/mailing.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; +$hookmanager = new HookManager($db); + +// Initialize technical object to manage hooks. Note that conf->hooks_modules contains array +$hookmanager->initHooks(array('mailingindex')); + // Load translation files required by the page $langs->loadLangs(array('commercial', 'orders')); @@ -207,6 +213,9 @@ if ($langs->file_exists("html/spam.html", 0)) { print '
'; } +$parameters = array('user' => $user); +$reshook = $hookmanager->executeHooks('dashboardEmailings', $parameters, $object); // Note that $action and $object may have been modified by hook + // End of page llxFooter(); $db->close(); diff --git a/htdocs/comm/propal/index.php b/htdocs/comm/propal/index.php index e69dbbc8b6c..309712ae76b 100644 --- a/htdocs/comm/propal/index.php +++ b/htdocs/comm/propal/index.php @@ -2,6 +2,7 @@ /* Copyright (C) 2003-2004 Rodolphe Quiedeville * Copyright (C) 2004-2017 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2019 Nicolas ZABOURI * * 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 @@ -27,6 +28,11 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT .'/comm/propal/class/propal.class.php'; +$hookmanager = new HookManager($db); + +// Initialize technical object to manage hooks. Note that conf->hooks_modules contains array +$hookmanager->initHooks(array('proposalindex')); + // Load translation files required by the page $langs->loadLangs(array('propal', 'companies')); @@ -540,6 +546,9 @@ if (! empty($conf->propal->enabled)) //print ''; print ''; +$parameters = array('user' => $user); +$reshook = $hookmanager->executeHooks('dashboardPropals', $parameters, $object); // Note that $action and $object may have been modified by hook + // End of page llxFooter(); $db->close(); diff --git a/htdocs/commande/index.php b/htdocs/commande/index.php index c0091b43af0..a0e87bf63a3 100644 --- a/htdocs/commande/index.php +++ b/htdocs/commande/index.php @@ -2,6 +2,7 @@ /* Copyright (C) 2003-2004 Rodolphe Quiedeville * Copyright (C) 2004-2011 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2019 Nicolas ZABOURI * * 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 @@ -31,6 +32,11 @@ require_once DOL_DOCUMENT_ROOT .'/commande/class/commande.class.php'; if (!$user->rights->commande->lire) accessforbidden(); +$hookmanager = new HookManager($db); + +// Initialize technical object to manage hooks. Note that conf->hooks_modules contains array +$hookmanager->initHooks(array('ordersindex')); + // Load translation files required by the page $langs->loadLangs(array('orders', 'bills')); @@ -478,6 +484,8 @@ if (! empty($conf->commande->enabled)) print ''; +$parameters = array('user' => $user); +$reshook = $hookmanager->executeHooks('dashboardOrders', $parameters, $object); // Note that $action and $object may have been modified by hook // End of page llxFooter(); diff --git a/htdocs/compta/charges/index.php b/htdocs/compta/charges/index.php index 33a06e09136..4b62a98b80b 100644 --- a/htdocs/compta/charges/index.php +++ b/htdocs/compta/charges/index.php @@ -3,8 +3,9 @@ * Copyright (C) 2004-2016 Laurent Destailleur * Copyright (C) 2005-2010 Regis Houssin * Copyright (C) 2011-2016 Alexandre Spangaro - * Copyright (C) 2011-2014 Juanjo Menent + * Copyright (C) 2011-2014 Juanjo Menent * Copyright (C) 2015 Jean-François Ferry + * Copyright (C) 2019 Nicolas ZABOURI * * 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 @@ -34,6 +35,12 @@ require_once DOL_DOCUMENT_ROOT.'/compta/salaries/class/paymentsalary.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; + +$hookmanager = new HookManager($db); + +// Initialize technical object to manage hooks. Note that conf->hooks_modules contains array +$hookmanager->initHooks(array('specialexpensesindex')); + // Load translation files required by the page $langs->loadLangs(array('compta', 'bills')); @@ -568,6 +575,9 @@ if (! empty($conf->salaries->enabled) && ! empty($user->rights->salaries->read)) print ''; +$parameters = array('user' => $user); +$reshook = $hookmanager->executeHooks('dashboardSpecialBills', $parameters, $object); // Note that $action and $object may have been modified by hook + // End of page llxFooter(); $db->close(); diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php index c57b073b487..932d9ed758c 100644 --- a/htdocs/compta/index.php +++ b/htdocs/compta/index.php @@ -2,10 +2,11 @@ /* Copyright (C) 2001-2005 Rodolphe Quiedeville * Copyright (C) 2004-2013 Laurent Destailleur * Copyright (C) 2005-2015 Regis Houssin - * Copyright (C) 2015-2016 Juanjo Menent + * Copyright (C) 2015-2016 Juanjo Menent * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2015 Raphaël Doursenaud * Copyright (C) 2016 Marcos García + * Copyright (C) 2019 Nicolas ZABOURI * * 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 @@ -63,6 +64,7 @@ if ($user->societe_id > 0) $max=3; +// Initialize technical object to manage hooks. Note that conf->hooks_modules contains array $hookmanager->initHooks(array('invoiceindex')); /* @@ -1080,6 +1082,9 @@ if ($resql) print ''; +$parameters = array('user' => $user); +$reshook = $hookmanager->executeHooks('dashboardAccountancy', $parameters, $object); // Note that $action and $object may have been modified by hook + // End of page llxFooter(); $db->close(); diff --git a/htdocs/contrat/index.php b/htdocs/contrat/index.php index 10c2e2915b9..3bf047c87c8 100644 --- a/htdocs/contrat/index.php +++ b/htdocs/contrat/index.php @@ -3,6 +3,7 @@ * Copyright (C) 2004-2011 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2015 Jean-François Ferry + * Copyright (C) 2019 Nicolas ZABOURI * * 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 @@ -28,6 +29,11 @@ require "../main.inc.php"; require_once DOL_DOCUMENT_ROOT."/contrat/class/contrat.class.php"; require_once DOL_DOCUMENT_ROOT."/product/class/product.class.php"; +$hookmanager = new HookManager($db); + +// Initialize technical object to manage hooks. Note that conf->hooks_modules contains array +$hookmanager->initHooks(array('contractindex')); + // Load translation files required by the page $langs->loadLangs(array('products', 'companies', 'contracts')); @@ -609,6 +615,8 @@ else //print ''; print ''; +$parameters = array('user' => $user); +$reshook = $hookmanager->executeHooks('dashboardContracts', $parameters, $object); // Note that $action and $object may have been modified by hook llxFooter(); diff --git a/htdocs/don/index.php b/htdocs/don/index.php index d632f316a25..4af0f0d81b0 100644 --- a/htdocs/don/index.php +++ b/htdocs/don/index.php @@ -2,6 +2,7 @@ /* Copyright (C) 2001-2002 Rodolphe Quiedeville * Copyright (C) 2004-2015 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2019 Nicolas ZABOURI * * 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 @@ -26,6 +27,11 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/don/class/don.class.php'; +$hookmanager = new HookManager($db); + +// Initialize technical object to manage hooks. Note that conf->hooks_modules contains array +$hookmanager->initHooks(array('donationindex')); + $langs->load("donations"); // Security check @@ -238,6 +244,8 @@ else dol_print_error($db); print ''; +$parameters = array('user' => $user); +$reshook = $hookmanager->executeHooks('dashboardDonation', $parameters, $object); // Note that $action and $object may have been modified by hook llxFooter(); diff --git a/htdocs/expedition/index.php b/htdocs/expedition/index.php index bbb5ef58c36..61838cc321b 100644 --- a/htdocs/expedition/index.php +++ b/htdocs/expedition/index.php @@ -2,6 +2,7 @@ /* Copyright (C) 2003-2005 Rodolphe Quiedeville * Copyright (C) 2004-2011 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2019 Nicolas ZABOURI * * 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 @@ -27,6 +28,11 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; require_once DOL_DOCUMENT_ROOT.'/expedition/class/expedition.class.php'; +$hookmanager = new HookManager($db); + +// Initialize technical object to manage hooks. Note that conf->hooks_modules contains array +$hookmanager->initHooks(array('sendingindex')); + // Load translation files required by the page $langs->loadLangs(array('orders', 'sendings')); @@ -291,6 +297,9 @@ else dol_print_error($db); print ''; +$parameters = array('user' => $user); +$reshook = $hookmanager->executeHooks('dashboardWarehouseSendings', $parameters, $object); // Note that $action and $object may have been modified by hook + // End of page llxFooter(); $db->close(); diff --git a/htdocs/expensereport/index.php b/htdocs/expensereport/index.php index f7d4e2a8405..461a7aec4fe 100644 --- a/htdocs/expensereport/index.php +++ b/htdocs/expensereport/index.php @@ -3,7 +3,8 @@ * Copyright (C) 2004-2015 Laurent Destailleur * Copyright (C) 2004 Eric Seigne * Copyright (C) 2005-2011 Regis Houssin - * Copyright (C) 2015 Alexandre Spangaro + * Copyright (C) 2015 Alexandre Spangaro + * Copyright (C) 2019 Nicolas ZABOURI * * 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 @@ -30,6 +31,11 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT . '/compta/tva/class/tva.class.php'; require_once DOL_DOCUMENT_ROOT . '/expensereport/class/expensereport.class.php'; +$hookmanager = new HookManager($db); + +// Initialize technical object to manage hooks. Note that conf->hooks_modules contains array +$hookmanager->initHooks(array('expensereportindex')); + // Load translation files required by the page $langs->loadLangs(array('companies', 'users', 'trips')); @@ -230,6 +236,9 @@ else dol_print_error($db); print ''; +$parameters = array('user' => $user); +$reshook = $hookmanager->executeHooks('dashboardExpenseReport', $parameters, $object); // Note that $action and $object may have been modified by hook + // End of page llxFooter(); $db->close(); diff --git a/htdocs/fichinter/index.php b/htdocs/fichinter/index.php index d240aadf42d..f97c99dc839 100644 --- a/htdocs/fichinter/index.php +++ b/htdocs/fichinter/index.php @@ -2,8 +2,8 @@ /* Copyright (C) 2003-2004 Rodolphe Quiedeville * Copyright (C) 2004-2015 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2015 Charlie Benke - + * Copyright (C) 2015 Charlie Benke + * Copyright (C) 2019 Nicolas ZABOURI * * 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 @@ -32,6 +32,11 @@ require_once DOL_DOCUMENT_ROOT .'/fichinter/class/fichinter.class.php'; if (!$user->rights->ficheinter->lire) accessforbidden(); +$hookmanager = new HookManager($db); + +// Initialize technical object to manage hooks. Note that conf->hooks_modules contains array +$hookmanager->initHooks(array('interventionindex')); + // Load translation files required by the page $langs->load("interventions"); @@ -356,6 +361,8 @@ if (! empty($conf->ficheinter->enabled)) print ''; +$parameters = array('user' => $user); +$reshook = $hookmanager->executeHooks('dashboardInterventions', $parameters, $object); // Note that $action and $object may have been modified by hook llxFooter(); diff --git a/htdocs/fourn/commande/index.php b/htdocs/fourn/commande/index.php index 6c2b66bc7f3..e66054dc750 100644 --- a/htdocs/fourn/commande/index.php +++ b/htdocs/fourn/commande/index.php @@ -1,8 +1,9 @@ - * Copyright (C) 2004-2012 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2012 Vinicius Nogueira + * Copyright (C) 2004-2012 Laurent Destailleur + * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2012 Vinicius Nogueira + * Copyright (C) 2019 Nicolas ZABOURI * * 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 @@ -34,6 +35,11 @@ $orderid = GETPOST('orderid'); if ($user->societe_id) $socid=$user->societe_id; $result = restrictedArea($user, 'fournisseur', $orderid, '', 'commande'); +$hookmanager = new HookManager($db); + +// Initialize technical object to manage hooks. Note that conf->hooks_modules contains array +$hookmanager->initHooks(array('orderssuppliersindex')); + // Load translation files required by the page $langs->loadLangs(array("suppliers", "orders")); @@ -432,6 +438,9 @@ print "
"; print ''; +$parameters = array('user' => $user); +$reshook = $hookmanager->executeHooks('dashboardOrdersSuppliers', $parameters, $object); // Note that $action and $object may have been modified by hook + // End of page llxFooter(); $db->close(); diff --git a/htdocs/hrm/index.php b/htdocs/hrm/index.php index 066a21ebad0..0dad608a5a5 100644 --- a/htdocs/hrm/index.php +++ b/htdocs/hrm/index.php @@ -3,6 +3,7 @@ * Copyright (C) 2013-2015 Laurent Destailleur * Copyright (C) 2012-2014 Regis Houssin * Copyright (C) 2015-2016 Alexandre Spangaro + * Copyright (C) 2019 Nicolas ZABOURI * * 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 @@ -36,6 +37,9 @@ if ($conf->deplacement->enabled) require_once DOL_DOCUMENT_ROOT.'/compta/deplace if ($conf->expensereport->enabled) require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php'; require_once DOL_DOCUMENT_ROOT.'/holiday/class/holiday.class.php'; +$hookmanager = new HookManager($db); +$hookmanager->initHooks('hrmindex'); + // Load translation files required by the page $langs->loadLangs(array('users', 'holidays', 'trips', 'boxes')); @@ -392,6 +396,10 @@ if (! empty($conf->expensereport->enabled) && $user->rights->expensereport->lire print ''; +// Initialize technical object to manage hooks. Note that conf->hooks_modules contains array +$parameters = array('user' => $user); +$reshook = $hookmanager->executeHooks('dashboardHRM', $parameters, $object); // Note that $action and $object may have been modified by hook + // End of page llxFooter(); $db->close(); diff --git a/htdocs/mrp/index.php b/htdocs/mrp/index.php index c30d75b1d40..a587706dbb7 100644 --- a/htdocs/mrp/index.php +++ b/htdocs/mrp/index.php @@ -1,8 +1,9 @@ - * Copyright (C) 2003 Jean-Louis Bergamo - * Copyright (C) 2004-2017 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2003 Jean-Louis Bergamo + * Copyright (C) 2004-2017 Laurent Destailleur + * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2019 Nicolas ZABOURI * * 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 @@ -27,6 +28,11 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/bom/class/bom.class.php'; +$hookmanager = new HookManager($db); + +// Initialize technical object to manage hooks. Note that conf->hooks_modules contains array +$hookmanager->initHooks(array('mrpindex')); + // Load translation files required by the page $langs->loadLangs(array("companies","mrp")); @@ -122,6 +128,9 @@ else print ''; +$parameters = array('type' => $type, 'user' => $user); +$reshook = $hookmanager->executeHooks('dashboardBOM', $parameters, $object); // Note that $action and $object may have been modified by hook + // End of page llxFooter(); $db->close(); diff --git a/htdocs/opensurvey/index.php b/htdocs/opensurvey/index.php index 413572ca4f6..0a9e3483348 100644 --- a/htdocs/opensurvey/index.php +++ b/htdocs/opensurvey/index.php @@ -1,6 +1,7 @@ - * + * Copyright (C) 2019 Nicolas ZABOURI + * * 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 * the Free Software Foundation; either version 3 of the License, or @@ -32,6 +33,12 @@ if (!$user->rights->opensurvey->read) accessforbidden(); * View */ + +$hookmanager = new HookManager($db); + +// Initialize technical object to manage hooks. Note that conf->hooks_modules contains array +$hookmanager->initHooks(array('opensurveyindex')); + // Load translation files required by the page $langs->load("opensurvey"); @@ -78,6 +85,9 @@ print ''; print ''; +$parameters = array('user' => $user); +$reshook = $hookmanager->executeHooks('dashboardOpenSurvey', $parameters, $object); // Note that $action and $object may have been modified by hook + // End of page llxFooter(); $db->close(); diff --git a/htdocs/product/index.php b/htdocs/product/index.php index 950f4d47b5f..fe93c4b5e6e 100644 --- a/htdocs/product/index.php +++ b/htdocs/product/index.php @@ -6,6 +6,7 @@ * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2019 Pierre Ardoin * Copyright (C) 2019 Frédéric France + * Copyright (C) 2019 Nicolas ZABOURI * * 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 @@ -397,6 +398,9 @@ if (! empty($conf->global->MAIN_SHOW_PRODUCT_ACTIVITY_TRIM)) print ''; +$parameters = array('type' => $type, 'user' => $user); +$reshook = $hookmanager->executeHooks('dashboardProductsServices', $parameters, $object); // Note that $action and $object may have been modified by hook + // End of page llxFooter(); $db->close(); diff --git a/htdocs/product/stock/index.php b/htdocs/product/stock/index.php index a19025b5dd6..a0b4895b669 100644 --- a/htdocs/product/stock/index.php +++ b/htdocs/product/stock/index.php @@ -2,6 +2,7 @@ /* Copyright (C) 2003-2006 Rodolphe Quiedeville * Copyright (C) 2004-2016 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2019 Nicolas ZABOURI * * 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 @@ -27,6 +28,11 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; +$hookmanager = new HookManager($db); + +// Initialize technical object to manage hooks. Note that conf->hooks_modules contains array +$hookmanager->initHooks(array('stockindex')); + // Load translation files required by the page $langs->loadLangs(array('stocks', 'productbatch')); @@ -184,6 +190,9 @@ if ($resql) //print ''; print ''; +$parameters = array('user' => $user); +$reshook = $hookmanager->executeHooks('dashboardWarehouse', $parameters, $object); // Note that $action and $object may have been modified by hook + // End of page llxFooter(); $db->close(); diff --git a/htdocs/projet/activity/index.php b/htdocs/projet/activity/index.php index b3fb66116bf..2148ba576d8 100644 --- a/htdocs/projet/activity/index.php +++ b/htdocs/projet/activity/index.php @@ -2,6 +2,7 @@ /* Copyright (C) 2001-2005 Rodolphe Quiedeville * Copyright (C) 2006-2015 Laurent Destailleur * Copyright (C) 2010 Regis Houssin + * Copyright (C) 2019 Nicolas ZABOURI * * 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 @@ -39,6 +40,11 @@ if ($user->societe_id > 0) $socid=$user->societe_id; //$result = restrictedArea($user, 'projet', $projectid); if (!$user->rights->projet->lire) accessforbidden(); +$hookmanager = new HookManager($db); + +// Initialize technical object to manage hooks. Note that conf->hooks_modules contains array +$hookmanager->initHooks(array('activityindex')); + // Load translation files required by the page $langs->load("projects"); @@ -573,6 +579,9 @@ if (empty($conf->global->PROJECT_HIDE_TASKS) && ! empty($conf->global->PROJECT_S print ''; +$parameters = array('user' => $user); +$reshook = $hookmanager->executeHooks('dashboardActivities', $parameters, $object); // Note that $action and $object may have been modified by hook + // End of page llxFooter(); $db->close(); diff --git a/htdocs/projet/index.php b/htdocs/projet/index.php index fa77cb4b52c..da148c1eda6 100644 --- a/htdocs/projet/index.php +++ b/htdocs/projet/index.php @@ -2,6 +2,7 @@ /* Copyright (C) 2001-2005 Rodolphe Quiedeville * Copyright (C) 2004-2016 Laurent Destailleur * Copyright (C) 2005-2010 Regis Houssin + * Copyright (C) 2019 Nicolas ZABOURI * * 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 @@ -30,6 +31,11 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; +$hookmanager = new HookManager($db); + +// Initialize technical object to manage hooks. Note that conf->hooks_modules contains array +$hookmanager->initHooks(array('projectsindex')); + // Load translation files required by the page $langs->loadLangs(array('projects', 'companies')); @@ -319,6 +325,9 @@ if (! empty($conf->global->PROJECT_SHOW_PROJECT_LIST_ON_PROJECT_AREA)) print ''; +$parameters = array('user' => $user); +$reshook = $hookmanager->executeHooks('dashboardProjects', $parameters, $object); // Note that $action and $object may have been modified by hook + // End of page llxFooter(); $db->close(); diff --git a/htdocs/reception/index.php b/htdocs/reception/index.php index 3b0bb7a05e0..97e25ab39e5 100644 --- a/htdocs/reception/index.php +++ b/htdocs/reception/index.php @@ -1,8 +1,9 @@ - * Copyright (C) 2004-2011 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2018 Quentin Vial-Gouteyron +/* Copyright (C) 2003-2005 Rodolphe Quiedeville + * Copyright (C) 2004-2011 Laurent Destailleur + * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2018 Quentin Vial-Gouteyron + * Copyright (C) 2019 Nicolas ZABOURI * * 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 @@ -28,6 +29,11 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php'; require_once DOL_DOCUMENT_ROOT.'/reception/class/reception.class.php'; +$hookmanager = new HookManager($db); + +// Initialize technical object to manage hooks. Note that conf->hooks_modules contains array +$hookmanager->initHooks(array('receptionindex')); + $langs->load("orders"); $langs->load("receptions"); @@ -292,6 +298,8 @@ else dol_print_error($db); print ''; +$parameters = array('user' => $user); +$reshook = $hookmanager->executeHooks('dashboardWarehouseReceptions', $parameters, $object); // Note that $action and $object may have been modified by hook llxFooter(); $db->close(); diff --git a/htdocs/societe/index.php b/htdocs/societe/index.php index 2404c11861e..d6df59f4740 100644 --- a/htdocs/societe/index.php +++ b/htdocs/societe/index.php @@ -2,9 +2,10 @@ /* Copyright (C) 2001-2006 Rodolphe Quiedeville * Copyright (C) 2004-2018 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2014 Charles-Fr Benke + * Copyright (C) 2014 Charles-Fr Benke * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2016 Ferran Marcet + * Copyright (C) 2019 Nicolas ZABOURI * * 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 @@ -29,6 +30,11 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; +$hookmanager = new HookManager($db); + +// Initialize technical object to manage hooks. Note that conf->hooks_modules contains array +$hookmanager->initHooks(array('thirdpartiesindex')); + $langs->load("companies"); $socid = GETPOST('socid', 'int'); @@ -366,6 +372,9 @@ else //print ''; print ''; +$parameters = array('user' => $user); +$reshook = $hookmanager->executeHooks('dashboardThirdparties', $parameters, $object); // Note that $action and $object may have been modified by hook + // End of page llxFooter(); $db->close(); diff --git a/htdocs/supplier_proposal/index.php b/htdocs/supplier_proposal/index.php index 5a2e6df2f29..d75d0c1647c 100644 --- a/htdocs/supplier_proposal/index.php +++ b/htdocs/supplier_proposal/index.php @@ -2,6 +2,7 @@ /* Copyright (C) 2003-2004 Rodolphe Quiedeville * Copyright (C) 2004-2011 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2019 Nicolas ZABOURI * * 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 @@ -27,6 +28,11 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT .'/supplier_proposal/class/supplier_proposal.class.php'; +$hookmanager = new HookManager($db); + +// Initialize technical object to manage hooks. Note that conf->hooks_modules contains array +$hookmanager->initHooks(array('suppliersproposalsindex')); + // Load translation files required by the page $langs->loadLangs(array('supplier_proposal', 'companies')); @@ -375,6 +381,9 @@ if (! empty($conf->supplier_proposal->enabled) && $user->rights->supplier_propos print ''; +$parameters = array('user' => $user); +$reshook = $hookmanager->executeHooks('dashboardSupplierProposal', $parameters, $object); // Note that $action and $object may have been modified by hook + // End of page llxFooter(); $db->close(); diff --git a/htdocs/ticket/index.php b/htdocs/ticket/index.php index 824b1f1833e..09b8a208c3c 100644 --- a/htdocs/ticket/index.php +++ b/htdocs/ticket/index.php @@ -1,5 +1,6 @@ +/* Copyright (C) - 2013-2016 Jean-François FERRY + * Copyright (C) - 2019 Nicolas ZABOURI * * 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 @@ -25,6 +26,11 @@ require_once DOL_DOCUMENT_ROOT . '/ticket/class/actions_ticket.class.php'; require_once DOL_DOCUMENT_ROOT . '/ticket/class/ticketstats.class.php'; require_once DOL_DOCUMENT_ROOT . '/core/class/dolgraph.class.php'; +$hookmanager = new HookManager($db); + +// Initialize technical object to manage hooks. Note that conf->hooks_modules contains array +$hookmanager->initHooks(array('ticketsindex')); + // Load translation files required by the page $langs->loadLangs(array('companies', 'other', 'ticket')); @@ -371,6 +377,9 @@ if ($result) { print ''; print '
'; +$parameters = array('user' => $user); +$reshook = $hookmanager->executeHooks('dashboardTickets', $parameters, $object); // Note that $action and $object may have been modified by hook + // End of page llxFooter(''); $db->close(); diff --git a/htdocs/user/home.php b/htdocs/user/home.php index 9a7d0ab94fd..bc766f4dc4b 100644 --- a/htdocs/user/home.php +++ b/htdocs/user/home.php @@ -1,6 +1,7 @@ * Copyright (C) 2005-2018 Regis Houssin + * Copyright (C) 2019 Nicolas ZABOURI * * 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 @@ -286,6 +287,10 @@ if ($canreadperms) //print ''; print ''; +// Initialize technical object to manage hooks. Note that conf->hooks_modules contains array +$parameters = array('user' => $user); +$reshook = $hookmanager->executeHooks('dashboardUsersGroups', $parameters, $object); // Note that $action and $object may have been modified by hook + // End of page llxFooter(); $db->close();