Changeset 4124 for trunk/bp-forums/bp-forums-template.php
- Timestamp:
- 03/12/2011 12:32:15 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-forums/bp-forums-template.php
r4088 r4124 899 899 extract( $r, EXTR_SKIP ); 900 900 901 if ( empty( $topic_id ) && bp_is_current_component( 'groups') && bp_is_current_action( 'forum' ) && 'topic' == $bp->action_variables[0])901 if ( empty( $topic_id ) && bp_is_current_component( 'groups') && bp_is_current_action( 'forum' ) && !empty( $bp->action_variables[0] ) && 'topic' == $bp->action_variables[0] && !empty( $bp->action_variables[1] ) ) 902 902 $topic_id = bp_forums_get_topic_id_from_slug( $bp->action_variables[1] ); 903 903 elseif ( empty( $topic_id ) && bp_is_current_component( 'forums') && bp_is_current_action( 'topic' ) && !empty( $bp->action_variables[0] ) ) 904 904 $topic_id = bp_forums_get_topic_id_from_slug( $bp->action_variables[0] ); 905 905 906 if ( is_numeric( $topic_id ) ) { 907 $topic_template = new BP_Forums_Template_Topic( $topic_id, $per_page, $max, $order ); 906 if ( empty( $topic_id ) ) { 907 return false; 908 909 } else { 910 $topic_template = new BP_Forums_Template_Topic( (int) $topic_id, $per_page, $max, $order ); 908 911 909 912 // Current topic forum_id needs to match current_group forum_id 910 913 if ( bp_is_current_component( 'groups' ) && $topic_template->forum_id != groups_get_groupmeta( $bp->groups->current_group->id, 'forum_id' ) ) 911 914 return false; 912 913 } else {914 return false;915 915 } 916 916
Note: See TracChangeset
for help on using the changeset viewer.