Permalink
Browse files

Fix: Add warning to ask refresh.

  • Loading branch information...
eldy committed Oct 3, 2012
1 parent 1f2b05f commit 59a33db53dfac48125ddebc5a27376391db97261
@@ -247,11 +247,17 @@
{
$relativepath=$ecmdir->getRelativePath();
$upload_dir = $conf->ecm->dir_output.'/'.$relativepath;
+
$filearray=dol_dir_list($upload_dir,"files",0,'',array('^\.','\.meta$','^temp$','^CVS$'),$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
if ($section) $param.='&section='.$section;
$textifempty=($section?$langs->trans("NoFileFound"):($showonrightsize=='featurenotyetavailable'?$langs->trans("FeatureNotYetAvailable"):$langs->trans("ECMSelectASection")));
-
+ // If $section defined with value 0
+ if ($section == '0')
+ {
+ $filearray=array();
+ $textifempty='<br><div align="center"><font class="warning">'.$langs->trans("DirNotSynchronizedSyncFirst").'</font></div><br>';
+ }
$formfile->list_of_documents($filearray,'','ecm',$param,1,$relativepath,$user->rights->ecm->upload,1,$textifempty,$maxlengthname,'',$url);
}
@@ -56,6 +56,7 @@ function dol_dir_list($path, $types="all", $recursive=0, $filter="", $excludefil
global $object;
dol_syslog("files.lib.php::dol_dir_list path=".$path." types=".$types." recursive=".$recursive." filter=".$filter." excludefilter=".json_encode($excludefilter));
+ //print 'xxx'."files.lib.php::dol_dir_list path=".$path." types=".$types." recursive=".$recursive." filter=".$filter." excludefilter=".json_encode($excludefilter);
$loaddate=($mode==1||$mode==2)?true:false;
$loadsize=($mode==1||$mode==3)?true:false;
@@ -50,4 +50,6 @@ ConfirmDeleteSection=Can you confirm you want to delete the directory <b>%s</b>
ECMDirectoryForFiles=Relative directory for files
CannotRemoveDirectoryContainsFiles=Removed not possible because it contains some files
ECMFileManager=File manager
-ECMSelectASection=Select a directory on left tree...
+ECMSelectASection=Select a directory on left tree...
+DirNotSynchronizedSyncFirst=This directory seems to be created or modified outside ECM module. You must click on "Refresh" button first to synchronize disk and database to get content of this directory.
+
@@ -50,4 +50,5 @@ ConfirmDeleteSection=Confirmez-vous la suppression du répertoire <b>%s</b> ?
ECMDirectoryForFiles=Répertoire relatif pour les fichiers
CannotRemoveDirectoryContainsFiles=Suppression impossible car des fichiers sont présents
ECMFileManager=Gestionnaire fichier
-ECMSelectASection=Sélectionner un répertoire sur l'arbre de gauche...
+ECMSelectASection=Sélectionner un répertoire sur l'arbre de gauche...
+DirNotSynchronizedSyncFirst=Ce répertoire a été crée ou modifié en dehors du module GED. Cliquer sur le bouton "Rafraichir" afin de resyncronizer les informations sur disque et la base pour voir le contenu de ce répertoire.

0 comments on commit 59a33db

Please sign in to comment.