diff --git a/htdocs/core/ajax/ajaxdirpreview.php b/htdocs/core/ajax/ajaxdirpreview.php index 024e62dbf27..1460d87bfba 100644 --- a/htdocs/core/ajax/ajaxdirpreview.php +++ b/htdocs/core/ajax/ajaxdirpreview.php @@ -61,8 +61,8 @@ if (! isset($mode) || $mode != 'noajax') // For ajax call $result=$ecmdir->fetch($section); if (! $result > 0) { - dol_print_error($db,$ecmdir->error); - exit; + //dol_print_error($db,$ecmdir->error); + //exit; } } else // For no ajax call diff --git a/htdocs/core/ajax/ajaxdirtree.php b/htdocs/core/ajax/ajaxdirtree.php index 9de59a527d1..21487924b91 100644 --- a/htdocs/core/ajax/ajaxdirtree.php +++ b/htdocs/core/ajax/ajaxdirtree.php @@ -78,7 +78,7 @@ $userstatic=new User($db); $form=new Form($db); $ecmdirstatic = new EcmDirectory($db); -// Load full tree. We will use it to define nbofsubdir and nboffilesinsubdir +// Load full tree from database. We will use it to define nbofsubdir and nboffilesinsubdir if (empty($sqltree)) $sqltree=$ecmdirstatic->get_full_arbo(0); // Try to find key into $sqltree @@ -93,13 +93,13 @@ foreach($sqltree as $keycursor => $val) } -if( file_exists($fullpathselecteddir) ) +if (file_exists($fullpathselecteddir)) { $files = @scandir($fullpathselecteddir); if ($files) { natcasesort($files); - if( count($files) > 2 ) /* The 2 accounts for . and .. */ + if ( count($files) > 2 ) /* The 2 accounts for . and .. */ { echo "