dol_dir_list fast mode
This commit is contained in:
parent
71ed1ec602
commit
8574f36e35
@ -93,7 +93,7 @@ if ($id || $ref) {
|
||||
$object->fetch($id, $productid, $batch);
|
||||
$object->ref = $object->batch; // Old system for document management ( it uses $object->ref)
|
||||
$upload_dir = $conf->productbatch->multidir_output[$object->entity].'/'.get_exdir(0, 0, 0, 1, $object, $modulepart);
|
||||
$filearray = dol_dir_list($upload_dir, "files", 0, '', '(\.meta|_preview.*\.png)$', $sortfield, (strtolower($sortorder) == 'desc' ?SORT_DESC:SORT_ASC), 1);
|
||||
$filearray = dol_dir_list($upload_dir, "files");
|
||||
if (empty($filearray)) {
|
||||
// If no files linked yet, use new system on lot id. (Batch is not unique and can be same on different product)
|
||||
$object->fetch($id, $productid, $batch);
|
||||
|
||||
@ -87,7 +87,7 @@ if ($id || $ref) {
|
||||
|
||||
if (!empty($conf->productbatch->enabled)) {
|
||||
$upload_dir = $conf->productbatch->multidir_output[$object->entity].'/'.get_exdir(0, 0, 0, 1, $object, $modulepart);
|
||||
$filearray = dol_dir_list($upload_dir, "files", 0, '', '(\.meta|_preview.*\.png)$', $sortfield, (strtolower($sortorder) == 'desc' ?SORT_DESC:SORT_ASC), 1);
|
||||
$filearray = dol_dir_list($upload_dir, "files");
|
||||
if (empty($filearray)) {
|
||||
// If no files linked yet, use new system on lot id. (Batch is not unique and can be same on different product)
|
||||
$object->fetch($id, $productid, $batch);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user