public function delete() { if (empty($this->id)) { return; } db_begin(); $this->detach(); // Don't use EmbeddedImage::delete_embedded_images() - it deletes by // the fileid. We need to delete by the resourceid. delete_records('artefact_file_embedded', 'resourceid', $this->id); delete_records('artefact_annotation_feedback', 'artefact', $this->id); parent::delete(); db_commit(); }
/** * This function extends ArtefactType::delete() by deleting embedded images */ public function delete() { if (empty($this->id)) { return; } db_begin(); // Delete embedded images in the note require_once 'embeddedimage.php'; EmbeddedImage::delete_embedded_images('textbox', $this->id); // Delete the artefact and all children. parent::delete(); db_commit(); }
public function delete() { if (empty($this->id)) { return; } db_begin(); $this->detach(); delete_records('artefact_comment_comment', 'artefact', $this->id); parent::delete(); db_commit(); }
public function delete() { if (empty($this->id)) { return; } try { delete_records('artefact_attachment', 'attachment', $this->id); } catch (Exception $e) { } delete_records('artefact_file_files', 'artefact', $this->id); parent::delete(); }
/** * This function extends ArtefactType::delete() by also deleting anything * that's in blogpost. */ public function delete() { if (empty($this->id)) { return; } require_once 'embeddedimage.php'; db_begin(); $this->detach(); // Detach all file attachments delete_records('artefact_blog_blogpost', 'blogpost', $this->id); EmbeddedImage::delete_embedded_images('blogpost', $this->id); parent::delete(); db_commit(); }
/** * This function extends ArtefactType::delete() by also deleting anything * that's in blogpost. */ public function delete() { if (empty($this->id)) { return; } db_begin(); $this->detach(); // Detach all file attachments delete_records('artefact_blog_blogpost', 'blogpost', $this->id); parent::delete(); db_commit(); }
/** * This function extends ArtefactType::delete() by also deleting anything * that's in fact. */ public function delete() { if (empty($this->id)) { return; } db_begin(); delete_records('artefact_milestones_fact', 'artefact', $this->id); parent::delete(); db_commit(); }