Beispiel #1
0
 public function report($reason = '')
 {
     // Mark the post as reported
     $this->post_reported = true;
     // Setup the attention object and submit it
     $attention = new titania_attention();
     $attention->__set_array(array('attention_type' => TITANIA_ATTENTION_REPORTED, 'attention_object_type' => TITANIA_POST, 'attention_object_id' => $this->post_id, 'attention_poster_id' => $this->post_user_id, 'attention_post_time' => $this->post_time, 'attention_url' => $this->get_url(), 'attention_title' => $this->post_subject, 'attention_description' => $reason));
     $attention->submit();
     // Update the postcount and mark as reported for the topic and submit it
     $this->update_topic_postcount();
     $this->topic->topic_reported = true;
     $this->topic->submit();
     // Self submission
     parent::submit();
     // Hooks
     titania::$hook->call_hook_ref(array(__CLASS__, __FUNCTION__), $this);
 }
 public function report($reason = '', $notify_reporter = false, $attention_type = TITANIA_ATTENTION_REPORTED)
 {
     // Setup the attention object and submit it
     $attention = new titania_attention();
     $attention->__set_array(array('attention_type' => $attention_type, 'attention_object_type' => TITANIA_CONTRIB, 'attention_object_id' => $this->contrib_id, 'attention_poster_id' => $this->contrib_user_id, 'attention_post_time' => $this->contrib_last_update, 'attention_url' => $this->get_url(), 'attention_title' => $this->contrib_name, 'attention_description' => $reason, 'notify_reporter' => $notify_reporter));
     $attention->submit();
 }