diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php index 878a1081b40..54f3a4cbb73 100644 --- a/htdocs/admin/company.php +++ b/htdocs/admin/company.php @@ -271,7 +271,7 @@ if ($action == 'addthumb') // Regenerate thumbs $error++; $langs->load("errors"); setEventMessages($langs->trans("ErrorBadImageFormat"), null, 'errors'); - dol_syslog($langs->transnoentities("ErrorBadImageFormat"), LOG_WARNING); + dol_syslog($langs->transnoentities("ErrorBadImageFormat"), LOG_INFO); } } else @@ -412,9 +412,9 @@ if ($action == 'edit' || $action == 'updateedit') } // Logo - print ''; + print ''; print ''; // Barcode + if (! empty($conf->barcode->enabled)) { - print ''; } diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index a519d4b92bf..c86874cdde9 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -1901,7 +1901,7 @@ class Form // check parameters $price_level = (! empty($price_level) ? $price_level : 0); if (is_null($ajaxoptions)) $ajaxoptions=array(); - + if (! empty($conf->use_javascript_ajax) && ! empty($conf->global->PRODUIT_USE_SEARCH_TO_SELECT)) { $placeholder=''; @@ -7204,7 +7204,7 @@ class Form if ($object->photo) $ret.="
\n"; $ret.='
'; - print ''; + print ''; print ''; if (! empty($mysoc->logo_mini)) { print ''.img_delete($langs->trans("Delete")).''; @@ -798,9 +798,9 @@ else print '
'.$langs->trans("Gencod").'' . $conf->global->MAIN_INFO_SOCIETE_GENCOD . '
'; if ($object->photo) $ret.=''; - $ret.=''; + $ret.=''; $ret.='
'.$langs->trans("Delete").'

'; } } diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 8893626156b..e0c2afd7e34 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1079,7 +1079,7 @@ SystemInfoDesc=System information is miscellaneous technical information you get SystemAreaForAdminOnly=This area is available to administrator users only. Dolibarr user permissions cannot change this restriction. CompanyFundationDesc=Edit the information of the company/entity. Click on "%s" or "%s" button at the bottom of the page. AccountantDesc=Edit the details of your accountant/bookkeeper -AccountantFileNumber=File number +AccountantFileNumber=Accountant code DisplayDesc=Parameters affecting the look and behaviour of Dolibarr can be modified here. AvailableModules=Available app/modules ToActivateModule=To activate modules, go on setup Area (Home->Setup->Modules). diff --git a/htdocs/user/card.php b/htdocs/user/card.php index 479604ddc36..926cb50836e 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -423,8 +423,20 @@ if (empty($reshook)) { if (GETPOST('deletephoto')) { $object->photo = ''; } - if (!empty($_FILES['photo']['name'])) { - $object->photo = dol_sanitizeFileName($_FILES['photo']['name']); + if (!empty($_FILES['photo']['name'])) + { + $isimage=image_format_supported($_FILES['photo']['name']); + if ($isimage > 0) + { + $object->photo = dol_sanitizeFileName($_FILES['photo']['name']); + } + else + { + $error++; + $langs->load("errors"); + setEventMessages($langs->trans("ErrorBadImageFormat"), null, 'errors'); + dol_syslog($langs->transnoentities("ErrorBadImageFormat"), LOG_INFO); + } } if (!$error) {