/** Action for deleting findspot * @access public * @return void * @throws Pas_Exception_Param */ public function deleteAction() { if ($this->getParam('id', false)) { $type = $this->getParam('recordtype'); $recordID = $this->getParam('recordID'); if ($this->_request->isPost()) { $id = (int) $this->_request->getPost('id'); $this->view->recordID = (int) $this->_request->getPost('recordID'); $this->view->type = $type; $this->setController($this->_request->getPost('type')); $this->setRedirect($this->getController()); $del = $this->_request->getPost('del'); if ($del == 'Yes' && $id > 0) { $where = 'id = ' . $id; $this->_findspots->delete($where); $this->_helper->solrUpdater->update('objects', $recordID, $this->_request->getPost('type')); $this->getFlash()->addMessage('Findspot deleted.'); } $this->redirect($this->getRedirect() . 'record/id/' . $recordID); } else { $id = (int) $this->_request->getParam('id'); $type = $this->getParam('recordtype'); if ($id > 0) { $this->view->findspot = $this->_findspots->getFindtoFindspotDelete($this->getParam('id'), $this->getController()); } } } else { throw new Pas_Exception_Param($this->_missingParameter, 404); } }
/** Action for deleting findspot * */ public function deleteAction() { if ($this->_getParam('id', false)) { if ($this->_request->isPost()) { $id = (int) $this->_request->getPost('id'); $findID = (int) $this->_request->getPost('findID'); $del = $this->_request->getPost('del'); if ($del == 'Yes' && $id > 0) { $this->_findspots = new Findspots(); $where = 'id = ' . $id; $this->_helper->solrUpdater->update('beowulf', $findID); $this->_flashMessenger->addMessage('Findspot deleted.'); } $this->_redirect(self::REDIRECT . 'record/id/' . $findID); } else { $id = (int) $this->_request->getParam('id'); if ($id > 0) { $findspots = new Findspots(); $this->view->findspot = $findspots->getFindtoFindspotDelete($this->_getParam('id')); } } } else { throw new Pas_Exception_Param($this->_missingParameter, 500); } }