Skip to:
Content

BuddyPress.org

Ticket #2028: 2028.diff

File 2028.diff, 1.6 KB (added by sorich87, 14 years ago)

Refreshed patch

  • bp-blogs.php

     
    435435                $comment_link   = htmlspecialchars( get_comment_link( $recorded_comment->comment_ID ) );
    436436
    437437                // Prepare to record in activity streams
    438                 $activity_action        = sprintf( __( '%s commented on the blog post %s', 'buddypress' ), bp_core_get_userlink( $user_id ), '<a href="' . $post_permalink . '">' . apply_filters( 'the_title', $recorded_comment->post->post_title ) . '</a>' );
     438                if ( is_multisite() )
     439                        $blog_link = sprintf( __( ' on the blog %s', 'buddypress' ), '<a href="' . get_blog_option( $recorded_comment->blog_id, 'home' ) . '">' . get_blog_option( $recorded_comment->blog_id, 'blogname' ) . '</a>' );
     440                else
     441                        $blog_link = '';
     442
     443                $activity_action = sprintf( __( '%1$s commented on the blog post %2$s%3$s', 'buddypress' ), bp_core_get_userlink( $user_id ), '<a href="' . $post_permalink . '">' . apply_filters( 'the_title', $recorded_comment->post->post_title ) . '</a>', $blog_link );
     444
    439445                $activity_content       = $recorded_comment->comment_content;
    440446
    441447                // Record in activity streams
     
    475481
    476482        if ( empty( $role ) ) {
    477483                $key = $wpdb->get_blog_prefix( $id ). 'capabilities';
    478                
     484
    479485                $roles = get_user_meta( $user_id, $key, true );
    480                
     486
    481487                if ( is_array( $roles ) )
    482488                        $role = array_search( 1, $roles );
    483489                else
     
    764770add_action( 'bp_blogs_new_blog', 'bp_core_clear_cache' );
    765771add_action( 'bp_blogs_remove_data', 'bp_core_clear_cache' );
    766772
    767 ?>
    768  No newline at end of file
     773?>