diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index b8762bb0414..8c055faf841 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -13925,32 +13925,31 @@ function buildParamDate($prefix, $timestamp = null, $hourTime = '', $gm = 'auto' * @global object $object Current object, can be modified by hooks. * @return void This function terminates script execution after outputting the error page. */ - function recordNotFound($message = '', $printheader = 1, $printfooter = 1, $showonlymessage = 0, $params = null) - { - global $conf, $db, $user, $langs, $hookmanager; +{ + global $conf, $db, $user, $langs, $hookmanager; global $action, $object; - if (!is_object($langs)) { - include_once DOL_DOCUMENT_ROOT.'/core/class/translate.class.php'; - $langs = new Translate('', $conf); - $langs->setDefaultLang(); + if (!is_object($langs)) { + include_once DOL_DOCUMENT_ROOT.'/core/class/translate.class.php'; + $langs = new Translate('', $conf); + $langs->setDefaultLang(); } - $langs->load("errors"); + $langs->load("errors"); - if ($printheader) { - if (function_exists("llxHeader")) { - llxHeader(''); + if ($printheader) { + if (function_exists("llxHeader")) { + llxHeader(''); } elseif (function_exists("llxHeaderVierge")) { - llxHeaderVierge(''); + llxHeaderVierge(''); } } print '