Skip to:
Content

BuddyPress.org

Changeset 1790 for trunk/bp-blogs.php


Ignore:
Timestamp:
09/04/2009 06:49:12 PM (17 years ago)
Author:
apeatling
Message:

Fixes #949

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-blogs.php

    r1750 r1790  
    302302function bp_blogs_record_blog( $blog_id, $user_id ) {
    303303        global $bp;
    304 
     304       
    305305        if ( !$user_id )
    306306                $user_id = $bp->loggedin_user->id;
    307                
     307       
    308308        $name = get_blog_option( $blog_id, 'blogname' );
    309309        $description = get_blog_option( $blog_id, 'blogdescription' );
    … …  
    318318        bp_blogs_update_blogmeta( $recorded_blog->blog_id, 'description', $description );
    319319        bp_blogs_update_blogmeta( $recorded_blog->blog_id, 'last_activity', time() );
    320 
     320       
    321321        if ( (int)$_POST['blog_public'] )
    322322                $is_private = 0;
    323323        else
    324324                $is_private = 1;
    325 
     325       
    326326        /* Record this in activity streams */
    327327        bp_blogs_record_activity( array(
    … …  
    332332                'item_id' => $recorded_blog_id
    333333        ) );
    334 
     334       
    335335        do_action( 'bp_blogs_new_blog', $recorded_blog, $is_private, $is_recorded );
    336336}
    … …  
    339339function bp_blogs_record_post( $post_id, $blog_id = false, $user_id = false ) {
    340340        global $bp, $wpdb;
    341 
     341       
    342342        $post_id = (int)$post_id;
    343343        $post = get_post($post_id);
    … …  
    348348        if ( !$blog_id )
    349349                $blog_id = (int)$wpdb->blogid;
    350 
     350       
    351351        /* This is to stop infinate loops with Donncha's sitewide tags plugin */
    352352        if ( (int)get_site_option('tags_blog_id') == (int)$blog_id )
    353353                return false;
    354                
     354       
    355355        /* Don't record this if it's not a post */
    356356        if ( $post->post_type != 'post' )
    … …  
    364364                        $recorded_post->blog_id = $blog_id;
    365365                        $recorded_post->post_id = $post_id;
    366                         $recorded_post->date_created = strtotime( $post->post_date );
     366                        $recorded_post->date_created = strtotime( $post->post_date_gmt );
    367367                       
    368368                        $recorded_post_id = $recorded_post->save();
    … …  
    443443        $recorded_comment->comment_id = $comment_id;
    444444        $recorded_comment->comment_post_id = $comment->comment_post_ID;
    445         $recorded_comment->date_created = strtotime( $comment->comment_date );
     445        $recorded_comment->date_created = strtotime( $comment->comment_date_gmt );
    446446
    447447        $recorded_commment_id = $recorded_comment->save();
Note: See TracChangeset for help on using the changeset viewer.