Skip to:
Content

BuddyPress.org

Changeset 387


Ignore:
Timestamp:
10/10/2008 06:25:42 AM (13 years ago)
Author:
apeatling
Message:

Fixed #94 and changed order of users blog posts to most recent at the top.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-blogs.php

    r386 r387  
    290290    $post = get_post($post_id);
    291291   
     292    /* Don't record this if it's not a post, not published, or password protected */
     293    if ( $post->post_type != 'post' || $post->post_status != 'publish' || $post->post_password != '' )
     294        return false;
     295   
    292296    /**
    293297     * Check how many recorded posts there are for the user. If we are
  • trunk/bp-blogs/bp-blogs-classes.php

    r373 r387  
    204204            $user_id = $bp['current_userid'];
    205205           
    206         $post_ids = $wpdb->get_results( $wpdb->prepare( "SELECT post_id, blog_id FROM " . $bp['blogs']['table_name_blog_posts'] . " WHERE user_id = %d ORDER BY date_created ASC", $user_id) );
     206        $post_ids = $wpdb->get_results( $wpdb->prepare( "SELECT post_id, blog_id FROM " . $bp['blogs']['table_name_blog_posts'] . " WHERE user_id = %d ORDER BY date_created DESC", $user_id) );
    207207        $total_post_count = $wpdb->get_var( $wpdb->prepare( "SELECT count(post_id) FROM " . $bp['blogs']['table_name_blog_posts'] . " WHERE user_id = %d", $user_id) );
    208208       
Note: See TracChangeset for help on using the changeset viewer.