diff --git a/htdocs/admin/index.php b/htdocs/admin/index.php index c27ec52072a..89dfa00dc80 100644 --- a/htdocs/admin/index.php +++ b/htdocs/admin/index.php @@ -88,8 +88,19 @@ if ( (isset($_POST["action"]) && $_POST["action"] == 'update') } } +if ($_GET["action"] == 'removelogo') +{ + $logofile=$conf->societe->dir_logos.'/'.$mysoc->logo; + @unlink($logofile); + dolibarr_del_const($db, "MAIN_INFO_SOCIETE_LOGO"); +} + +/* + * Affichage page + */ + llxHeader(); $form = new Form($db); @@ -178,9 +189,11 @@ if ((isset($_GET["action"]) && $_GET["action"] == 'edit') print ''.$langs->trans("Logo").' (png,jpg)'; print '
'; print ''; - print ''; - if (file_exists($conf->societe->dir_logos.'/'.$mysoc->logo)) + print ''; + if ($mysoc->logo && file_exists($conf->societe->dir_logos.'/'.$mysoc->logo)) { + print ''.img_delete($langs->trans("Delete")).''; + print '   '; print ''; } else @@ -410,7 +423,7 @@ else print '
'; print $mysoc->logo; print ''; - if (file_exists($conf->societe->dir_logos.'/'.$mysoc->logo)) + if ($mysoc->logo && file_exists($conf->societe->dir_logos.'/'.$mysoc->logo)) { print ''; } diff --git a/htdocs/includes/modules/commande/pdf_einstein.modules.php b/htdocs/includes/modules/commande/pdf_einstein.modules.php index fbdd6e18cb0..ad18150c28f 100644 --- a/htdocs/includes/modules/commande/pdf_einstein.modules.php +++ b/htdocs/includes/modules/commande/pdf_einstein.modules.php @@ -641,7 +641,7 @@ class pdf_einstein extends ModelePDFCommandes // Logo $logo=$conf->societe->dir_logos.'/'.$mysoc->logo; - if ($logo) + if ($mysoc->logo) { if (is_readable($logo)) {