From 4bc8e026b69b58becd91bc924d1cf4a0755824c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 13 Jul 2014 19:51:44 +0200 Subject: [PATCH] [ bug #1526 ] Thumbs of files uploaded with dots in their names do not load correctly --- ChangeLog | 1 + htdocs/core/class/html.formfile.class.php | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 502cbc40536..d9c0706eb54 100644 --- a/ChangeLog +++ b/ChangeLog @@ -45,6 +45,7 @@ Fix: [ bug #1484 ] BILL_SUPPLIER_PAYED trigger action does not intercept failure Fix: [ bug #1482 ] Several supplier invoice triggers do not show trigger error messages Fix: [ bug #1486 ] LINEBILL_SUPPLIER_CREATE and LINEBILL_SUPPLIER_UPDATE triggers do not intercept trigger action Fix: [ bug #1522 ] Element list into associate object into project are no more filterd by project thirdparty +Fix: [ bug #1526 ] Thumbs of files uploaded with dots in their names do not load correctly ***** ChangeLog for 3.5.3 compared to 3.5.2 ***** Fix: Error on field accountancy code for export profile of invoices. diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 9ce484e5d43..d2cba220bcf 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -4,6 +4,7 @@ * Copyright (c) 2010 Juanjo Menent * Copyright (c) 2013 Charles-Fr BENKE * Copyright (C) 2013 Cédric Salvador + * Copyright (c) 2014 Marcos García * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -800,9 +801,10 @@ class FormFile // Preview if (empty($useinecm)) { + $fileinfo = pathinfo($file['name']); + print ''; - $tmp=explode('.',$file['name']); - $minifile=$tmp[0].'_mini.'.strtolower($tmp[1]); // Thumbs are created with filename in lower case + $minifile=$fileinfo['filename'].'_mini.'.$fileinfo['extension']; // Thumbs are created with filename in lower case if (image_format_supported($file['name']) > 0) print ''; else print ' '; print '';