Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/02/2011 07:37:25 AM (13 years ago)
Author:
johnjamesjacoby
Message:

Continued separation of forums and groups components.

File:
1 edited

Legend:

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

    r3917 r4010  
    268268
    269269    if ( isset( $bbdb ) ) {
    270         $count = $bbdb->get_results( $bbdb->prepare( "SELECT t.topic_id FROM {$bbdb->topics} AS t". groups_add_forum_tables_sql( '' ) . " WHERE " . groups_add_forum_where_sql( "t.topic_status = 0" ) ) );
     270        if ( bp_is_active( 'groups' ) ) {
     271            $groups_table_sql = groups_add_forum_tables_sql();
     272            $groups_where_sql = groups_add_forum_where_sql( "t.topic_status = 0" );
     273        } else {
     274            $groups_table_sql = '';
     275            $groups_where_sql = "t.topic_status = 0";
     276        }
     277        $count = $bbdb->get_results( $bbdb->prepare( "SELECT t.topic_id FROM {$bbdb->topics} AS t {$groups_table_sql} WHERE {$groups_where_sql}" ) );
    271278        $count = count( (array)$count );
    272279    } else {
Note: See TracChangeset for help on using the changeset viewer.