From e4515f01c04763794b3789e5fadcfcf16bf81b9d Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Sat, 14 Jan 2023 11:56:41 +0100 Subject: [PATCH] Fix php 8 warnings --- htdocs/core/lib/ticket.lib.php | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/htdocs/core/lib/ticket.lib.php b/htdocs/core/lib/ticket.lib.php index 5d0d691228e..2c218421543 100644 --- a/htdocs/core/lib/ticket.lib.php +++ b/htdocs/core/lib/ticket.lib.php @@ -91,7 +91,7 @@ function ticket_prepare_head($object) $head[$h][2] = 'tabTicket'; $h++; - if (empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && empty($user->socid) && isModEnabled("societe")) { + if (!getDolGlobalInt('MAIN_DISABLE_CONTACTS_TAB') && empty($user->socid) && isModEnabled("societe")) { $nbContact = count($object->liste_contact(-1, 'internal')) + count($object->liste_contact(-1, 'external')); $head[$h][0] = DOL_URL_ROOT.'/ticket/contact.php?track_id='.$object->track_id; $head[$h][1] = $langs->trans('ContactsAddresses'); @@ -166,7 +166,7 @@ function showDirectPublicLink($object) } $out = ''; - if (empty($conf->global->TICKET_ENABLE_PUBLIC_INTERFACE)) { + if (!getDolGlobalInt('TICKET_ENABLE_PUBLIC_INTERFACE')) { $langs->load('errors'); $out .= ''.$langs->trans("ErrorPublicInterfaceNotEnabled").''; } else { @@ -223,9 +223,9 @@ function llxHeaderTicket($title, $head = "", $disablejs = 0, $disablehead = 0, $ print '
'; // Define urllogo - if (!empty($conf->global->TICKET_SHOW_COMPANY_LOGO) || !empty($conf->global->TICKET_PUBLIC_INTERFACE_TOPIC)) { + if (getDolGlobalInt('TICKET_SHOW_COMPANY_LOGO') || getDolGlobalString('TICKET_PUBLIC_INTERFACE_TOPIC')) { // Print logo - if (!empty($conf->global->TICKET_SHOW_COMPANY_LOGO)) { + if (getDolGlobalInt('TICKET_SHOW_COMPANY_LOGO')) { $urllogo = DOL_URL_ROOT.'/theme/common/login_logo.png'; if (!empty($mysoc->logo_small) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_small)) { @@ -239,28 +239,28 @@ function llxHeaderTicket($title, $head = "", $disablejs = 0, $disablehead = 0, $ } // Output html code for logo - if ($urllogo || !empty($conf->global->TICKET_PUBLIC_INTERFACE_TOPIC)) { + if ($urllogo || getDolGlobalInt('TICKET_PUBLIC_INTERFACE_TOPIC')) { print '
'; print '
'; if ($urllogo) { - print ''; + print ''; print ''; print ''; } - if (!empty($conf->global->TICKET_PUBLIC_INTERFACE_TOPIC)) { - print '
'.($conf->global->TICKET_PUBLIC_INTERFACE_TOPIC ? $conf->global->TICKET_PUBLIC_INTERFACE_TOPIC : $langs->trans("TicketSystem")).''; + if (getDolGlobalInt('TICKET_PUBLIC_INTERFACE_TOPIC')) { + print '
'.(getDolGlobalString('TICKET_PUBLIC_INTERFACE_TOPIC') ? getDolGlobalString('TICKET_PUBLIC_INTERFACE_TOPIC') : $langs->trans("TicketSystem")).''; } print '
'; - if (empty($conf->global->MAIN_HIDE_POWERED_BY)) { + if (!getDolGlobalInt('MAIN_HIDE_POWERED_BY')) { print ''; } print '
'; } - if (!empty($conf->global->TICKET_IMAGE_PUBLIC_INTERFACE)) { + if (getDolGlobalInt('TICKET_IMAGE_PUBLIC_INTERFACE')) { print '
'; - print ''; + print ''; print '
'; }