Skip to:
Content

BuddyPress.org

Opened 16 years ago

Closed 15 years ago

#719 closed enhancement (no action required)

get_latest_posts() should not return post ID 1 (default WPMU post)

Reported by: buzz_lightyear's profile buzz_lightyear Owned by:
Milestone: 1.5 Priority: minor
Severity: Version: 1.0
Component: Core Keywords:
Cc:

Description

bp-blogs-classes.php line 389:

//$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" ) );
$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 p.post_id != 1 AND 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" ) );

Change History (3)

#1 @apeatling
16 years ago

  • Milestone changed from Blogs 1.0 to Blogs 1.1

#2 @(none)
15 years ago

  • Milestone Blogs 1.1 deleted

Milestone Blogs 1.1 deleted

#3 @cnorris23
15 years ago

  • Component set to Core
  • Milestone set to 1.3
  • Resolution set to invalid
  • Status changed from new to closed

The default WPMU post is typically delete or changed. Also, the function, get_latest_posts(), was removed in BP 1.2.

Note: See TracTickets for help on using tickets.