Changeset 1790 for trunk/bp-blogs.php
- Timestamp:
- 09/04/2009 06:49:12 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-blogs.php
r1750 r1790 302 302 function bp_blogs_record_blog( $blog_id, $user_id ) { 303 303 global $bp; 304 304 305 305 if ( !$user_id ) 306 306 $user_id = $bp->loggedin_user->id; 307 307 308 308 $name = get_blog_option( $blog_id, 'blogname' ); 309 309 $description = get_blog_option( $blog_id, 'blogdescription' ); … … 318 318 bp_blogs_update_blogmeta( $recorded_blog->blog_id, 'description', $description ); 319 319 bp_blogs_update_blogmeta( $recorded_blog->blog_id, 'last_activity', time() ); 320 320 321 321 if ( (int)$_POST['blog_public'] ) 322 322 $is_private = 0; 323 323 else 324 324 $is_private = 1; 325 325 326 326 /* Record this in activity streams */ 327 327 bp_blogs_record_activity( array( … … 332 332 'item_id' => $recorded_blog_id 333 333 ) ); 334 334 335 335 do_action( 'bp_blogs_new_blog', $recorded_blog, $is_private, $is_recorded ); 336 336 } … … 339 339 function bp_blogs_record_post( $post_id, $blog_id = false, $user_id = false ) { 340 340 global $bp, $wpdb; 341 341 342 342 $post_id = (int)$post_id; 343 343 $post = get_post($post_id); … … 348 348 if ( !$blog_id ) 349 349 $blog_id = (int)$wpdb->blogid; 350 350 351 351 /* This is to stop infinate loops with Donncha's sitewide tags plugin */ 352 352 if ( (int)get_site_option('tags_blog_id') == (int)$blog_id ) 353 353 return false; 354 354 355 355 /* Don't record this if it's not a post */ 356 356 if ( $post->post_type != 'post' ) … … 364 364 $recorded_post->blog_id = $blog_id; 365 365 $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 ); 367 367 368 368 $recorded_post_id = $recorded_post->save(); … … 443 443 $recorded_comment->comment_id = $comment_id; 444 444 $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 ); 446 446 447 447 $recorded_commment_id = $recorded_comment->save();
Note: See TracChangeset
for help on using the changeset viewer.