Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/10/2010 12:29:59 PM (14 years ago)
Author:
apeatling
Message:

Fixes #1789

File:
1 edited

Legend:

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

    r2626 r2641  
    4040                break;
    4141
    42             case 'tag':
    43                 $this->topics = bp_forums_get_forum_topics( array( 'user_id' => $user_id, 'type' => 'tag', 'filter' => $search_terms, 'forum_id' => $forum_id, 'page' => $this->pag_page, 'per_page' => $this->pag_num, 'show_stickies' => $no_stickies ) );
     42            case 'tags':
     43                $this->topics = bp_forums_get_forum_topics( array( 'user_id' => $user_id, 'type' => 'tags', 'filter' => $search_terms, 'forum_id' => $forum_id, 'page' => $this->pag_page, 'per_page' => $this->pag_num, 'show_stickies' => $no_stickies ) );
    4444                break;
    4545        }
     
    178178    }
    179179
    180     /* If we're viewing a tag in the directory, let's auto set the filter to the tag name */
    181     if ( 'tag' == $bp->current_action && !empty( $bp->action_variables[0] ) ) {
    182         $search_terms = $bp->action_variables[0];
    183         $type = 'tags';
    184     }
    185 
    186180    /* If $_GET['fs'] is set, let's auto populate the search_terms var */
    187181    if ( $bp->is_directory && !empty( $_GET['fs'] ) )
     
    206200    extract( $r );
    207201
     202    /* If we're viewing a tag URL in the directory, let's override the type and set it to tags and the filter to the tag name */
     203    if ( 'tag' == $bp->current_action && !empty( $bp->action_variables[0] ) ) {
     204        $search_terms = $bp->action_variables[0];
     205        $type = 'tags';
     206    }
     207
    208208    $forum_template = new BP_Forums_Template_Forum( $type, $forum_id, $user_id, $page, $per_page, $max, $no_stickies, $search_terms );
    209209    return apply_filters( 'bp_has_topics', $forum_template->has_topics(), &$forum_template );
Note: See TracChangeset for help on using the changeset viewer.