예제 #1
0
 public function delete()
 {
     if (!$this->CheckParams($this->_templateobject->idField)) {
         sendBack();
     }
     parent::delete($this->modeltype);
     sendTo($this->name, 'index', $this->_modules);
 }
예제 #2
0
 public function delete()
 {
     $flash = Flash::Instance();
     $report = $this->_uses[$this->modeltype];
     $report->load($this->_data['id']);
     if ($report->owner === EGS_USERNAME) {
         if (parent::delete($this->modeltype)) {
             sendTo($this->name, 'index', $this->_modules, null);
         } else {
             sendTo($this->name, 'view', $this->_modules, array('id' => $this->_data['id']));
         }
     } else {
         $flash->addError("You can only delete reports you own");
         sendTo($this->name, 'view', $this->_modules, array('id' => $this->_data['id']));
     }
 }
예제 #3
0
 public function delete()
 {
     $flash = Flash::Instance();
     parent::delete('CSFailureCode');
     sendTo($this->name, 'index', array($this->_modules));
 }