From 2b59e9261b219036cc96f3237780f7bb6d5d49fa Mon Sep 17 00:00:00 2001 From: UT from dolibit <45215329+dolibit-ut@users.noreply.github.com> Date: Mon, 29 Aug 2022 18:58:51 +0200 Subject: [PATCH] Update index.php --- htdocs/commande/index.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/htdocs/commande/index.php b/htdocs/commande/index.php index 03644fe5690..57f61f3d9f7 100644 --- a/htdocs/commande/index.php +++ b/htdocs/commande/index.php @@ -25,6 +25,8 @@ * \brief Home page of customer order module */ + +// Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php'; @@ -32,6 +34,11 @@ require_once DOL_DOCUMENT_ROOT.'/societe/class/client.class.php'; require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/order.lib.php'; + +// Load translation files required by the page +$langs->loadLangs(array('orders', 'bills')); + + if (!$user->rights->commande->lire) { accessforbidden(); } @@ -41,8 +48,6 @@ $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')); // Security check $socid = GETPOST('socid', 'int');