Skip to:
Content

BuddyPress.org

Changeset 3455 for trunk/bp-groups.php


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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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'];
Note: See TracChangeset for help on using the changeset viewer.