Changeset 3216
- Timestamp:
- 08/25/2010 03:53:28 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.2/bp-forums/bp-forums-templatetags.php
r3192 r3216 714 714 var $order; 715 715 716 function BP_Forums_Template_Topic( $topic_id, $per_page, $max ) {716 function BP_Forums_Template_Topic( $topic_id, $per_page, $max, $order ) { 717 717 global $bp, $current_user, $forum_template; 718 718 719 $this->pag_page = isset( $_REQUEST['topic_page'] ) ? intval( $_REQUEST['topic_page'] ) : 1; 720 $this->pag_num = isset( $_REQUEST['num'] ) ? intval( $_REQUEST['num'] ) : $per_page; 721 722 $this->topic_id = $topic_id; 719 $this->pag_page = isset( $_REQUEST['topic_page'] ) ? intval( $_REQUEST['topic_page'] ) : 1; 720 $this->pag_num = isset( $_REQUEST['num'] ) ? intval( $_REQUEST['num'] ) : $per_page; 721 722 $this->order = $order; 723 $this->topic_id = $topic_id; 723 724 $forum_template->topic = (object) bp_forums_get_topic_details( $this->topic_id ); 724 $this->forum_id = $forum_template->topic->forum_id;725 726 $this->posts = bp_forums_get_topic_posts( array( 'topic_id' => $this->topic_id, 'page' => $this->pag_page, 'per_page' => $this->pag_num ) );725 $this->forum_id = $forum_template->topic->forum_id; 726 727 $this->posts = bp_forums_get_topic_posts( array( 'topic_id' => $this->topic_id, 'page' => $this->pag_page, 'per_page' => $this->pag_num, 'order' => $this->order ) ); 727 728 728 729 if ( !$this->posts ) { … … 809 810 'topic_id' => false, 810 811 'per_page' => 15, 811 'max' => false 812 'max' => false, 813 'order' => 'ASC' 812 814 ); 813 815 … … 819 821 820 822 if ( is_numeric( $topic_id ) ) { 821 $topic_template = new BP_Forums_Template_Topic( $topic_id, $per_page, $max );823 $topic_template = new BP_Forums_Template_Topic( $topic_id, $per_page, $max, $order ); 822 824 823 825 // Current topic forum_id needs to match current_group forum_id
Note: See TracChangeset
for help on using the changeset viewer.