public function topicReview($tid)
    {
        $post_data = [];

        $post_data = Container::get('hooks')->fire('model.post.topic_review_start', $post_data, $tid);

        $select_topic_review = ['poster', 'message', 'hide_smilies', 'posted'];

        $result = DB::forTable('posts')->select_many($select_topic_review)
                    ->where('topic_id', $tid)
                    ->order_by_desc('id');
        $result = Container::get('hooks')->fire('model.post.topic_review_query', $result);
        $result = $result->find_many();

        foreach ($result as $cur_post) {
            $cur_post['message'] = Container::get('parser')->parseMessage(
                $cur_post['message'],
                $cur_post['hide_smilies']
            );
            $post_data[] = $cur_post;
        }

        $post_data = Container::get('hooks')->fire('model.post.topic_review', $post_data);

        return $post_data;
    }
public function topicReview($tid)
    {
        $post_data = [];

        $post_data = Container::get('hooks')->fire('model.post.topic_review_start', $post_data, $tid);

        $select_topic_review = ['poster', 'message', 'hide_smilies', 'posted'];

        $result = DB::forTable('posts')->select_many($select_topic_review)
                    ->where('topic_id', $tid)
                    ->order_by_desc('id');
        $result = Container::get('hooks')->fire('model.post.topic_review_query', $result);
        $result = $result->find_many();

        foreach ($result as $cur_post) {
            $cur_post['message'] = Container::get('parser')->parseMessage(
                $cur_post['message'],
                $cur_post['hide_smilies']
            );
            $post_data[] = $cur_post;
        }

        $post_data = Container::get('hooks')->fire('model.post.topic_review', $post_data);

        return $post_data;
    }
public function topicReview ( $ tid ) { $ post_data = [ ] ; $ post_data = Container :: get ( 'hooks' ) -> fire ( 'model.post.topic_review_start' , $ post_data , $ tid ) ; $ select_topic_review = [ 'poster' , 'message' , 'hide_smilies' , 'posted' ] ; $ result = DB :: forTable ( 'posts' ) -> select_many ( $ select_topic_review ) -> where ( 'topic_id' , $ tid ) -> order_by_desc ( 'id' ) ; $ result = Container :: get ( 'hooks' ) -> fire ( 'model.post.topic_review_query' , $ result ) ; $ result = $ result -> find_many ( ) ; foreach ( $ result as $ cur_post ) { $ cur_post [ 'message' ] = Container :: get ( 'parser' ) -> parseMessage ( $ cur_post [ 'message' ] , $ cur_post [ 'hide_smilies' ] ) ; $ post_data [ ] = $ cur_post ; } $ post_data = Container :: get ( 'hooks' ) -> fire ( 'model.post.topic_review' , $ post_data ) ; return $ post_data ; }
Display the topic review if needed
Display the topic review if needed