Skip to:
Content

BuddyPress.org

Changeset 3455


Ignore:
Timestamp:
11/20/2010 10:46:27 AM (14 years ago)
Author:
djpaul
Message:

Use bp_core_current_time() for all timestamps. Fixes #2750.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-forums.php

    r3450 r3455  
    230230        'topic_last_poster' => $bp->loggedin_user->id, // accepts ids
    231231        'topic_last_poster_name' => $bp->loggedin_user->fullname, // accept names
    232         'topic_start_time' => date( 'Y-m-d H:i:s' ),
    233         'topic_time' => date( 'Y-m-d H:i:s' ),
     232        'topic_start_time' => bp_core_current_time(),
     233        'topic_time' => bp_core_current_time(),
    234234        'topic_open' => 1,
    235235        'topic_tags' => false, // accepts array or comma delim
     
    453453        'topic_id' => false,
    454454        'post_text' => '',
    455         'post_time' => date( 'Y-m-d H:i:s' ),
     455        'post_time' => bp_core_current_time(),
    456456        'poster_id' => $bp->loggedin_user->id, // accepts ids or names
    457457        'poster_ip' => $_SERVER['REMOTE_ADDR'],
  • trunk/bp-groups.php

    r3435 r3455  
    10301030            }
    10311031
    1032             if ( !$bp->groups->new_group_id = groups_create_group( array( 'group_id' => $bp->groups->new_group_id, 'name' => $_POST['group-name'], 'description' => $_POST['group-desc'], 'slug' => groups_check_slug( sanitize_title( esc_attr( $_POST['group-name'] ) ) ), 'date_created' => gmdate( "Y-m-d H:i:s" ), 'status' => 'public' ) ) ) {
     1032            if ( !$bp->groups->new_group_id = groups_create_group( array( 'group_id' => $bp->groups->new_group_id, 'name' => $_POST['group-name'], 'description' => $_POST['group-desc'], 'slug' => groups_check_slug( sanitize_title( esc_attr( $_POST['group-name'] ) ) ), 'date_created' => bp_core_current_time(), 'status' => 'public' ) ) ) {
    10331033                bp_core_add_message( __( 'There was an error saving group details, please try again.', 'buddypress' ), 'error' );
    10341034                bp_core_redirect( $bp->root_domain . '/' . $bp->groups->slug . '/create/step/' . $bp->groups->current_create_step . '/' );
     
    10361036
    10371037            groups_update_groupmeta( $bp->groups->new_group_id, 'total_member_count', 1 );
    1038             groups_update_groupmeta( $bp->groups->new_group_id, 'last_activity', gmdate( "Y-m-d H:i:s" ) );
     1038            groups_update_groupmeta( $bp->groups->new_group_id, 'last_activity', bp_core_current_time() );
    10391039        }
    10401040
     
    13251325        return false;
    13261326   
    1327     groups_update_groupmeta( $group_id, 'last_activity', gmdate( "Y-m-d H:i:s" ) );
     1327    groups_update_groupmeta( $group_id, 'last_activity', bp_core_current_time() );
    13281328}
    13291329add_action( 'groups_joined_group', 'groups_update_last_activity' );
     
    15711571    }
    15721572
    1573     groups_update_groupmeta( $group->id, 'last_activity', gmdate( "Y-m-d H:i:s" ) );
     1573    groups_update_groupmeta( $group->id, 'last_activity', bp_core_current_time() );
    15741574    do_action( 'groups_settings_updated', $group->id );
    15751575
     
    17131713    $new_member->is_admin = 0;
    17141714    $new_member->user_title = '';
    1715     $new_member->date_modified = gmdate( "Y-m-d H:i:s" );
     1715    $new_member->date_modified = bp_core_current_time();
    17161716    $new_member->is_confirmed = 1;
    17171717
     
    17341734    // Modify group meta
    17351735    groups_update_groupmeta( $group_id, 'total_member_count', (int) groups_get_groupmeta( $group_id, 'total_member_count') + 1 );
    1736     groups_update_groupmeta( $group_id, 'last_activity', gmdate( "Y-m-d H:i:s" ) );
     1736    groups_update_groupmeta( $group_id, 'last_activity', bp_core_current_time() );
    17371737
    17381738    do_action( 'groups_join_group', $group_id, $user_id );
     
    19091909    require_once( BP_PLUGIN_DIR . '/bp-groups/bp-groups-notifications.php' );
    19101910
    1911     groups_update_groupmeta( $group_id, 'last_activity', gmdate( "Y-m-d H:i:s" ) );
     1911    groups_update_groupmeta( $group_id, 'last_activity', bp_core_current_time() );
    19121912    do_action( 'bp_groups_posted_update', $content, $user_id, $group_id, $activity_id );
    19131913
     
    21602160        'group_id' => false,
    21612161        'inviter_id' => $bp->loggedin_user->id,
    2162         'date_modified' => gmdate( "Y-m-d H:i:s" ),
     2162        'date_modified' => bp_core_current_time(),
    21632163        'is_confirmed' => 0
    21642164    );
     
    22162216    /* Modify group meta */
    22172217    groups_update_groupmeta( $group_id, 'total_member_count', (int) groups_get_groupmeta( $group_id, 'total_member_count') + 1 );
    2218     groups_update_groupmeta( $group_id, 'last_activity', gmdate( "Y-m-d H:i:s" ) );
     2218    groups_update_groupmeta( $group_id, 'last_activity', bp_core_current_time() );
    22192219
    22202220    bp_core_delete_notifications_for_user_by_item_id( $user_id, $group_id, $bp->groups->id, 'group_invite' );
     
    23662366    $requesting_user->is_admin = 0;
    23672367    $requesting_user->user_title = '';
    2368     $requesting_user->date_modified = gmdate( "Y-m-d H:i:s" );
     2368    $requesting_user->date_modified = bp_core_current_time();
    23692369    $requesting_user->is_confirmed = 0;
    23702370    $requesting_user->comments = $_POST['group-request-membership-comments'];
  • trunk/bp-messages/bp-messages-classes.php

    r3384 r3455  
    406406        $wpdb->query( $wpdb->prepare( "UPDATE {$bp->messages->table_name_notices} SET is_active = 0 WHERE id != %d", $id ) );
    407407
    408         update_user_meta( $bp->loggedin_user->id, 'last_activity', date( 'Y-m-d H:i:s' ) );
     408        update_user_meta( $bp->loggedin_user->id, 'last_activity', bp_core_current_time() );
    409409
    410410        do_action( 'messages_notice_after_save', $this );
  • trunk/bp-xprofile/bp-xprofile-classes.php

    r3396 r3455  
    787787        $this->field_id     = apply_filters( 'xprofile_data_field_id_before_save', $this->field_id, $this->id );
    788788        $this->value        = apply_filters( 'xprofile_data_value_before_save', $this->value, $this->id );
    789         $this->last_updated = apply_filters( 'xprofile_data_last_updated_before_save', date( 'Y-m-d H:i:s' ), $this->id );
     789        $this->last_updated = apply_filters( 'xprofile_data_last_updated_before_save', bp_core_current_time(), $this->id );
    790790
    791791        do_action( 'xprofile_data_before_save', $this );
Note: See TracChangeset for help on using the changeset viewer.