Skip to:
Content

BuddyPress.org

Ticket #2267: 2267.001.diff

File 2267.001.diff, 998 bytes (added by cnorris23, 15 years ago)
  • bp-forums.php

     
    446446        if ( !isset( $post_position ) )
    447447                $post_position = $post->post_position;
    448448
    449         $post = bb_insert_post( array( 'post_id' => $post_id, 'topic_id' => $topic_id, 'post_text' => stripslashes( trim( $post_text ) ), 'post_time' => $post_time, 'poster_id' => $poster_id, 'poster_ip' => $poster_ip, 'post_status' => $post_status, 'post_position' => $post_position ) );
     449        $post_id = bb_insert_post( array( 'post_id' => $post_id, 'topic_id' => $topic_id, 'post_text' => stripslashes( trim( $post_text ) ), 'post_time' => $post_time, 'poster_id' => $poster_id, 'poster_ip' => $poster_ip, 'post_status' => $post_status, 'post_position' => $post_position ) );
    450450
    451         if ( $post )
     451        if ( $post_id )
    452452                do_action( 'bp_forums_new_post', $post_id );
    453453
    454         return $post;
     454        return $post_id;
    455455}
    456456
    457457function bp_forums_get_post_extras( $posts ) {