/** Delete an organisation */ public function deleteAction() { if ($this->_getParam('id', false)) { if ($this->_request->isPost()) { $id = (int) $this->_request->getPost('id'); $del = $this->_request->getPost('del'); if ($del == 'Yes' && $id > 0) { $organisations = new Organisations(); $where = 'id = ' . $id; $organisations->delete($where); } $this->_flashMessenger->addMessage('Record deleted!'); $this->_redirect(self::REDIRECT); } else { $id = (int) $this->_request->getParam('id'); if ($id > 0) { $this->view->organisation = $this->_organisations->fetchRow('id=' . $id); } } } else { throw new Pas_Exception_Param($this->_missingParameter); } }