Skip to:
Content

BuddyPress.org

Changeset 868


Ignore:
Timestamp:
01/19/2009 04:46:03 AM (15 years ago)
Author:
apeatling
Message:

Fixes #296

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-blogs/bp-blogs-classes.php

    r836 r868  
    292292            $blog_sql = $wpdb->prepare( " AND p.blog_id = %d", $blog_id );
    293293       
    294         $post_ids = $wpdb->get_results( $wpdb->prepare( "SELECT p.post_id, p.blog_id FROM " . $bp['blogs']['table_name_blog_posts'] . " p LEFT JOIN {$wpdb->base_prefix}blogs b ON p.blog_id = b.blog_id WHERE b.public = 1 AND b.deleted = 0 AND b.archived = '0' AND b.spam = 0 AND b.mature = 0 $blog_sql ORDER BY p.date_created DESC LIMIT $limit" ) );
     294        $post_ids = $wpdb->get_results( $wpdb->prepare( "SELECT DISTINCT p.post_id, p.blog_id FROM " . $bp['blogs']['table_name_blog_posts'] . " p LEFT JOIN {$wpdb->base_prefix}blogs b ON p.blog_id = b.blog_id WHERE b.public = 1 AND b.deleted = 0 AND b.archived = '0' AND b.spam = 0 AND b.mature = 0 $blog_sql ORDER BY p.date_created DESC LIMIT $limit" ) );
    295295
    296296        for ( $i = 0; $i < count($post_ids); $i++ ) {
Note: See TracChangeset for help on using the changeset viewer.