コード例 #1
0
 public function deleteAction()
 {
     if ($app_id = $this->getRequest()->getParam('app_id')) {
         try {
             $application = new Application_Model_Application();
             $application->find($app_id);
             if (!$application->getId()) {
                 throw new Exception($this->_("This application does not exist"));
             }
             $application->delete();
             $html = array('success' => 1, 'app_id' => $app_id);
         } catch (Exception $e) {
             $html = array('error' => 1, 'message' => $e->getMessage());
         }
         $this->_sendHtml($html);
     }
 }