Ejemplo n.º 1
0
 /**
  * Execute the action
  */
 public function execute()
 {
     $this->id = $this->getParameter('id', 'int');
     // does the item exist
     if ($this->id !== null && BackendMailengineModel::existsGroup($this->id)) {
         parent::execute();
         $this->record = (array) BackendMailengineModel::getGroup($this->id);
         BackendMailengineModel::deleteGroup($this->id);
         BackendMailengineModel::deleteUserFromGroup($this->id);
         BackendModel::triggerEvent($this->getModule(), 'after_delete_group', array('id' => $this->id));
         $this->redirect(BackendModel::createURLForAction('groups') . '&report=deleted&var=' . urlencode($this->record['title']));
     } else {
         $this->redirect(BackendModel::createURLForAction('groups') . '&error=non-existing');
     }
 }