From 3fba583ffadb45f723c0fe72238c1f0fd461beaa Mon Sep 17 00:00:00 2001 From: Zephyriony <142790847+zephyriony@users.noreply.github.com> Date: Sat, 16 Mar 2024 00:46:40 +0100 Subject: [PATCH] Update functions.lib.php --- htdocs/core/lib/functions.lib.php | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index ea7c71bf971..16328dfcece 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -13955,21 +13955,21 @@ function recordNotFound($message = '', $printheader = 1, $printfooter = 1, $show print ''; print '
'; - if (empty($showonlymessage)) { - if (empty($hookmanager)) { - include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; - $hookmanager = new HookManager($db); - // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context - $hookmanager->initHooks(array('main')); - } + if (empty($showonlymessage)) { + if (empty($hookmanager)) { + include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; + $hookmanager = new HookManager($db); + // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context + $hookmanager->initHooks(array('main')); + } - $parameters = array('message'=>$message, 'params'=>$params); - $reshook = $hookmanager->executeHooks('getErrorRecordNotFound', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks - print $hookmanager->resPrint; - } + $parameters = array('message'=>$message, 'params'=>$params); + $reshook = $hookmanager->executeHooks('getErrorRecordNotFound', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks + print $hookmanager->resPrint; + } if ($printfooter && function_exists("llxFooter")) { - llxFooter(); - } - exit(0); + llxFooter(); + } + exit(0); }