Exemplo n.º 1
0
 /**
  * Process delete
  *
  * @return array errors
  */
 protected function process_delete()
 {
     if (confirm_box(true)) {
         $this->survey->delete($this->topic_id);
         redirect($this->base_url);
     } else {
         $s_hidden_fields = build_hidden_fields(array('t' => $this->topic_id, $this->action_name => $this->request->variable($this->action_name, '')));
         confirm_box(false, $this->user->lang['SURVEY_DELETE_ALL_CONFIRM'], $s_hidden_fields);
     }
     return array();
 }
Exemplo n.º 2
0
 /**
  * Delete the survey which belongs to the topic by deleting all parts.
  *
  * @param object $event The event object
  * @return null
  * @access public
  */
 public function delete_topic($event)
 {
     $this->survey->delete($event['topic_ids'], true);
 }