Merge pull request #17949 from frederic34/patch-8

fix php warning
This commit is contained in:
Laurent Destailleur 2021-06-16 12:02:54 +02:00 committed by GitHub
commit 89442c9ab5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -76,23 +76,23 @@ include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include,
$form = new Form($db); $form = new Form($db);
$helpurl = ''; $help_url = '';
if (GETPOST("type") == '0' || ($object->type == Product::TYPE_PRODUCT)) { if (GETPOST("type") == '0' || ($object->type == Product::TYPE_PRODUCT)) {
$helpurl = 'EN:Module_Products|FR:Module_Produits|ES:Módulo_Productos'; $help_url = 'EN:Module_Products|FR:Module_Produits|ES:Módulo_Productos';
} }
if (GETPOST("type") == '1' || ($object->type == Product::TYPE_SERVICE)) { if (GETPOST("type") == '1' || ($object->type == Product::TYPE_SERVICE)) {
$helpurl = 'EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios'; $help_url = 'EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios';
} }
$title = $langs->trans('ProductServiceCard'); $title = $langs->trans('ProductServiceCard');
$shortlabel = dol_trunc($object->label, 16); $shortlabel = dol_trunc($object->label, 16);
if (GETPOST("type") == '0' || ($object->type == Product::TYPE_PRODUCT)) { if (GETPOST("type") == '0' || ($object->type == Product::TYPE_PRODUCT)) {
$title = $langs->trans('Product')." ".$shortlabel." - ".$langs->trans('Notes'); $title = $langs->trans('Product')." ".$shortlabel." - ".$langs->trans('Notes');
$helpurl = 'EN:Module_Products|FR:Module_Produits|ES:Módulo_Productos'; $help_url = 'EN:Module_Products|FR:Module_Produits|ES:Módulo_Productos';
} }
if (GETPOST("type") == '1' || ($object->type == Product::TYPE_SERVICE)) { if (GETPOST("type") == '1' || ($object->type == Product::TYPE_SERVICE)) {
$title = $langs->trans('Service')." ".$shortlabel." - ".$langs->trans('Notes'); $title = $langs->trans('Service')." ".$shortlabel." - ".$langs->trans('Notes');
$helpurl = 'EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios'; $help_url = 'EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios';
} }
llxHeader('', $title, $help_url); llxHeader('', $title, $help_url);