예제 #1
0
 /**
  * Function for preparing the data for insertion in an SQL query
  * (The service handles insertion)
  *
  * @param array $post Data from submit_post
  * @param array $pre_create_data Data from pre_create_insert_array()
  *
  * @return array Array of data ready to be inserted into the database
  */
 public function create_insert_array($post, $pre_create_data = array())
 {
     $this->set_data('reporter_id', $this->user->data['user_id']);
     $this->set_data('reason_title', strtoupper($post['reason_title']));
     $this->set_data('reason_description', $post['reason_description']);
     $this->set_data('report_text', $post['report_text']);
     return parent::create_insert_array($post, $pre_create_data);
 }
예제 #2
0
 /**
  * Function for preparing the data for insertion in an SQL query
  * (The service handles insertion)
  *
  * @param array $pm PM Data
  * @param array $pre_create_data Data from pre_create_insert_array()
  *
  * @return array Array of data ready to be inserted into the database
  */
 public function create_insert_array($pm, $pre_create_data = array())
 {
     $this->set_data('closer_id', $pm['closer_id']);
     $data = parent::create_insert_array($pm, $pre_create_data);
     $this->notification_time = $data['notification_time'] = time();
     return $data;
 }