Skip to content

Commit 13930af

Browse files
committed
47447: Repository: Deleting folder with disabled Trash results in Missing Object References
1 parent b2f74a6 commit 13930af

2 files changed

Lines changed: 11 additions & 24 deletions

File tree

components/ILIAS/Repository/Deletion/Deletion.php

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -118,23 +118,16 @@ public function removeObjectsFromSystemByRefIds(
118118
"old_parent_ref_id" => $node["parent"]
119119
];
120120

121-
// this is due to bug #1860 (even if this will not completely fix it)
122-
// and the fact, that media pool folders may find their way into
123-
// the recovery folder (what results in broken pools, if the are deleted)
124-
// Alex, 2006-07-21
125-
if (!$direct_from_tree || $node_obj->getType() !== "fold") {
126-
try {
127-
$node_obj->delete();
128-
} catch (\Exception $e) {
129-
$this->event->failedRemoval(
130-
$node_obj->getId(),
131-
$node_obj->getRefId(),
132-
$node_obj->getType(),
133-
$node_obj->getTitle(),
134-
$e->getMessage()
135-
);
136-
}
137-
121+
try {
122+
$node_obj->delete();
123+
} catch (\Exception $e) {
124+
$this->event->failedRemoval(
125+
$node_obj->getId(),
126+
$node_obj->getRefId(),
127+
$node_obj->getType(),
128+
$node_obj->getTitle(),
129+
$e->getMessage()
130+
);
138131
}
139132
}
140133

components/ILIAS/Repository/Trash/class.ilRepUtil.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -142,13 +142,7 @@ public static function removeObjectsFromSystem(
142142
"old_parent_ref_id" => $node["parent"]
143143
];
144144

145-
// this is due to bug #1860 (even if this will not completely fix it)
146-
// and the fact, that media pool folders may find their way into
147-
// the recovery folder (what results in broken pools, if the are deleted)
148-
// Alex, 2006-07-21
149-
if (!$a_from_recovery_folder || $node_obj->getType() !== "fold") {
150-
$node_obj->delete();
151-
}
145+
$node_obj->delete();
152146
}
153147

154148
// Use the saved tree object here (negative tree_id)

0 commit comments

Comments
 (0)