Skip to:
Content

BuddyPress.org

Changeset 1790


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

Fixes #949

Location:
trunk
Files:
4 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();
  • trunk/bp-forums/bp-forums-templatetags.php

    r1688 r1790  
    355355        global $forum_template;
    356356
    357         return apply_filters( 'bp_get_the_topic_time_since_created', bp_core_time_since( bb_gmtstrtotime( $forum_template->topic->topic_start_time ) ) );
     357        return apply_filters( 'bp_get_the_topic_time_since_created', bp_core_time_since( strtotime( $forum_template->topic->topic_start_time ) ) );
    358358    }
    359359   
     
    387387        global $forum_template;
    388388
    389         return apply_filters( 'bp_get_the_topic_time_since_last_post', bp_core_time_since( bb_gmtstrtotime( $forum_template->topic->topic_time ) ) );
     389        return apply_filters( 'bp_get_the_topic_time_since_last_post', bp_core_time_since( strtotime( $forum_template->topic->topic_time ) ) );
    390390    }
    391391
     
    670670        global $topic_template;
    671671
    672         return apply_filters( 'bp_get_the_topic_post_time_since', bp_core_time_since( bb_gmtstrtotime( $topic_template->post->post_time ) ) );
     672        return apply_filters( 'bp_get_the_topic_post_time_since', bp_core_time_since( strtotime( $topic_template->post->post_time ) ) );
    673673    }
    674674
  • trunk/bp-groups.php

    r1783 r1790  
    490490            /* Once we compelete all steps, record the group creation in the activity stream. */
    491491            groups_record_activity( array(
    492                 'content' => sprintf( __( '%s created the group %s:', 'buddypress'), bp_core_get_userlink( $bp->loggedin_user->id ), '<a href="' . bp_get_group_permalink( $bp->groups->current_group ) . '">' . attribute_escape( $bp->groups->current_group->name ) . '</a>' ),
     492                'content' => sprintf( __( '%s created the group %s', 'buddypress'), bp_core_get_userlink( $bp->loggedin_user->id ), '<a href="' . bp_get_group_permalink( $bp->groups->current_group ) . '">' . attribute_escape( $bp->groups->current_group->name ) . '</a>' ),
    493493                'primary_link' => bp_get_group_permalink( $bp->groups->current_group ),
    494494                'component_action' => 'created_group',
     
    21042104            'user_id' => (int)$topic->topic_poster,
    21052105            'secondary_item_id' => $topic->topic_id,
    2106             'recorded_time' => bb_gmtstrtotime( $topic->topic_time )
     2106            'recorded_time' => strtotime( $topic->topic_time )
    21072107        ) );
    21082108
     
    21542154            'item_id' => $bp->groups->current_group->id,
    21552155            'secondary_item_id' => $post_id,
    2156             'recorded_time' => bb_gmtstrtotime( $post->post_time )
     2156            'recorded_time' => strtotime( $post->post_time )
    21572157        ) );
    21582158
  • trunk/bp-status/bp-status-templatetags.php

    r1655 r1790  
    103103}
    104104
     105function bp_the_status_css_class() {
     106    echo bp_get_the_status_css_class();
     107}
     108    function bp_get_the_status_css_class() {
     109        return ( bp_loggedin_user_id() == bp_displayed_user_id() ) ? 'status-editable' : 'status-display';
     110    }
     111
    105112?>
Note: See TracChangeset for help on using the changeset viewer.