Changeset 2953
- Timestamp:
- 04/26/2010 11:22:07 PM (16 years ago)
- File:
-
- 1 edited
-
branches/1.2/bp-forums/bp-forums-templatetags.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/1.2/bp-forums/bp-forums-templatetags.php
r2935 r2953 7 7 var $topic; 8 8 9 var $forum_id; 10 9 11 var $in_the_loop; 10 12 … … 26 28 $this->type = $type; 27 29 $this->search_terms = $search_terms; 30 $this->forum_id = $forum_id; 28 31 29 32 switch ( $type ) { … … 694 697 var $post; 695 698 699 var $forum_id; 696 700 var $topic_id; 697 701 var $topic; … … 717 721 $this->topic_id = $topic_id; 718 722 $forum_template->topic = (object) bp_forums_get_topic_details( $this->topic_id ); 723 $this->forum_id = $forum_template->topic->forum_id; 719 724 720 725 $this->posts = bp_forums_get_topic_posts( array( 'topic_id' => $this->topic_id, 'page' => $this->pag_page, 'per_page' => $this->pag_num ) ); … … 812 817 $topic_id = bp_forums_get_topic_id_from_slug( $bp->action_variables[1] ); 813 818 814 if ( is_numeric( $topic_id ) ) 819 if ( is_numeric( $topic_id ) ) { 815 820 $topic_template = new BP_Forums_Template_Topic( $topic_id, $per_page, $max ); 816 else 821 822 // Current topic forum_id needs to match current_group forum_id 823 if ( $bp->current_component == $bp->groups->slug && $topic_template->forum_id != groups_get_groupmeta( $bp->groups->current_group->id, 'forum_id' ) ) 824 return false; 825 826 } else { 817 827 return false; 828 } 818 829 819 830 return apply_filters( 'bp_has_topic_posts', $topic_template->has_posts(), &$topic_template );
Note: See TracChangeset
for help on using the changeset viewer.