mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0
This commit is contained in:
commit
39293b79ff
|
|
@ -1450,7 +1450,7 @@ function dol_delete_file($file, $disableglob = 0, $nophperrors = 0, $nohook = 0,
|
|||
}
|
||||
}
|
||||
} else {
|
||||
$ok = false; // to avoid false positive
|
||||
$ok = true; // nothing to delete when glob is on must return ok
|
||||
dol_syslog("No files to delete found", LOG_DEBUG);
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -347,7 +347,7 @@ if ($action == 'updatelines' && $usercancreate) {
|
|||
setEventMessages($error, $errors, 'errors');
|
||||
} else {
|
||||
$db->commit();
|
||||
setEventMessages($langs->trans("ReceptionUpdated"), null);
|
||||
setEventMessages($langs->trans("ShipmentUpdated"), null);
|
||||
|
||||
header("Location: ".DOL_URL_ROOT.'/expedition/dispatch.php?id='.$object->id);
|
||||
exit;
|
||||
|
|
|
|||
|
|
@ -63,6 +63,7 @@ NoProductToShipFoundIntoStock=No product to ship found in warehouse <b>%s</b>. C
|
|||
WeightVolShort=Weight/Vol.
|
||||
ValidateOrderFirstBeforeShipment=You must first validate the order before being able to make shipments.
|
||||
NoLineGoOnTabToAddSome=No line, go on tab "%s" to add
|
||||
ShipmentUpdated=Shipment successfully updated
|
||||
|
||||
# Sending methods
|
||||
# ModelDocument
|
||||
|
|
|
|||
|
|
@ -210,7 +210,7 @@ if ($action == 'remove_file' && $user->hasRight('projet', 'creer')) {
|
|||
$upload_dir = $conf->project->dir_output."/".dol_sanitizeFileName($projectstatic->ref)."/".dol_sanitizeFileName($object->ref);
|
||||
$file = $upload_dir.'/'.dol_sanitizeFileName(GETPOST('file'));
|
||||
|
||||
$ret = dol_delete_file($file);
|
||||
$ret = dol_delete_file($file, 1);
|
||||
if ($ret) {
|
||||
setEventMessages($langs->trans("FileWasRemoved", GETPOST('file')), null, 'mesgs');
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -372,7 +372,7 @@ class FilesLibTest extends PHPUnit\Framework\TestCase
|
|||
// Again to test there is error when deleting a non existing file with option disableglob
|
||||
$result=dol_delete_file($conf->admin->dir_temp.'/file3.csv', 1, 1);
|
||||
print __METHOD__." result=".$result."\n";
|
||||
$this->assertFalse($result, 'delete file that does not exists with disableglo must return ko');
|
||||
$this->assertFalse($result, 'delete file that does not exists with disabling glob must return ko');
|
||||
|
||||
// Again to test there is no error when deleting a non existing file without option disableglob
|
||||
$result=dol_delete_file($conf->admin->dir_temp.'/file3csv', 0, 1);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user