Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
01/24/2011 02:22:26 PM (15 years ago)
Author:
johnjamesjacoby
Message:

Fix bug where group topic template was not loading. Use new action/component api.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-forums/bp-forums-template.php

    r3903 r3910  
    886886    extract( $r, EXTR_SKIP );
    887887
    888     if ( !$topic_id && $bp->current_component == $bp->groups->slug && 'forum' == $bp->current_action && 'topic' == $bp->action_variables[0] )
     888    if ( empty( $topic_id ) && bp_is_current_component( 'groups') && bp_is_current_action( 'forum' ) && 'topic' == $bp->action_variables[0] )
    889889        $topic_id = bp_forums_get_topic_id_from_slug( $bp->action_variables[1] );
    890890
     
    893893
    894894        // Current topic forum_id needs to match current_group forum_id
    895         if ( $bp->current_component == $bp->groups->slug && $topic_template->forum_id != groups_get_groupmeta( $bp->groups->current_group->id, 'forum_id' ) )
     895        if ( bp_is_current_component( 'groups' ) && $topic_template->forum_id != groups_get_groupmeta( $bp->groups->current_group->id, 'forum_id' ) )
    896896            return false;
    897897
Note: See TracChangeset for help on using the changeset viewer.