diff --git a/doc/images/dolibarr_screenshot1_300x188.png b/doc/images/dolibarr_screenshot1_300x188.png index 51c949ee67e4b1e9f81bacff33fde86dc968939d..1b8e9247a5c09ada6af97396087ad57bc978705a 100644 Binary files a/doc/images/dolibarr_screenshot1_300x188.png and b/doc/images/dolibarr_screenshot1_300x188.png differ diff --git a/doc/images/dolibarr_screenshot1_640x400.png b/doc/images/dolibarr_screenshot1_640x400.png index 9ed384263adaca2a680ec852f84e988b55d121ec..4739079256bbd39782f3777daefd5f9726173a5d 100644 Binary files a/doc/images/dolibarr_screenshot1_640x400.png and b/doc/images/dolibarr_screenshot1_640x400.png differ diff --git a/htdocs/adherents/document.php b/htdocs/adherents/document.php index a95063e9d64c31bdd7df980ce4d3d5154dc29062..547ccc0466c695dd1233ced3e478bd3d4baa0de2 100644 --- a/htdocs/adherents/document.php +++ b/htdocs/adherents/document.php @@ -103,7 +103,7 @@ if ($id > 0) // Construit liste des fichiers - $filearray=dol_dir_list($upload_dir,"files",0,'','\.meta$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1); + $filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1); $totalsize=0; foreach($filearray as $key => $file) { diff --git a/htdocs/admin/system/perf.php b/htdocs/admin/system/perf.php index de33508fba8d90e3018e9253bed5258de7593591..e2990e3275bdbe754ba62d028e4e5f020b4c90a1 100644 --- a/htdocs/admin/system/perf.php +++ b/htdocs/admin/system/perf.php @@ -77,6 +77,7 @@ if ($test) else { print img_picto('','warning').' '.$langs->trans("MemcachedModuleAvailableButNotSetup"); + print ' <a href="'.dol_buildpath('/memcached/admin/memcached.php',1).'">Memcached module admin page</a>'; } } else print img_picto('','warning').' '.$langs->trans("MemcachedNotAvailable"); @@ -89,7 +90,7 @@ $test1=function_exists('xcache_info'); if ($test1) { print img_picto('','tick.png').' '.$langs->trans("XCacheInstalled"); - print ' '.$langs->trans("MoreInformation").' <a href="'.DOL_URL_ROOT.'/admin/xcache.php'.'">Xcache admin page</a>'; + print ' '.$langs->trans("MoreInformation").' <a href="'.DOL_URL_ROOT.'/admin/system/xcache.php'.'">Xcache admin page</a>'; } else { diff --git a/htdocs/comm/action/document.php b/htdocs/comm/action/document.php index 972858a808f801a66ca6cf05d313b55a98fefe1d..26852e796c1d6eaa72f650384def799b47d55351 100644 --- a/htdocs/comm/action/document.php +++ b/htdocs/comm/action/document.php @@ -240,7 +240,7 @@ if ($object->id > 0) print '</table><br><br><table class="border" width="100%">'; // Construit liste des fichiers - $filearray=dol_dir_list($upload_dir,"files",0,'','\.meta$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1); + $filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1); $totalsize=0; foreach($filearray as $key => $file) { diff --git a/htdocs/comm/propal/document.php b/htdocs/comm/propal/document.php index d3766ae27ceef3bdaef63c1c5efda130842dc862..ccd318c93fb4de60e2c18dcd1a929cc65bb901e8 100644 --- a/htdocs/comm/propal/document.php +++ b/htdocs/comm/propal/document.php @@ -91,7 +91,7 @@ if ($object->id > 0) dol_fiche_head($head, 'document', $langs->trans('Proposal'), 0, 'propal'); // Construit liste des fichiers - $filearray=dol_dir_list($upload_dir,"files",0,'','\.meta$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1); + $filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1); $totalsize=0; foreach($filearray as $key => $file) { diff --git a/htdocs/commande/document.php b/htdocs/commande/document.php index 17e041adaf5371a26486b3f92abd8a8da58d2306..05538666ba35c0e14f3a54aab0bfda7cbf3a53e7 100644 --- a/htdocs/commande/document.php +++ b/htdocs/commande/document.php @@ -96,7 +96,7 @@ if ($id > 0 || ! empty($ref)) // Construit liste des fichiers - $filearray=dol_dir_list($upload_dir,"files",0,'','\.meta$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1); + $filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1); $totalsize=0; foreach($filearray as $key => $file) { diff --git a/htdocs/compta/deplacement/document.php b/htdocs/compta/deplacement/document.php index fb9df1fcb37dc64940a19b00aba6837766364a4b..eed21f3e1ccb9b38d23813b3ce5bfd5a32314b2b 100644 --- a/htdocs/compta/deplacement/document.php +++ b/htdocs/compta/deplacement/document.php @@ -94,7 +94,7 @@ if ($object->id) // Construit liste des fichiers - $filearray=dol_dir_list($upload_dir,"files",0,'','\.meta$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1); + $filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1); $totalsize=0; foreach($filearray as $key => $file) { diff --git a/htdocs/compta/facture/document.php b/htdocs/compta/facture/document.php index 1eb5909544b43daccf0251358781962600cf8a9b..31a741d9dcfd799c9fe7ac5b751388690c28a341 100644 --- a/htdocs/compta/facture/document.php +++ b/htdocs/compta/facture/document.php @@ -98,7 +98,7 @@ if ($id > 0 || ! empty($ref)) // Construit liste des fichiers - $filearray=dol_dir_list($upload_dir,"files",0,'','\.meta$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1); + $filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1); $totalsize=0; foreach($filearray as $key => $file) { diff --git a/htdocs/compta/sociales/document.php b/htdocs/compta/sociales/document.php index 0647f0986d8088ad655ce9ff182d0d74c4cec8a8..32eb8a50f77728fe8dddfead53160ae982f28db8 100644 --- a/htdocs/compta/sociales/document.php +++ b/htdocs/compta/sociales/document.php @@ -95,7 +95,7 @@ if ($object->id) // Construit liste des fichiers - $filearray=dol_dir_list($upload_dir,"files",0,'','\.meta$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1); + $filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1); $totalsize=0; foreach($filearray as $key => $file) { diff --git a/htdocs/contrat/document.php b/htdocs/contrat/document.php index ea951f85941e463fd52153bf58c13ad20e85f763..0432f16b31b691b05b9bd3a8bf9e9ff7d818f72b 100644 --- a/htdocs/contrat/document.php +++ b/htdocs/contrat/document.php @@ -97,7 +97,7 @@ if ($object->id) // Construit liste des fichiers - $filearray=dol_dir_list($upload_dir,"files",0,'','\.meta$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1); + $filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1); $totalsize=0; foreach($filearray as $key => $file) { diff --git a/htdocs/core/ajax/ajaxdirpreview.php b/htdocs/core/ajax/ajaxdirpreview.php index e2ad29b8562098170737142bee4d9021357dfd2a..8759af8a7195b1e92410458cec1ee5eb374fc620 100644 --- a/htdocs/core/ajax/ajaxdirpreview.php +++ b/htdocs/core/ajax/ajaxdirpreview.php @@ -149,7 +149,7 @@ if ($type == 'directory') $formfile=new FormFile($db); $maxlengthname=40; - $excludefiles = array('^SPECIMEN\.pdf$','^\.','\.meta$','^temp$','^payments$','^CVS$','^thumbs$'); + $excludefiles = array('^SPECIMEN\.pdf$','^\.','(\.meta|_preview\.png)$','^temp$','^payments$','^CVS$','^thumbs$'); $sorting = (strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC); // Right area. If module is defined, we are in automatic ecm. @@ -205,7 +205,7 @@ if ($type == 'directory') $filearray=array(); $textifempty='<br><div align="center"><font class="warning">'.$langs->trans("DirNotSynchronizedSyncFirst").'</font></div><br>'; } - else $filearray=dol_dir_list($upload_dir,"files",0,'',array('^\.','\.meta$','^temp$','^CVS$'),$sortfield, $sorting,1); + else $filearray=dol_dir_list($upload_dir,"files",0,'',array('^\.','(\.meta|_preview\.png)$','^temp$','^CVS$'),$sortfield, $sorting,1); if ($section) { diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 334fb9a5d9eff6d1cf72a9e913590a1b462dfe5f..cb993f9418e7c58dcbe76e09bdf0fafeb9ef3839 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -797,7 +797,8 @@ class FormFile { print '<td align="center">'; $tmp=explode('.',$file['name']); - $minifile=$tmp[0].'_mini.'.strtolower($tmp[1]); // Thumbs are created with filename in lower case + if (count($tmp) == 3) $minifile=$tmp[0].'_mini.'.$tmp[1].'.'.strtolower($tmp[2]); // Thumbs are created with filename in lower case + else $minifile=$tmp[0].'_mini.'.strtolower($tmp[1]); // Thumbs are created with filename in lower case if (image_format_supported($file['name']) > 0) print '<img border="0" height="'.$maxheightmini.'" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart='.$modulepart.'&file='.urlencode($relativepath.'thumbs/'.$minifile).'" title="">'; else print ' '; print '</td>'; diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index faa4d7f16408fbf60808f4744c33aa2ddecdb2b0..b8a2991ffb5b5d7374e84a0fc6ad73570843d10f 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -43,7 +43,7 @@ function dol_basename($pathfile) * @param string $types Can be "directories", "files", or "all" * @param int $recursive Determines whether subdirectories are searched * @param string $filter Regex filter to restrict list. This regex value must be escaped for '/', since this char is used for preg_match function - * @param string[] $excludefilter Array of Regex for exclude filter (example: array('\.meta$','^\.')) + * @param string[] $excludefilter Array of Regex for exclude filter (example: array('(\.meta|_preview\.png)$','^\.')) * @param string $sortcriteria Sort criteria ("","fullname","name","date","size") * @param string $sortorder Sort order (SORT_ASC, SORT_DESC) * @param int $mode 0=Return array minimum keys loaded (faster), 1=Force all keys like date and size to be loaded (slower), 2=Force load of date only, 3=Force load of size only @@ -1281,11 +1281,11 @@ function dol_uncompress($inputfile,$outputdir) * * @param string $dir Directory to scan * @param string $regexfilter Regex filter to restrict list. This regex value must be escaped for '/', since this char is used for preg_match function - * @param string[] $excludefilter Array of Regex for exclude filter (example: array('\.meta$','^\.')). This regex value must be escaped for '/', since this char is used for preg_match function + * @param string[] $excludefilter Array of Regex for exclude filter (example: array('(\.meta|_preview\.png)$','^\.')). This regex value must be escaped for '/', since this char is used for preg_match function * @param int $nohook Disable all hooks * @return string Full path to most recent file */ -function dol_most_recent_file($dir,$regexfilter='',$excludefilter=array('\.meta$','^\.'),$nohook=false) +function dol_most_recent_file($dir,$regexfilter='',$excludefilter=array('(\.meta|_preview\.png)$','^\.'),$nohook=false) { $tmparray=dol_dir_list($dir,'files',0,$regexfilter,$excludefilter,'date',SORT_DESC,'',$nohook); return $tmparray[0]; diff --git a/htdocs/core/modules/project/pdf/doc_generic_project_odt.modules.php b/htdocs/core/modules/project/pdf/doc_generic_project_odt.modules.php index c8cf919742bc8f84ba50af83c6db3b308208df92..9525639dd9ccea7471f231a10a6bcf9b9596337b 100644 --- a/htdocs/core/modules/project/pdf/doc_generic_project_odt.modules.php +++ b/htdocs/core/modules/project/pdf/doc_generic_project_odt.modules.php @@ -707,7 +707,7 @@ class doc_generic_project_odt extends ModelePDFProjects $listtasksfiles = $listlines->__get('tasksfiles'); $upload_dir = $conf->projet->dir_output.'/'.dol_sanitizeFileName($object->ref).'/'.dol_sanitizeFileName($task->ref); - $filearray=dol_dir_list($upload_dir,"files",0,'','\.meta$','name',SORT_ASC,1); + $filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview\.png)$','name',SORT_ASC,1); foreach ($filearray as $filedetail) @@ -746,7 +746,7 @@ class doc_generic_project_odt extends ModelePDFProjects $listlines = $odfHandler->setSegment('projectfiles'); $upload_dir = $conf->projet->dir_output.'/'.dol_sanitizeFileName($object->ref); - $filearray=dol_dir_list($upload_dir,"files",0,'','\.meta$','name',SORT_ASC,1); + $filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview\.png)$','name',SORT_ASC,1); foreach ($filearray as $filedetail) { diff --git a/htdocs/core/modules/project/task/pdf/doc_generic_task_odt.modules.php b/htdocs/core/modules/project/task/pdf/doc_generic_task_odt.modules.php index 3d76834dc9ef8fac1bf16ec58a5ed1d96769156e..09d6284d9023e021ae4a67cdded7d6c357e77f76 100644 --- a/htdocs/core/modules/project/task/pdf/doc_generic_task_odt.modules.php +++ b/htdocs/core/modules/project/task/pdf/doc_generic_task_odt.modules.php @@ -682,7 +682,7 @@ class doc_generic_task_odt extends ModelePDFTask $listtasksfiles = $odfHandler->setSegment('tasksfiles'); $upload_dir = $conf->projet->dir_output.'/'.dol_sanitizeFileName($project->ref).'/'.dol_sanitizeFileName($object->ref); - $filearray=dol_dir_list($upload_dir,"files",0,'','\.meta$','name',SORT_ASC,1); + $filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview\.png)$','name',SORT_ASC,1); foreach ($filearray as $filedetail) @@ -724,7 +724,7 @@ class doc_generic_task_odt extends ModelePDFTask $listlines = $odfHandler->setSegment('projectfiles'); $upload_dir = $conf->projet->dir_output.'/'.dol_sanitizeFileName($object->ref); - $filearray=dol_dir_list($upload_dir,"files",0,'','\.meta$','name',SORT_ASC,1); + $filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview\.png)$','name',SORT_ASC,1); foreach ($filearray as $filedetail) diff --git a/htdocs/ecm/class/ecmdirectory.class.php b/htdocs/ecm/class/ecmdirectory.class.php index 54e3fa0a5616ea68599b0f550e93158b2ce8639c..aed4a682fc01874e01a79adb4c5579449aae7e06 100644 --- a/htdocs/ecm/class/ecmdirectory.class.php +++ b/htdocs/ecm/class/ecmdirectory.class.php @@ -671,7 +671,7 @@ class EcmDirectory // extends CommonObject include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; $dir=$conf->ecm->dir_output.'/'.$this->getRelativePath(); - $filelist=dol_dir_list($dir,'files',0,'','\.meta$'); + $filelist=dol_dir_list($dir,'files',0,'','(\.meta|_preview\.png)$'); // Test if filelist is in database diff --git a/htdocs/ecm/docmine.php b/htdocs/ecm/docmine.php index 94c5d06759d65d601b0c0c6153b429c647af603d..6cd469417ae6239f278c27664136e66acfbbf2dd 100644 --- a/htdocs/ecm/docmine.php +++ b/htdocs/ecm/docmine.php @@ -202,7 +202,7 @@ $form=new Form($db); // Construit liste des fichiers -$filearray=dol_dir_list($upload_dir,"files",0,'','\.meta$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1); +$filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1); $totalsize=0; foreach($filearray as $key => $file) { diff --git a/htdocs/ecm/search.php b/htdocs/ecm/search.php index 03ccaabd2a5c36f161a649ac8dc95092464eea6c..8bfc9216fbedd2b9f5855636e17b00afc7295e8a 100644 --- a/htdocs/ecm/search.php +++ b/htdocs/ecm/search.php @@ -187,7 +187,7 @@ print '</td><td valign="top">'; // Right area $relativepath=$ecmdir->getRelativePath(); $upload_dir = $conf->ecm->dir_output.'/'.$relativepath; -$filearray=dol_dir_list($upload_dir,"files",0,'','\.meta$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1); +$filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1); $formfile=new FormFile($db); $param='&section='.$section; diff --git a/htdocs/fichinter/document.php b/htdocs/fichinter/document.php index 27e1c4995c16d3a22f9448a140a324bce2a97b35..54728df36d91eaa8c0005a8197aebf0df29c1805 100644 --- a/htdocs/fichinter/document.php +++ b/htdocs/fichinter/document.php @@ -94,7 +94,7 @@ if ($object->id) // Construit liste des fichiers - $filearray=dol_dir_list($upload_dir,"files",0,'','\.meta$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1); + $filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1); $totalsize=0; foreach($filearray as $key => $file) { diff --git a/htdocs/fourn/commande/document.php b/htdocs/fourn/commande/document.php index ce497f9b7c4e784566e9d9bc6e5fe1a00c49b9d8..cdf5bfad4e52eeeda334cd2cb7aedbf2c6bbb40a 100644 --- a/htdocs/fourn/commande/document.php +++ b/htdocs/fourn/commande/document.php @@ -100,7 +100,7 @@ if ($object->id > 0) // Construit liste des fichiers - $filearray=dol_dir_list($upload_dir,"files",0,'','\.meta$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1); + $filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1); $totalsize=0; foreach($filearray as $key => $file) { diff --git a/htdocs/fourn/facture/document.php b/htdocs/fourn/facture/document.php index 2bc3e7b607e2c31cf20884840a367ba55deabeba..3ea8e7b382e6ac173bf2e2bad6eea4344b4ab6b3 100644 --- a/htdocs/fourn/facture/document.php +++ b/htdocs/fourn/facture/document.php @@ -89,7 +89,7 @@ if ($object->id > 0) dol_fiche_head($head, 'documents', $langs->trans('SupplierInvoice'), 0, 'bill'); // Construit liste des fichiers - $filearray=dol_dir_list($upload_dir,"files",0,'','\.meta$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1); + $filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1); $totalsize=0; foreach($filearray as $key => $file) { diff --git a/htdocs/install/repair.php b/htdocs/install/repair.php index a6c0975ec9762f2ef34b2511b875910194d928c5..dc38357ca4ea3552ab1780e8c12ee6f9b95ca8e1 100644 --- a/htdocs/install/repair.php +++ b/htdocs/install/repair.php @@ -313,7 +313,7 @@ if (GETPOST('purge')) print '<tr><td colspan="2">Clean orphelins files into files '.$upload_dir.'</td></tr>'; - $filearray=dol_dir_list($upload_dir,"files",1,'',array('^SPECIMEN\.pdf$','^\.','\.meta$','^temp$','^payments$','^CVS$','^thumbs$'),'',SORT_DESC,1); + $filearray=dol_dir_list($upload_dir,"files",1,'',array('^SPECIMEN\.pdf$','^\.','(\.meta|_preview\.png)$','^temp$','^payments$','^CVS$','^thumbs$'),'',SORT_DESC,1); // To show ref or specific information according to view to show (defined by $module) if ($modulepart == 'invoice') diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 1176dd01022032ebded5cb6cc956f979b908cba4..4ee0ecd8dc93dda3e4264a9bda7a8a1e1d2e647d 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1282,6 +1282,8 @@ YouMayFindPerfAdviceHere=You will find on this page some checks or advices relat NotInstalled=Not installed, so your server is not slow down by this. ApplicativeCache=Applicative cache MemcachedNotAvailable=No applicative cache found. You can enhance performance by installing a cache server Memcached and a module able to use this cache server.<br>More information here <a href="http://wiki.dolibarr.org/index.php/Module_MemCached_EN">http://wiki.dolibarr.org/index.php/Module_MemCached_EN</a>.<br>Note that a lot of web hosting provider does not provide such cache server. +MemcachedModuleAvailableButNotSetup=Module memcached for applicative cache found but setup of module is not complete. +MemcachedAvailableAndSetup=Module memcached dedicated to use memcached server is enabled. OPCodeCache=OPCode cache NoOPCodeCacheFound=No OPCode cache found. May be you use another OPCode cache than XCache or eAccelerator (good), may be you don't have OPCode cache (very bad). HTTPCacheStaticResources=HTTP cache for static resources (css, img, javascript) diff --git a/htdocs/product/document.php b/htdocs/product/document.php index 3137f31b7936651199df91e251072139e3a7056a..0f88d80d34b3c62fea4b85ec6655e9997450ce61 100644 --- a/htdocs/product/document.php +++ b/htdocs/product/document.php @@ -104,7 +104,7 @@ if ($object->id) // Construit liste des fichiers - $filearray=dol_dir_list($upload_dir,"files",0,'','\.meta$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1); + $filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1); $totalsize=0; foreach($filearray as $key => $file) { diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php index 277b241f25987f48134be8a339c0a4cb4df3984d..7196387b0679e92afd618e4c4451478a0e796ea1 100644 --- a/htdocs/projet/class/project.class.php +++ b/htdocs/projet/class/project.class.php @@ -1082,7 +1082,7 @@ class Project extends CommonObject if (dol_mkdir($clone_project_dir) >= 0) { - $filearray=dol_dir_list($ori_project_dir,"files",0,'','\.meta$','',SORT_ASC,1); + $filearray=dol_dir_list($ori_project_dir,"files",0,'','(\.meta|_preview\.png)$','',SORT_ASC,1); foreach($filearray as $key => $file) { $rescopy = dol_copy($ori_project_dir . '/' . $file['name'], $clone_project_dir . '/' . $file['name'],0,1); diff --git a/htdocs/projet/class/task.class.php b/htdocs/projet/class/task.class.php index 214c64b94f9bdddf08d083b5e7ccfef31d746dae..3345ce84b21ffe1fbb7cd8277df5ccf220b35344 100644 --- a/htdocs/projet/class/task.class.php +++ b/htdocs/projet/class/task.class.php @@ -1160,7 +1160,7 @@ class Task extends CommonObject $clone_task_dir = $conf->projet->dir_output . "/" . dol_sanitizeFileName($clone_project_ref). "/" . dol_sanitizeFileName($clone_task_ref); $ori_task_dir = $conf->projet->dir_output . "/" . dol_sanitizeFileName($ori_project_ref). "/" . dol_sanitizeFileName($fromid); - $filearray=dol_dir_list($ori_task_dir,"files",0,'','\.meta$','',SORT_ASC,1); + $filearray=dol_dir_list($ori_task_dir,"files",0,'','(\.meta|_preview\.png)$','',SORT_ASC,1); foreach($filearray as $key => $file) { if (!file_exists($clone_task_dir)) diff --git a/htdocs/projet/document.php b/htdocs/projet/document.php index 8d545bf1e6aa6752c75b992d175aa3484974fea0..721689bf5b0acd663e933002853966fb53e9c975 100644 --- a/htdocs/projet/document.php +++ b/htdocs/projet/document.php @@ -97,7 +97,7 @@ if ($object->id > 0) dol_fiche_head($head, 'document', $langs->trans("Project"), 0, ($object->public?'projectpub':'project')); // Files list constructor - $filearray=dol_dir_list($upload_dir,"files",0,'','\.meta$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1); + $filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1); $totalsize=0; foreach($filearray as $key => $file) { diff --git a/htdocs/projet/tasks/document.php b/htdocs/projet/tasks/document.php index 0b876d0490a328efdf6cb840f8f0be066c0bf4f0..84dd161484f964595e121da84d0b95653ccd8d30 100644 --- a/htdocs/projet/tasks/document.php +++ b/htdocs/projet/tasks/document.php @@ -180,7 +180,7 @@ if ($object->id > 0) $linkback=GETPOST('withproject')?'<a href="'.DOL_URL_ROOT.'/projet/tasks.php?id='.$projectstatic->id.'">'.$langs->trans("BackToList").'</a>':''; // Files list constructor - $filearray=dol_dir_list($upload_dir,"files",0,'','\.meta$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1); + $filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1); $totalsize=0; foreach($filearray as $key => $file) { diff --git a/htdocs/societe/document.php b/htdocs/societe/document.php index 1da45c36c8f755a9dca87232a795463532d8dee2..e1b4f9cd504a1420fe12beb0d226c5cce0249319 100644 --- a/htdocs/societe/document.php +++ b/htdocs/societe/document.php @@ -99,7 +99,7 @@ if ($object->id) // Construit liste des fichiers - $filearray=dol_dir_list($upload_dir,"files",0,'','\.meta$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1); + $filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1); $totalsize=0; foreach($filearray as $key => $file) {