Beispiel #1
0
 /**
  * deleteAction() - usuwanie filtra (ajaxem)
  *
  */
 public function deleteAction()
 {
     $request = $this->getRequest();
     $id = $request->getParam('id');
     $id = $this->_helper->IdConvert->hexToStr($id);
     $filtr = new Logic_Filter();
     try {
         $filtr->deleteFilter($id);
         $this->_helper->messenger("success", 'Filter was successfully removed.');
         if ($request->isXmlHttpRequest()) {
             $this->view->flash_messages = $this->view->messenger(array('class' => array('roundedCornersBl', 'roundedCornersBr', 'borderBlack')), true);
             $this->view->error = 0;
             return;
         } else {
             $this->_helper->redirector('index');
         }
     } catch (Logic_Contact_Exception $e) {
         $this->view->error = 1;
         $this->view->flash_messages = $this->view->messenger(array('class' => array('roundedCornersBl', 'roundedCornersBr', 'borderBlack')), true);
         $this->_helper->messenger('error', MSG_ERROR, $e);
     }
 }