public function delete() { // Hooks titania::$hook->call_hook_ref(array(__CLASS__, __FUNCTION__), $this); // Delete the queue item $queue = $this->get_queue(); if ($queue !== false) { $queue->delete(); } // Delete the attachment $attachment = new titania_attachment(TITANIA_CONTRIB); $attachment->attachment_id = $this->attachment_id; $attachment->load(); $attachment->delete(); // Delete translations $translations = new titania_attachment(TITANIA_TRANSLATION, $this->revision_id); $attachment->delete_all(); // Self-destruct parent::delete(); }