Esempio n. 1
0
 /**
  * Create a new reply for the topic.
  *
  * @param array $values
  * @param array $expected
  * @return Model_Forum_Post
  */
 public function create_reply(array $values, array $expected)
 {
     $post = new Model_Forum_Post();
     $post->topic_id = $this->id;
     $post->create_post($values, $expected);
     // Set the last_post_id to the newly created post and increase replies.
     $this->last_post_id = $post->id;
     $this->replies++;
     $this->save();
 }