Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
04/23/2011 10:02:47 PM (13 years ago)
Author:
boonebgorges
Message:

Fixes forum tag permalink. Fixes #3123. Props DJPaul for the MySQL digging.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-groups/bp-groups-filters.php

    r4200 r4269  
    6767    // Only filter the forum SQL on group pages or on the forums directory
    6868    add_filter( 'get_topics_fields',     'groups_add_forum_fields_sql' );
    69     add_filter( 'get_topics_index_hint', 'groups_add_forum_tables_sql' );
     69    add_filter( 'get_topics_join',      'groups_add_forum_tables_sql' );
    7070    add_filter( 'get_topics_where',      'groups_add_forum_where_sql'  );
    7171}
     
    7878function groups_add_forum_tables_sql( $sql = '' ) {
    7979    global $bp;
    80     return ', ' . $bp->groups->table_name . ' AS g LEFT JOIN ' . $bp->groups->table_name_groupmeta . ' AS gm ON g.id = gm.group_id ';
     80   
     81    $sql .= ', ' . $bp->groups->table_name . ' AS g LEFT JOIN ' . $bp->groups->table_name_groupmeta . ' AS gm ON g.id = gm.group_id ';
     82   
     83    return $sql;
    8184}
    8285
Note: See TracChangeset for help on using the changeset viewer.