function deleteNoteAction() { @($id = DevblocksPlatform::importGPC($_REQUEST['id'], 'integer', 0)); $note = DAO_MessageNote::get($id); $message_id = $note->message_id; DAO_MessageNote::delete($id); $this->_renderNotes($message_id); }
private function _deleteIdAction($path) { $in_id = array_shift($path); if (empty($in_id)) { $this->_error("ID was not provided."); } if (null == ($note = DAO_MessageNote::get($in_id))) { $this->_error("ID is not valid."); } DAO_MessageNote::delete($note->id); $out_xml = new SimpleXMLElement('<success></success>'); $this->_render($out_xml->asXML()); }