Example #1
0
 public function create_insert_array($data, $pre_create_data = array())
 {
     $this->set_data('request_id', $data['request_id']);
     $this->set_data('sender_id', $data['sender_id']);
     $this->set_data('sender_username', $data['sender_username']);
     $this->set_data('user_id', $data['user_id']);
     return parent::create_insert_array($data, $pre_create_data);
 }
 /**
  * Function for preparing the data for insertion in an SQL query
  * (The service handles insertion)
  *
  * @param array $data The data for the updated rules
  * @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($data, $pre_create_data = array())
 {
     $this->set_data('album_name', $data['album_name']);
     $this->set_data('album_url', $data['album_url']);
     $this->set_data('uploader', $data['uploader']);
     return parent::create_insert_array($data, $pre_create_data);
 }
Example #3
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('poster_id', $post['poster_id']);
     $this->set_data('topic_title', $post['topic_title']);
     $this->set_data('post_subject', $post['post_subject']);
     $this->set_data('post_username', $post['poster_id'] == ANONYMOUS ? $post['post_username'] : '');
     $this->set_data('forum_id', $post['forum_id']);
     $this->set_data('forum_name', $post['forum_name']);
     $this->notification_time = $post['post_time'];
     // Topics can be "read" before they are public (while awaiting approval).
     // Make sure that if the user has read the topic, it's marked as read in the notification
     if ($this->inherit_read_status && isset($pre_create_data[$this->user_id]) && $pre_create_data[$this->user_id] >= $this->notification_time) {
         $this->notification_read = true;
     }
     return parent::create_insert_array($post, $pre_create_data);
 }
Example #4
0
 /**
  * Function for preparing the data for insertion in an SQL query
  * (The service handles insertion)
  *
  * @param array $data The data for the blog subscription
  *					 'mode' can be:
  *					 -- 'comment'	=> new comment
  *					 -- 'blog'		=> new blog
  * @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($data, $pre_create_data = [])
 {
     $this->set_data('blog_title', $data['blog_title']);
     $this->set_data('poster_id', $data['poster_id']);
     $this->set_data('blog_id', $data['blog_id']);
     $this->set_data('mode', $data['mode']);
     return parent::create_insert_array($data, $pre_create_data);
 }
 /**
  * Function for preparing the data for insertion in an SQL query
  * (The service handles insertion)
  *
  * @param array $thanks_data Data from insert_thanks
  * @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($thanks_data, $pre_create_data = array())
 {
     $thankers = isset($thanks_data['thankers']) ? $thanks_data['thankers'] : array();
     $thankers = array_merge(array(array('user_id' => $thanks_data['user_id'])), $thankers);
     $this->set_data('thankers', $thankers);
     $this->set_data('post_id', $thanks_data['post_id']);
     $this->set_data('lang_act', $thanks_data['lang_act']);
     $this->set_data('post_subject', $thanks_data['post_subject']);
     $this->set_data('poster_id', $thanks_data['poster_id']);
     return parent::create_insert_array($thanks_data, $pre_create_data);
 }
Example #6
0
 /**
  * Function for preparing the data for insertion in an SQL query
  * (The service handles insertion)
  *
  * @param array $data The data for the poll
  * @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($data, $pre_create_data = array())
 {
     $this->set_data('poster_id', (int) $data['topic_poster']);
     $this->set_data('forum_id', (int) $data['forum_id']);
     $this->set_data('topic_id', (int) $data['topic_id']);
     $this->set_data('topic_title', $data['topic_title']);
     $this->set_data('poll_title', $data['poll_title']);
     $this->set_data('poll_end', (int) $data['poll_end']);
     return parent::create_insert_array($data, $pre_create_data);
 }
Example #7
0
 public function create_insert_array($post, $pre_create_data = array())
 {
     $this->notification_time = $post['post_time'];
     return parent::create_insert_array($post, $pre_create_data);
 }
 /**
  * Function for preparing the data for insertion in an SQL query
  * (The service handles insertion)
  *
  * @param	array	$data				Data from submit link
  * @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($data, $pre_create_data = array())
 {
     $this->set_data('link_name', $data['link_name']);
     $this->set_data('cat_id', $data['cat_id']);
     $this->set_data('cat_name', $data['cat_name']);
     return parent::create_insert_array($data, $pre_create_data);
 }
Example #9
0
 public function create_insert_array($notification_data, $pre_create_data = array())
 {
     $this->set_data('article_id', $notification_data['article_id']);
     $this->set_data('user_id', $notification_data['user_id']);
     $this->set_data('article_title', $notification_data['article_title']);
     $this->set_data('article_url', $notification_data['article_url']);
     return parent::create_insert_array($notification_data, $pre_create_data);
 }
Example #10
0
 /**
  * Function for preparing the data for insertion in an SQL query
  * (The service handles insertion)
  *
  * @param array $data The data for the updated rules
  * @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($data, $pre_create_data = array())
 {
     $this->set_data('requester_id', $data['requester_id']);
     $this->set_data('post_id', $data['post_id']);
     $this->set_data('topic_id', $data['topic_id']);
     $this->set_data('post_subject', $data['post_subject']);
     return parent::create_insert_array($data, $pre_create_data);
 }
 /**
  * Function for preparing the data for insertion in an SQL query
  * (The service handles insertion)
  *
  * @param array $data The data for the updated rules
  * @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($data, $pre_create_data = array())
 {
     $this->set_data('image_id', $data['image_id']);
     $this->set_data('comment_id', $data['comment_id']);
     $this->set_data('poster_id', $data['poster']);
     $this->set_data('url', $data['url']);
     return parent::create_insert_array($data, $pre_create_data);
 }
Example #12
0
 public function create_insert_array($notification_data, $pre_create_data = array())
 {
     // This should be the user who has taken the action:
     if (isset($notification_data['user_id'])) {
         $this->set_data('user_id', $notification_data['user_id']);
     } else {
         $this->set_data('user_id', $this->user->data['user_id']);
     }
     if (isset($notification_data['date'])) {
         $this->set_data('date', $notification_data['date']);
     } else {
         $this->set_data('date', 0);
     }
     if (isset($notification_data['text'])) {
         $this->set_data('text', $notification_data['text']);
     }
     if (isset($notification_data['yes'])) {
         $this->set_data('yes', $notification_data['yes']);
         $this->set_data('no', $notification_data['no']);
         $this->set_data('maybe', $notification_data['maybe']);
     } else {
         $this->set_data('yes', 0);
         $this->set_data('no', 0);
         $this->set_data('maybe', 0);
     }
     $this->set_data('topic_id', $notification_data['topic_id']);
     if (isset($notification_data['forum_id'])) {
         $this->set_data('forum_id', $notification_data['forum_id']);
     } else {
         $this->set_data('forum_id', 0);
     }
     $this->set_data('topic_title', $notification_data['topic_title']);
     return parent::create_insert_array($notification_data, $pre_create_data);
 }
Example #13
0
 /**
  * Function for preparing the data for insertion in an SQL query
  * (The service handles insertion)
  *
  * @param array $thanks_data Data from insert_thanks
  * @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($fromadmin_data, $pre_create_data = array())
 {
     $this->set_data('from', $fromadmin_data['from']);
     $this->set_data('noty_title', $fromadmin_data['noty_title']);
     $this->set_data('noty_content', $fromadmin_data['noty_content']);
     $this->set_data('noty_parse_type', $fromadmin_data['noty_parse_type']);
     $this->set_data('noty_uid', $fromadmin_data['noty_uid']);
     $this->set_data('noty_bitfield', $fromadmin_data['noty_bitfield']);
     $this->set_data('noty_options', $fromadmin_data['noty_options']);
     return parent::create_insert_array($fromadmin_data, $pre_create_data);
 }
 /**
  * Function for preparing the data for insertion in an SQL query
  * (The service handles insertion)
  *
  * @param array $data The data for the reputation
  * @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($data, $pre_create_data = array())
 {
     $this->set_data('user_id_from', $data['user_id_from']);
     $this->set_data('post_id', $data['post_id']);
     $this->set_data('post_subject', $data['post_subject']);
     return parent::create_insert_array($data, $pre_create_data);
 }
 /**
  * Function for preparing the data for insertion in an SQL query
  * (The service handles insertion)
  *
  * @param	array	$data				Data from submit link
  * @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($data, $pre_create_data = array())
 {
     $this->set_data('link_name', $data['link_name']);
     $this->set_data('link_url', $data['link_url']);
     $this->set_data('link_description', $data['link_description']);
     $this->set_data('user_from', $data['user_from']);
     $this->set_data('cat_id', $data['cat_id']);
     $this->set_data('cat_name', $data['cat_name']);
     return parent::create_insert_array($data, $pre_create_data);
 }
 /**
  * Function for preparing the data for insertion in an SQL query
  * (The service handles insertion)
  *
  * @param array $data The data for the report
  * @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($data, $pre_create_data = array())
 {
     $this->set_data('points_notify_id', $data['points_notify_id']);
     $this->set_data('points_notify_msg', $data['points_notify_msg']);
     $this->set_data('sender', $data['sender']);
     $this->set_data('receiver', $data['receiver']);
     $this->set_data('mode', $data['mode']);
     return parent::create_insert_array($data, $pre_create_data);
 }
Example #17
0
 /**
  * Function for preparing the data for insertion in an SQL query
  * (The service handles insertion)
  *
  * @param array $data The data for the report
  * @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($wall_notification_data, $pre_create_data = array())
 {
     $this->set_data('msg_id', $wall_notification_data['msg_id']);
     $this->set_data('user_id', $wall_notification_data['user_id']);
     $this->set_data('poster_name', $wall_notification_data['poster_name']);
     $this->set_data('notification_msg', $wall_notification_data['notification_msg']);
     return parent::create_insert_array($data, $pre_create_data);
 }
Example #18
0
 /**
  * Function for preparing the data for insertion in an SQL query
  * (The service handles insertion)
  *
  * @param array $data The data for the updated rules
  * @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($data, $pre_create_data = array())
 {
     $this->set_data('rule_id', $data['rule_id']);
     return parent::create_insert_array($data, $pre_create_data);
 }
 /**
  * {@inheritdoc}
  */
 public function create_insert_array($group, $pre_create_data = array())
 {
     $this->set_data('group_name', $group['group_name']);
     return parent::create_insert_array($group, $pre_create_data);
 }
Example #20
0
 /**
  * {@inheritdoc}
  */
 public function create_insert_array($user, $pre_create_data)
 {
     $this->set_data('user_actkey', $user['user_actkey']);
     $this->notification_time = $user['user_regdate'];
     parent::create_insert_array($user, $pre_create_data);
 }
Example #21
0
File: pm.php Project: MrAdder/phpbb
 /**
  * {@inheritdoc}
  */
 public function create_insert_array($pm, $pre_create_data = array())
 {
     $this->set_data('from_user_id', $pm['from_user_id']);
     $this->set_data('message_subject', $pm['message_subject']);
     parent::create_insert_array($pm, $pre_create_data);
 }
 /**
  * Function for preparing the data for insertion in an SQL query
  * (The service handles insertion)
  *
  * @param array $data The data for the updated rules
  * @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($data, $pre_create_data = array())
 {
     $this->set_data('item_id', $data['item_id']);
     $this->set_data('reporter', $data['reporter']);
     $this->set_data('url', $data['url']);
     return parent::create_insert_array($data, $pre_create_data);
 }