From bb971192339ddfef1d33ac028645898b71345e94 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 6 Jun 2018 18:07:32 +0200 Subject: [PATCH] Fix duplicate function name --- htdocs/core/lib/ticket.lib.php | 42 ++++++++++++--------------------- htdocs/opensurvey/fonctions.php | 41 +++++++++++--------------------- 2 files changed, 29 insertions(+), 54 deletions(-) diff --git a/htdocs/core/lib/ticket.lib.php b/htdocs/core/lib/ticket.lib.php index f8acf4d433e..8f54197113e 100644 --- a/htdocs/core/lib/ticket.lib.php +++ b/htdocs/core/lib/ticket.lib.php @@ -151,7 +151,21 @@ function llxHeaderTicket($title, $head = "", $disablejs = 0, $disablehead = 0, $ print ''; if (! empty($conf->global->TICKETS_SHOW_COMPANY_LOGO)) { - showlogo(); + // Print logo + $urllogo = DOL_URL_ROOT . '/theme/login_logo.png'; + + if (!empty($mysoc->logo_small) && is_readable($conf->mycompany->dir_output . '/logos/thumbs/' . $mysoc->logo_small)) { + $urllogo = DOL_URL_ROOT . '/viewimage.php?cache=1&modulepart=companylogo&file=' . urlencode('thumbs/' . $mysoc->logo_small); + } elseif (!empty($mysoc->logo) && is_readable($conf->mycompany->dir_output . '/logos/' . $mysoc->logo)) { + $urllogo = DOL_URL_ROOT . '/viewimage.php?cache=1&modulepart=companylogo&file=' . urlencode($mysoc->logo); + $width = 128; + } elseif (is_readable(DOL_DOCUMENT_ROOT . '/theme/dolibarr_logo.png')) { + $urllogo = DOL_URL_ROOT . '/theme/dolibarr_logo.png'; + } + print '
'; + print 'Logo
'; + print '' . ($conf->global->TICKETS_PUBLIC_INTERFACE_TOPIC ? $conf->global->TICKETS_PUBLIC_INTERFACE_TOPIC : $langs->trans("TicketSystem")) . ''; + print '

'; } print '
'; @@ -173,29 +187,3 @@ function llxFooterTicket() print "\n"; print "\n"; } - -/** - * Show logo - * - * @return void - */ -function showlogo() -{ - global $conf, $langs, $mysoc; - - // Print logo - $urllogo = DOL_URL_ROOT . '/theme/login_logo.png'; - - if (!empty($mysoc->logo_small) && is_readable($conf->mycompany->dir_output . '/logos/thumbs/' . $mysoc->logo_small)) { - $urllogo = DOL_URL_ROOT . '/viewimage.php?cache=1&modulepart=companylogo&file=' . urlencode('thumbs/' . $mysoc->logo_small); - } elseif (!empty($mysoc->logo) && is_readable($conf->mycompany->dir_output . '/logos/' . $mysoc->logo)) { - $urllogo = DOL_URL_ROOT . '/viewimage.php?cache=1&modulepart=companylogo&file=' . urlencode($mysoc->logo); - $width = 128; - } elseif (is_readable(DOL_DOCUMENT_ROOT . '/theme/dolibarr_logo.png')) { - $urllogo = DOL_URL_ROOT . '/theme/dolibarr_logo.png'; - } - print '
'; - print 'Logo
'; - print '' . ($conf->global->TICKETS_PUBLIC_INTERFACE_TOPIC ? $conf->global->TICKETS_PUBLIC_INTERFACE_TOPIC : $langs->trans("TicketSystem")) . ''; - print '

'; -} diff --git a/htdocs/opensurvey/fonctions.php b/htdocs/opensurvey/fonctions.php index 3828d4e5e25..d2f401813a0 100644 --- a/htdocs/opensurvey/fonctions.php +++ b/htdocs/opensurvey/fonctions.php @@ -73,7 +73,20 @@ function llxHeaderSurvey($title, $head="", $disablejs=0, $disablehead=0, $arrayo top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss); // Show html headers print ''; - showlogo(); + // Print logo + if ($mysoc->logo) { + if (file_exists($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_small)) { + $urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file=thumbs/'.urlencode($mysoc->logo_small); + } + } + + if (!$urllogo && (is_readable(DOL_DOCUMENT_ROOT.'/theme/dolibarr_logo.png'))) + { + $urllogo=DOL_URL_ROOT.'/theme/dolibarr_logo.png'; + } + + print '
Logo
'; + print '
'; print '
'; } @@ -96,32 +109,6 @@ function llxFooterSurvey() } -/** - * Show logo - * - * @return void - */ -function showlogo() -{ - global $conf, $mysoc; - - // Print logo - if ($mysoc->logo) { - if (file_exists($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_small)) { - $urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file=thumbs/'.urlencode($mysoc->logo_small); - } - } - - if (!$urllogo && (is_readable(DOL_DOCUMENT_ROOT.'/theme/dolibarr_logo.png'))) - { - $urllogo=DOL_URL_ROOT.'/theme/dolibarr_logo.png'; - } - - print '
Logo
'; - print '
'; -} - - /** * get_server_name *