Commit aa8d1892 authored by Mike Kelly's avatar Mike Kelly Committed by Gerrit Code Review
Browse files

Delete related embedded images on deletion of artefacts

Change-Id: I177f3a2eec67609181337ed4bca01fb7c40d7e8a
Signed-off-by: default avatarMike Kelly <>
parent 36bc9f7d
......@@ -769,6 +769,9 @@ abstract class ArtefactType implements IArtefactType {
execute_sql("UPDATE {usr} SET profileicon = NULL WHERE profileicon IN $idstr");
execute_sql("UPDATE {institution} SET logo = NULL WHERE logo IN $idstr");
// Delete any references to files embedded in textboxes
delete_records_select('artefact_file_embedded', "fileid IN $idstr");
delete_records_select('artefact', "id IN $idstr");
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment