diff --git a/htdocs/adherents/document.php b/htdocs/adherents/document.php
index aaf62c657ce..aecf23dbf7b 100644
--- a/htdocs/adherents/document.php
+++ b/htdocs/adherents/document.php
@@ -134,7 +134,7 @@ if ($id > 0)
// Construit liste des fichiers
- $filearray=dol_dir_list($upload_dir,"files",0,'','\.meta$',$sortfield,(strtolower($sortorder)=='desc'?SORT_ASC:SORT_DESC),3);
+ $filearray=dol_dir_list($upload_dir,"files",0,'','\.meta$',$sortfield,(strtolower($sortorder)=='desc'?SORT_ASC:SORT_DESC),1);
$totalsize=0;
foreach($filearray as $key => $file)
{
diff --git a/htdocs/comm/action/document.php b/htdocs/comm/action/document.php
index 80e976644a4..1712878ea32 100755
--- a/htdocs/comm/action/document.php
+++ b/htdocs/comm/action/document.php
@@ -201,7 +201,7 @@ if ($objectid > 0)
print '
';
// Construit liste des fichiers
- $filearray=dol_dir_list($upload_dir,"files",0,'','\.meta$',$sortfield,(strtolower($sortorder)=='desc'?SORT_ASC:SORT_DESC),3);
+ $filearray=dol_dir_list($upload_dir,"files",0,'','\.meta$',$sortfield,(strtolower($sortorder)=='desc'?SORT_ASC:SORT_DESC),1);
$totalsize=0;
foreach($filearray as $key => $file)
{
diff --git a/htdocs/comm/propal/document.php b/htdocs/comm/propal/document.php
index 25bd527d841..c6de7a48bd2 100644
--- a/htdocs/comm/propal/document.php
+++ b/htdocs/comm/propal/document.php
@@ -143,7 +143,7 @@ if ($id > 0 || ! empty($ref))
// Construit liste des fichiers
- $filearray=dol_dir_list($upload_dir,"files",0,'','\.meta$',$sortfield,(strtolower($sortorder)=='desc'?SORT_ASC:SORT_DESC),3);
+ $filearray=dol_dir_list($upload_dir,"files",0,'','\.meta$',$sortfield,(strtolower($sortorder)=='desc'?SORT_ASC:SORT_DESC),1);
$totalsize=0;
foreach($filearray as $key => $file)
{
diff --git a/htdocs/commande/document.php b/htdocs/commande/document.php
index 1db72e2fff4..fbcbeab04cf 100644
--- a/htdocs/commande/document.php
+++ b/htdocs/commande/document.php
@@ -135,7 +135,7 @@ if ($id > 0 || ! empty($ref))
// Construit liste des fichiers
- $filearray=dol_dir_list($upload_dir,"files",0,'','\.meta$',$sortfield,(strtolower($sortorder)=='desc'?SORT_ASC:SORT_DESC),3);
+ $filearray=dol_dir_list($upload_dir,"files",0,'','\.meta$',$sortfield,(strtolower($sortorder)=='desc'?SORT_ASC:SORT_DESC),1);
$totalsize=0;
foreach($filearray as $key => $file)
{
diff --git a/htdocs/compta/facture/document.php b/htdocs/compta/facture/document.php
index f7716c40b8b..6c0ccede916 100644
--- a/htdocs/compta/facture/document.php
+++ b/htdocs/compta/facture/document.php
@@ -145,7 +145,7 @@ if ($id > 0 || ! empty($ref))
// Construit liste des fichiers
- $filearray=dol_dir_list($upload_dir,"files",0,'','\.meta$',$sortfield,(strtolower($sortorder)=='desc'?SORT_ASC:SORT_DESC),3);
+ $filearray=dol_dir_list($upload_dir,"files",0,'','\.meta$',$sortfield,(strtolower($sortorder)=='desc'?SORT_ASC:SORT_DESC),1);
$totalsize=0;
foreach($filearray as $key => $file)
{
diff --git a/htdocs/contrat/document.php b/htdocs/contrat/document.php
index cb475acad15..d8af6d66261 100644
--- a/htdocs/contrat/document.php
+++ b/htdocs/contrat/document.php
@@ -132,7 +132,7 @@ if ($contrat->id)
// Construit liste des fichiers
- $filearray=dol_dir_list($upload_dir,"files",0,'','\.meta$',$sortfield,(strtolower($sortorder)=='desc'?SORT_ASC:SORT_DESC),3);
+ $filearray=dol_dir_list($upload_dir,"files",0,'','\.meta$',$sortfield,(strtolower($sortorder)=='desc'?SORT_ASC:SORT_DESC),1);
$totalsize=0;
foreach($filearray as $key => $file)
{
diff --git a/htdocs/ecm/docmine.php b/htdocs/ecm/docmine.php
index 6736c954810..ab10615445c 100644
--- a/htdocs/ecm/docmine.php
+++ b/htdocs/ecm/docmine.php
@@ -212,7 +212,7 @@ $form=new Form($db);
// Construit liste des fichiers
-$filearray=dol_dir_list($upload_dir,"files",0,'','\.meta$',$sortfield,(strtolower($sortorder)=='desc'?SORT_ASC:SORT_DESC),3);
+$filearray=dol_dir_list($upload_dir,"files",0,'','\.meta$',$sortfield,(strtolower($sortorder)=='desc'?SORT_ASC:SORT_DESC),1);
$totalsize=0;
foreach($filearray as $key => $file)
{
diff --git a/htdocs/fichinter/document.php b/htdocs/fichinter/document.php
index 2ce6bbdf10d..b4a4b8052c2 100644
--- a/htdocs/fichinter/document.php
+++ b/htdocs/fichinter/document.php
@@ -131,7 +131,7 @@ if ($object->id)
// Construit liste des fichiers
- $filearray=dol_dir_list($upload_dir,"files",0,'','\.meta$',$sortfield,(strtolower($sortorder)=='desc'?SORT_ASC:SORT_DESC),3);
+ $filearray=dol_dir_list($upload_dir,"files",0,'','\.meta$',$sortfield,(strtolower($sortorder)=='desc'?SORT_ASC:SORT_DESC),1);
$totalsize=0;
foreach($filearray as $key => $file)
{
diff --git a/htdocs/fourn/commande/document.php b/htdocs/fourn/commande/document.php
index 6894dc82760..b3352425990 100644
--- a/htdocs/fourn/commande/document.php
+++ b/htdocs/fourn/commande/document.php
@@ -142,7 +142,7 @@ if ($id > 0 || ! empty($ref))
// Construit liste des fichiers
- $filearray=dol_dir_list($upload_dir,"files",0,'','\.meta$',$sortfield,(strtolower($sortorder)=='desc'?SORT_ASC:SORT_DESC),3);
+ $filearray=dol_dir_list($upload_dir,"files",0,'','\.meta$',$sortfield,(strtolower($sortorder)=='desc'?SORT_ASC:SORT_DESC),1);
$totalsize=0;
foreach($filearray as $key => $file)
{
diff --git a/htdocs/fourn/facture/document.php b/htdocs/fourn/facture/document.php
index 53a2ce32755..593ee479db1 100644
--- a/htdocs/fourn/facture/document.php
+++ b/htdocs/fourn/facture/document.php
@@ -137,7 +137,7 @@ if ($facid > 0)
// Construit liste des fichiers
- $filearray=dol_dir_list($upload_dir,"files",0,'','\.meta$',$sortfield,(strtolower($sortorder)=='desc'?SORT_ASC:SORT_DESC),3);
+ $filearray=dol_dir_list($upload_dir,"files",0,'','\.meta$',$sortfield,(strtolower($sortorder)=='desc'?SORT_ASC:SORT_DESC),1);
$totalsize=0;
foreach($filearray as $key => $file)
{
diff --git a/htdocs/product/document.php b/htdocs/product/document.php
index 38aac4c135b..28ac240e83d 100755
--- a/htdocs/product/document.php
+++ b/htdocs/product/document.php
@@ -135,7 +135,7 @@ if ($product->id)
// Construit liste des fichiers
- $filearray=dol_dir_list($upload_dir,"files",0,'','\.meta$',$sortfield,(strtolower($sortorder)=='desc'?SORT_ASC:SORT_DESC),3);
+ $filearray=dol_dir_list($upload_dir,"files",0,'','\.meta$',$sortfield,(strtolower($sortorder)=='desc'?SORT_ASC:SORT_DESC),1);
$totalsize=0;
foreach($filearray as $key => $file)
{
diff --git a/htdocs/projet/document.php b/htdocs/projet/document.php
index 93d57366962..9c51c12828d 100644
--- a/htdocs/projet/document.php
+++ b/htdocs/projet/document.php
@@ -135,7 +135,7 @@ if ($id > 0 || ! empty($ref))
dol_fiche_head($head, 'document', $langs->trans("Project"), 0, ($project->public?'projectpub':'project'));
// Files list constructor
- $filearray=dol_dir_list($upload_dir,"files",0,'','\.meta$',$sortfield,(strtolower($sortorder)=='desc'?SORT_ASC:SORT_DESC),3);
+ $filearray=dol_dir_list($upload_dir,"files",0,'','\.meta$',$sortfield,(strtolower($sortorder)=='desc'?SORT_ASC:SORT_DESC),1);
$totalsize=0;
foreach($filearray as $key => $file)
{
diff --git a/htdocs/projet/tasks/document.php b/htdocs/projet/tasks/document.php
index 71a040aa46d..e597529d2ac 100644
--- a/htdocs/projet/tasks/document.php
+++ b/htdocs/projet/tasks/document.php
@@ -145,7 +145,7 @@ if ($id > 0 || ! empty($ref))
dol_fiche_head($head, 'document', $langs->trans("Task"), 0, 'projecttask');
// Files list constructor
- $filearray=dol_dir_list($upload_dir,"files",0,'','\.meta$',$sortfield,(strtolower($sortorder)=='desc'?SORT_ASC:SORT_DESC),3);
+ $filearray=dol_dir_list($upload_dir,"files",0,'','\.meta$',$sortfield,(strtolower($sortorder)=='desc'?SORT_ASC:SORT_DESC),1);
$totalsize=0;
foreach($filearray as $key => $file)
{
diff --git a/htdocs/societe/document.php b/htdocs/societe/document.php
index 6ef3aa61869..edf4c5b21b8 100644
--- a/htdocs/societe/document.php
+++ b/htdocs/societe/document.php
@@ -130,7 +130,7 @@ if ($socid > 0)
// Construit liste des fichiers
- $filearray=dol_dir_list($upload_dir,"files",0,'','\.meta$',$sortfield,(strtolower($sortorder)=='desc'?SORT_ASC:SORT_DESC),3);
+ $filearray=dol_dir_list($upload_dir,"files",0,'','\.meta$',$sortfield,(strtolower($sortorder)=='desc'?SORT_ASC:SORT_DESC),1);
$totalsize=0;
foreach($filearray as $key => $file)
{
@@ -143,7 +143,7 @@ if ($socid > 0)
// Ref
print '| '.$langs->trans("Name").' | ';
print '';
- print $form->showrefnav($societe,'socid','',1,'rowid','nom');
+ print $form->showrefnav($societe,'socid','',($user->societe_id?0:1),'rowid','nom');
print ' |
';
// Prefix