Replace hook ll header (#26736)

* Change behavior of keydown

* Fix accessibility

* New hook llxHeader to replace changeHelpURL

* remove space

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
This commit is contained in:
John BOTELLA 2023-11-21 00:06:59 +01:00 committed by GitHub
parent 3a17b15432
commit fba227d618
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 6 deletions

View File

@ -231,6 +231,7 @@ WARNING:
--------
The following changes may create regressions for some external modules, but were necessary to make Dolibarr better:
* The hook changeHelpURL is replaced by llxHeader
* The property ->brouillon has been removed from all classes. It was not reliable and was a duplicate of ->status == self::STATUS_DRAFT.
* The duplicated and deprecated property ->date_livraison that was renamed into ->delivery_date has been completely removed.
* The property ->user_close to store ID of closing user has been renamed into ->user_closing_id.

View File

@ -1460,6 +1460,28 @@ if (!function_exists("llxHeader")) {
{
global $conf, $hookmanager;
$parameters = array(
'head' =>& $head,
'title' =>& $title,
'help_url' =>& $help_url,
'target' =>& $target,
'disablej' =>& $disablej,
'disablehea' =>& $disablehea,
'arrayofjs' =>& $arrayofjs,
'arrayofcss' =>& $arrayofcss,
'morequerystring' =>& $morequerystring,
'morecssonbody' =>& $morecssonbody,
'replacemainareaby' =>& $replacemainareaby,
'disablenofollow' =>& $disablenofollow,
'disablenoindex' =>& $disablenoindex
);
$reshook = $hookmanager->executeHooks('llxHeader', $parameters);
if ($reshook > 0) {
print $hookmanager->resPrint;
return;
}
// html header
top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss, 0, $disablenofollow, $disablenoindex);
@ -1478,12 +1500,6 @@ if (!function_exists("llxHeader")) {
print '<body id="mainbody" class="'.$tmpcsstouse.'">'."\n";
$parameters = array('help_url' => $help_url);
$reshook = $hookmanager->executeHooks('changeHelpURL', $parameters);
if ($reshook > 0) {
$help_url = $hookmanager->resPrint;
}
// top menu and left menu area
if ((empty($conf->dol_hide_topmenu) || GETPOST('dol_invisible_topmenu', 'int')) && !GETPOST('dol_openinpopup', 'aZ09')) {
top_menu($head, $title, $target, $disablejs, $disablehead, $arrayofjs, $arrayofcss, $morequerystring, $help_url);