diff --git a/htdocs/categories/card.php b/htdocs/categories/card.php index 06510e44aa7..04c9953d92c 100644 --- a/htdocs/categories/card.php +++ b/htdocs/categories/card.php @@ -6,6 +6,7 @@ * Copyright (C) 2013 Florian Henry * Copyright (C) 2015 Raphaël Doursenaud * Copyright (C) 2020 Frédéric France + * Copyright (C) 2024 MDW * * 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 @@ -240,7 +241,7 @@ if ($user->hasRight('categorie', 'creer')) { print load_fiche_titre($langs->trans("CreateCat")); - print dol_get_fiche_head(''); + print dol_get_fiche_head(); print ''; @@ -282,7 +283,7 @@ if ($user->hasRight('categorie', 'creer')) { print '
'; - print dol_get_fiche_end(''); + print dol_get_fiche_end(); print '
'; print ''; diff --git a/htdocs/core/class/html.formticket.class.php b/htdocs/core/class/html.formticket.class.php index a5bf6539ac3..aac53b58353 100644 --- a/htdocs/core/class/html.formticket.class.php +++ b/htdocs/core/class/html.formticket.class.php @@ -5,6 +5,7 @@ * Copyright (C) 2021 Juanjo Menent * Copyright (C) 2021 Alexandre Spangaro * Copyright (C) 2023 Charlene Benke + * Copyright (C) 2024 MDW * * 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 @@ -138,7 +139,7 @@ class FormTicket $this->withcompany = !getDolGlobalInt("TICKETS_NO_COMPANY_ON_FORM") && isModEnabled("societe"); $this->withfromsocid = 0; $this->withfromcontactid = 0; - $this->withreadid=0; + $this->withreadid = 0; //$this->withtitletopic=''; $this->withnotifytiersatcreate = 0; $this->withusercreate = 1; @@ -911,8 +912,8 @@ class FormTicket } elseif ($htmlname != '') { $selectedgroups = array(); $groupvalue = ""; - $groupticket=GETPOST($htmlname, 'aZ09'); - $child_id=GETPOST($htmlname.'_child_id', 'aZ09') ? GETPOST($htmlname.'_child_id', 'aZ09') : 0; + $groupticket = GETPOST($htmlname, 'aZ09'); + $child_id = GETPOST($htmlname.'_child_id', 'aZ09') ? GETPOST($htmlname.'_child_id', 'aZ09') : 0; if (!empty($groupticket)) { $tmpgroupticket = $groupticket; $sql = "SELECT ctc.rowid, ctc.fk_parent, ctc.code"; @@ -1025,7 +1026,7 @@ class FormTicket if ($resql) { $num_rows = $this->db->num_rows($resql); $i = 0; - $arrayidused=array(); + $arrayidused = array(); while ($i < $num_rows) { $obj = $this->db->fetch_object($resql); if ($obj) { @@ -1054,7 +1055,7 @@ class FormTicket } $stringtoprint .= ''; if (empty($tabscript[$groupcodefather])) { - $tabscript[$groupcodefather] = 'if ($("#'.$htmlname.($levelid > 1 ? '_child_'.($levelid-1) : '').'").val() == "'.dol_escape_js($groupcodefather).'"){ + $tabscript[$groupcodefather] = 'if ($("#'.$htmlname.($levelid > 1 ? '_child_'.($levelid - 1) : '').'").val() == "'.dol_escape_js($groupcodefather).'"){ $(".'.$htmlname.'_'.dol_escape_htmltag($fatherid).'_child_'.$levelid.'").show() console.log("We show child tickets of '.$groupcodefather.' group ticket") }else{ @@ -1068,11 +1069,11 @@ class FormTicket } else { dol_print_error($this->db); } - $stringtoprint .=''; + $stringtoprint .= ''; - $stringtoprint .=''; + $stringtoprint .= '})'; + $stringtoprint .= ''; } - $stringtoprint .=''; + $stringtoprint .= ''; $stringtoprint .= ajax_combobox($htmlname); return $stringtoprint; diff --git a/htdocs/core/lib/member.lib.php b/htdocs/core/lib/member.lib.php index 8283de2dc75..ce5294d3ff9 100644 --- a/htdocs/core/lib/member.lib.php +++ b/htdocs/core/lib/member.lib.php @@ -3,6 +3,7 @@ * Copyright (C) 2015-2016 Alexandre Spangaro * Copyright (C) 2015 Raphaël Doursenaud * Copyright (C) 2017 Regis Houssin + * Copyright (C) 2024 MDW * * 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,8 +28,8 @@ /** * Return array head with list of tabs to view object information * - * @param Adherent $object Member - * @return array head + * @param Adherent $object Member + * @return array> head links */ function member_prepare_head(Adherent $object) { @@ -128,7 +129,7 @@ function member_prepare_head(Adherent $object) // Show agenda tab $head[$h][0] = DOL_URL_ROOT.'/adherents/agenda.php?id='.$object->id; $head[$h][1] = $langs->trans("Events"); - if (isModEnabled('agenda')&& ($user->hasRight('agenda', 'myactions', 'read') || $user->hasRight('agenda', 'allactions', 'read'))) { + if (isModEnabled('agenda') && ($user->hasRight('agenda', 'myactions', 'read') || $user->hasRight('agenda', 'allactions', 'read'))) { $nbEvent = 0; // Enable caching of thirdparty count actioncomm require_once DOL_DOCUMENT_ROOT.'/core/lib/memory.lib.php'; @@ -170,7 +171,7 @@ function member_prepare_head(Adherent $object) * Return array head with list of tabs to view object information * * @param AdherentType $object Member - * @return array head + * @return array> head links */ function member_type_prepare_head(AdherentType $object) { @@ -216,7 +217,7 @@ function member_type_prepare_head(AdherentType $object) /** * Return array head with list of tabs to view object information * - * @return array head + * @return array> head links */ function member_admin_prepare_head() { @@ -278,7 +279,7 @@ function member_admin_prepare_head() * Return array head with list of tabs to view object stats information * * @param Adherent $object Member or null - * @return array head + * @return array> head links */ function member_stats_prepare_head($object) { @@ -332,7 +333,7 @@ function member_stats_prepare_head($object) * Return array head with list of tabs to view object information * * @param Subscription $object Subscription - * @return array head + * @return array> head links */ function subscription_prepare_head(Subscription $object) { diff --git a/htdocs/fichinter/card.php b/htdocs/fichinter/card.php index a8301b48558..507affb5fab 100644 --- a/htdocs/fichinter/card.php +++ b/htdocs/fichinter/card.php @@ -11,6 +11,7 @@ * Copyright (C) 2020-2024 Frédéric France * Copyright (C) 2023 Benjamin Grembi * Copyright (C) 2023-2024 William Mead + * Copyright (C) 2024 MDW * * 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 @@ -117,7 +118,7 @@ $usercancreate = $user->hasRight('ficheinter', 'creer'); * Actions */ -$parameters = array('socid'=>$socid); +$parameters = array('socid' => $socid); $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); @@ -1185,7 +1186,7 @@ if ($action == 'create') { } if (!$formconfirm) { - $parameters = array('formConfirm' => $formconfirm, 'lineid'=>$lineid); + $parameters = array('formConfirm' => $formconfirm, 'lineid' => $lineid); $reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook if (empty($reshook)) { $formconfirm .= $hookmanager->resPrint; @@ -1204,8 +1205,8 @@ if ($action == 'create') { $morehtmlref = '
'; // Ref customer - $morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, $user->hasRight('ficheinter', 'creer'), 'string', '', 0, 1); - $morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, $user->hasRight('ficheinter', 'creer'), 'string', '', null, null, '', 1); + $morehtmlref .= $form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, $user->hasRight('ficheinter', 'creer'), 'string', '', 0, 1); + $morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, $user->hasRight('ficheinter', 'creer'), 'string', '', null, null, '', 1); // Thirdparty $morehtmlref .= '
'.$object->thirdparty->getNomUrl(1, 'customer'); // Project diff --git a/htdocs/intracommreport/card.php b/htdocs/intracommreport/card.php index 7adc9ea0eb7..8557b019fa6 100644 --- a/htdocs/intracommreport/card.php +++ b/htdocs/intracommreport/card.php @@ -1,6 +1,7 @@ * Copyright (C) 2019-2020 Open-DSI + * Copyright (C) 2024 MDW * * 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 @@ -234,7 +235,7 @@ if ($id > 0 && $action != 'edit') { */ //$head = intracommreport_prepare_head($object); - print dol_get_fiche_head("", 'general', $langs->trans("IntracommReport"), -1, 'user'); + print dol_get_fiche_head(array(), 'general', $langs->trans("IntracommReport"), -1, 'user'); // Confirm remove report if ($action == 'delete') { diff --git a/htdocs/modulebuilder/index.php b/htdocs/modulebuilder/index.php index 3c0d1e41776..0de6c3e47d8 100644 --- a/htdocs/modulebuilder/index.php +++ b/htdocs/modulebuilder/index.php @@ -4960,7 +4960,7 @@ if ($module == 'initmodule') { print ''.$langs->trans("EnterNameOfDictionaryDesc").'

'; - print dol_get_fiche_head(''); + print dol_get_fiche_head(); print ''; print ''; print ''; diff --git a/htdocs/product/card.php b/htdocs/product/card.php index 3813ec3432e..478f9641615 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -1364,7 +1364,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio $object->country = $tmparray['label']; } - print dol_get_fiche_head(''); + print dol_get_fiche_head(); // Call Hook tabContentCreateProduct $parameters = array(); @@ -3032,7 +3032,7 @@ if (getDolGlobalString('PRODUCT_ADD_FORM_ADD_TO') && $object->id && ($action == print load_fiche_titre($langs->trans("AddToDraft"), '', ''); - print dol_get_fiche_head(''); + print dol_get_fiche_head(); $html .= ''; diff --git a/htdocs/product/price.php b/htdocs/product/price.php index 075ebd97277..e6301b19aaa 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -1417,7 +1417,7 @@ if ($action == 'edit_vat' && ($user->hasRight('produit', 'creer') || $user->hasR print ''; print ''; - print dol_get_fiche_head(''); + print dol_get_fiche_head(); print '
'.$langs->trans("Table").'
'.$langs->trans("Quantity").' '; $html .= '
'; @@ -1446,7 +1446,7 @@ if ($action == 'edit_price' && $object->getRights()->creer) { print ''; print ''; - print dol_get_fiche_head(''); + print dol_get_fiche_head(); print '
'; print '
'; @@ -1582,7 +1582,7 @@ if ($action == 'edit_price' && $object->getRights()->creer) { print ''; print ''; - //print dol_get_fiche_head('', '', '', -1); + //print dol_get_fiche_head(array(), '', '', -1); if ((getDolGlobalString('PRODUIT_MULTIPRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES')) && getDolGlobalString('PRODUIT_MULTIPRICES_ALLOW_AUTOCALC_PRICELEVEL')) { print $langs->trans('UseMultipriceRules').' price_autogen ? 'checked' : '').'>

'; diff --git a/htdocs/projet/tasks.php b/htdocs/projet/tasks.php index bc0f4463f95..a490a3c9d33 100644 --- a/htdocs/projet/tasks.php +++ b/htdocs/projet/tasks.php @@ -737,7 +737,7 @@ if ($action == 'create' && $user->hasRight('projet', 'creer') && (empty($object- print ''; } - print dol_get_fiche_head(''); + print dol_get_fiche_head(); print '
'; print '
'; diff --git a/htdocs/public/company/new.php b/htdocs/public/company/new.php index 289adc1020b..0d26ad7ad9d 100644 --- a/htdocs/public/company/new.php +++ b/htdocs/public/company/new.php @@ -8,6 +8,7 @@ * Copyright (C) 2018 Alexandre Spangaro * Copyright (C) 2021 Waël Almoman * Copyright (C) 2022 Udo Tamm + * Copyright (C) 2024 MDW * * 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 @@ -327,7 +328,7 @@ $messagemandatory = '' . $langs->trans("FieldsWithAreMandatory", //print '
'.$langs->trans("FieldsWithAreMandatory", '*').'
'; //print $langs->trans("FieldsWithIsForPublic",'**').'
'; -print dol_get_fiche_head(''); +print dol_get_fiche_head(); print ''."\n"; } - print dol_get_fiche_head(''); + print dol_get_fiche_head(); print '
'; diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index 39cbc75b199..722e21c5cd0 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -1213,7 +1213,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio print ''; } - print dol_get_fiche_head(null, 'card', '', 0, ''); + print dol_get_fiche_head(array(), 'card', '', 0, ''); // Call Hook tabContentCreateThirdparty $parameters = array(); diff --git a/htdocs/user/card.php b/htdocs/user/card.php index 2b68a23c5c5..2863f54963e 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -15,6 +15,7 @@ * Copyright (C) 2016 Raphaël Doursenaud * Copyright (C) 2018-2023 Frédéric France * Copyright (C) 2018 David Beniamine + * Copyright (C) 2024 MDW * * 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 @@ -890,7 +891,7 @@ if ($action == 'create' || $action == 'adduserldap') { } print ''; - print dol_get_fiche_head('', '', '', 0, ''); + print dol_get_fiche_head(array(), '', '', 0, ''); dol_set_focus('#lastname'); diff --git a/htdocs/user/group/card.php b/htdocs/user/group/card.php index 37ab864ccde..6400ee3c975 100644 --- a/htdocs/user/group/card.php +++ b/htdocs/user/group/card.php @@ -5,6 +5,7 @@ * Copyright (C) 2011 Herve Prot * Copyright (C) 2012 Florian Henry * Copyright (C) 2018 Juanjo Menent + * Copyright (C) 2024 MDW * * 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 @@ -274,7 +275,7 @@ if ($action == 'create') { print ''; print ''; - print dol_get_fiche_head('', '', '', 0, ''); + print dol_get_fiche_head(array(), '', '', 0, ''); print '
';