mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-05 09:08:09 +01:00
fix common delete (#36167)
This commit is contained in:
@@ -11054,6 +11054,7 @@ abstract class CommonObject
|
||||
if (!$error) {
|
||||
$dir = getMultidirOutput($this)."/".dol_sanitizeFileName($this->ref);
|
||||
// For remove dir
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
|
||||
if (dol_is_dir($dir)) {
|
||||
if (!dol_delete_dir_recursive($dir)) {
|
||||
$this->errors[] = 'ErrorFailToDeleteDir';
|
||||
|
||||
@@ -158,6 +158,9 @@ function getMultidirOutput($object, $module = '', $forobject = 0, $mode = 'outpu
|
||||
} elseif ($module == 'recruitmentcandidature') {
|
||||
$module = 'recruitment';
|
||||
$subdirectory = '/recruitmentcandidature';
|
||||
} elseif ($module == 'knowledgerecord') {
|
||||
$module = 'knowledgemanagement';
|
||||
$subdirectory = '/knowledgerecord';
|
||||
}
|
||||
|
||||
// Get the relative path of directory
|
||||
|
||||
Reference in New Issue
Block a user