';
- // Construit liste des fichiers
+ // Build file list
$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/tva/document.php b/htdocs/compta/tva/document.php
index b83cad80bdd29..790058c20a9e9 100644
--- a/htdocs/compta/tva/document.php
+++ b/htdocs/compta/tva/document.php
@@ -122,7 +122,7 @@
print '
';
print '
';
- // Construit liste des fichiers
+ // Build file list
$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/contact/document.php b/htdocs/contact/document.php
index 1a60ddaaccb74..07795da30d055 100644
--- a/htdocs/contact/document.php
+++ b/htdocs/contact/document.php
@@ -97,7 +97,7 @@
dol_fiche_head($head, 'documents', $title, -1, 'contact');
- // Construit liste des fichiers
+ // Build file list
$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 20a70830952f4..4b7a9b4faf515 100644
--- a/htdocs/contrat/document.php
+++ b/htdocs/contrat/document.php
@@ -103,7 +103,7 @@
dol_fiche_head($head, 'documents', $langs->trans("Contract"), -1, 'contract');
- // Construit liste des fichiers
+ // Build file list
$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/don/document.php b/htdocs/don/document.php
index 020272d5baeec..7459bf824534d 100644
--- a/htdocs/don/document.php
+++ b/htdocs/don/document.php
@@ -107,7 +107,7 @@
dol_fiche_head($head, 'documents', $langs->trans("Donation"), -1, 'generic');
- // Construit liste des fichiers
+ // Build file list
$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/expedition/document.php b/htdocs/expedition/document.php
index 5d76a5f491899..2be84cf26b789 100644
--- a/htdocs/expedition/document.php
+++ b/htdocs/expedition/document.php
@@ -96,7 +96,7 @@
dol_fiche_head($head, 'documents', $langs->trans("Shipment"), -1, 'sending');
- // Construit liste des fichiers
+ // Build file list
$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/expensereport/document.php b/htdocs/expensereport/document.php
index 0ac498ca77504..16db531102845 100644
--- a/htdocs/expensereport/document.php
+++ b/htdocs/expensereport/document.php
@@ -103,7 +103,7 @@
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
- // Construit liste des fichiers
+ // Build file list
$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/fichinter/document.php b/htdocs/fichinter/document.php
index 6e84f457eb196..d52ed81da4809 100644
--- a/htdocs/fichinter/document.php
+++ b/htdocs/fichinter/document.php
@@ -94,7 +94,7 @@
dol_fiche_head($head, 'documents', $langs->trans("InterventionCard"), -1, 'intervention');
- // Construit liste des fichiers
+ // Build file list
$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 59358279e3181..19a084cde8617 100644
--- a/htdocs/fourn/commande/document.php
+++ b/htdocs/fourn/commande/document.php
@@ -107,7 +107,7 @@
dol_fiche_head($head, 'documents', $langs->trans('SupplierOrder'), -1, 'order');
- // Construit liste des fichiers
+ // Build file list
$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 1f0c9f8673954..9c111ebe77398 100644
--- a/htdocs/fourn/facture/document.php
+++ b/htdocs/fourn/facture/document.php
@@ -145,7 +145,7 @@
print '
';
print '
';
- // Construit liste des fichiers
+ // Build file list
$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/holiday/document.php b/htdocs/holiday/document.php
index 9d5618f3a2aff..cec638a769be3 100644
--- a/htdocs/holiday/document.php
+++ b/htdocs/holiday/document.php
@@ -99,7 +99,7 @@
dol_fiche_head($head, 'documents', $langs->trans("CPTitreMenu"), -1,'holiday');
- // Construit liste des fichiers
+ // Build file list
$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/loan/document.php b/htdocs/loan/document.php
index f9d17c563fa21..b90144ea8f880 100644
--- a/htdocs/loan/document.php
+++ b/htdocs/loan/document.php
@@ -134,7 +134,7 @@
print '
';
- // Construit liste des fichiers
+ // Build file list
$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/modulebuilder/template/myobject_document.php b/htdocs/modulebuilder/template/myobject_document.php
index f005fbf835487..9dd021326b065 100644
--- a/htdocs/modulebuilder/template/myobject_document.php
+++ b/htdocs/modulebuilder/template/myobject_document.php
@@ -113,7 +113,7 @@
dol_fiche_head($head, 'document', $langs->trans("MyObject"), -1, 'myobject@mymodule');
- // Construit liste des fichiers
+ // Build file list
$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/product/document.php b/htdocs/product/document.php
index 83d59a26a909d..4f6ec9cf40337 100644
--- a/htdocs/product/document.php
+++ b/htdocs/product/document.php
@@ -197,7 +197,7 @@
print $hookmanager->resPrint;
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
- // Construit liste des fichiers
+ // Build file list
$filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview.*\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
if (! empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) // For backward compatiblity, we scan also old dirs
diff --git a/htdocs/product/stock/productlot_document.php b/htdocs/product/stock/productlot_document.php
index f79a0d74d98e6..6a3925c4a5582 100644
--- a/htdocs/product/stock/productlot_document.php
+++ b/htdocs/product/stock/productlot_document.php
@@ -122,7 +122,7 @@
print $hookmanager->resPrint;
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
- // Construit liste des fichiers
+ // Build file list
$filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview.*\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
$totalsize=0;
diff --git a/htdocs/resource/document.php b/htdocs/resource/document.php
index edaf52baba362..eaee074189bee 100644
--- a/htdocs/resource/document.php
+++ b/htdocs/resource/document.php
@@ -91,7 +91,7 @@
dol_fiche_head($head, 'documents', $langs->trans("ResourceSingular"), -1, 'resource');
- // Construit liste des fichiers
+ // Build file list
$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 e393fa64a2c1c..edceeb255c171 100644
--- a/htdocs/societe/document.php
+++ b/htdocs/societe/document.php
@@ -105,7 +105,7 @@
dol_fiche_head($head, 'document', $langs->trans("ThirdParty"), -1, 'company');
- // Construit liste des fichiers
+ // Build file list
$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/supplier_proposal/document.php b/htdocs/supplier_proposal/document.php
index 12de448829ebd..99125e25b2695 100644
--- a/htdocs/supplier_proposal/document.php
+++ b/htdocs/supplier_proposal/document.php
@@ -87,7 +87,7 @@
$head = supplier_proposal_prepare_head($object);
dol_fiche_head($head, 'document', $langs->trans('CommRequest'), -1, 'supplier_proposal');
- // Construit liste des fichiers
+ // Build file list
$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/ticket/document.php b/htdocs/ticket/document.php
index e31cd98912d6d..7189cc1321cac 100644
--- a/htdocs/ticket/document.php
+++ b/htdocs/ticket/document.php
@@ -138,7 +138,7 @@
dol_fiche_end();
- // Construit liste des fichiers
+ // Build file list
$filearray = dol_dir_list($upload_dir, "files", 0, '', '\.meta$', $sortfield, (strtolower($sortorder) == 'desc' ? SORT_DESC : SORT_ASC), 1);
$totalsize = 0;
foreach ($filearray as $key => $file) {
diff --git a/htdocs/user/document.php b/htdocs/user/document.php
index a917a972ddc86..8f1d634431fea 100644
--- a/htdocs/user/document.php
+++ b/htdocs/user/document.php
@@ -141,7 +141,7 @@
print '
';
print '
';
- // Construit liste des fichiers
+ // Build file list
$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)