Skip to:
Content

BuddyPress.org

Changeset 2326 for trunk/bp-blogs.php


Ignore:
Timestamp:
01/18/2010 10:40:25 AM (16 years ago)
Author:
apeatling
Message:

Fixed bug where new blog creation activity would be recorded twice.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-blogs.php

    r2302 r2326  
    299299
    300300                    if ( !isset( $role['subscriber'] ) )
    301                         bp_blogs_record_blog( $blog_id, $user->user_id );
     301                        bp_blogs_record_blog( $blog_id, $user->user_id, true );
    302302                }
    303303            }
     
    306306}
    307307
    308 function bp_blogs_record_blog( $blog_id, $user_id, $no_activity = true ) {
     308function bp_blogs_record_blog( $blog_id, $user_id, $no_activity = false ) {
    309309    global $bp;
    310310
     
    326326
    327327    /* Only record this activity if the blog is public */
    328     if ( (int)$_POST['blog_public'] || !$no_activity ) {
     328    if ( (int)$_POST['blog_public'] && !$no_activity ) {
    329329        /* Record this in activity streams */
    330330        bp_blogs_record_activity( array(
     
    530530function bp_blogs_add_user_to_blog( $user_id, $role, $blog_id ) {
    531531    if ( $role != 'subscriber' ) {
    532         bp_blogs_record_blog( $blog_id, $user_id );
     532        bp_blogs_record_blog( $blog_id, $user_id, true );
    533533    }
    534534}
Note: See TracChangeset for help on using the changeset viewer.