Changeset 2424
- Timestamp:
- 01/24/2010 03:30:34 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
-
bp-blogs.php (modified) (3 diffs)
-
bp-core.php (modified) (1 diff)
-
bp-core/bp-core-classes.php (modified) (1 diff)
-
bp-groups.php (modified) (8 diffs)
-
bp-groups/bp-groups-classes.php (modified) (5 diffs)
-
bp-themes/bp-default/_inc/ajax.php (modified) (1 diff)
-
bp-themes/bp-default/groups/create.php (modified) (1 diff)
-
bp-themes/bp-sn-parent/_inc/ajax.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-blogs.php
r2416 r2424 353 353 bp_blogs_update_blogmeta( $recorded_blog->blog_id, 'name', $name ); 354 354 bp_blogs_update_blogmeta( $recorded_blog->blog_id, 'description', $description ); 355 bp_blogs_update_blogmeta( $recorded_blog->blog_id, 'last_activity', time() );355 bp_blogs_update_blogmeta( $recorded_blog->blog_id, 'last_activity', gmdate( "Y-m-d H:i:s" ) ); 356 356 357 357 /* Only record this activity if the blog is public */ … … 401 401 $recorded_post_id = $recorded_post->save(); 402 402 403 bp_blogs_update_blogmeta( $recorded_post->blog_id, 'last_activity', time() );403 bp_blogs_update_blogmeta( $recorded_post->blog_id, 'last_activity', gmdate( "Y-m-d H:i:s" ) ); 404 404 } 405 405 … … 494 494 $recorded_commment_id = $recorded_comment->save(); 495 495 496 bp_blogs_update_blogmeta( $recorded_comment->blog_id, 'last_activity', time() );496 bp_blogs_update_blogmeta( $recorded_comment->blog_id, 'last_activity', gmdate( "Y-m-d H:i:s" ) ); 497 497 } 498 498 -
trunk/bp-core.php
r2420 r2424 1427 1427 $activity = get_usermeta( $bp->loggedin_user->id, 'last_activity' ); 1428 1428 1429 if ( '' == $activity || time() >= strtotime( '+5 minutes', $activity ) ) 1430 update_usermeta( $bp->loggedin_user->id, 'last_activity', time() ); 1429 if ( !is_numeric( $activity ) ) 1430 $activity = strtotime( $activity ); 1431 1432 if ( '' == $activity || strtotime( gmdate( "Y-m-d H:i:s" ) ) >= strtotime( '+5 minutes', $activity ) ) 1433 update_usermeta( $bp->loggedin_user->id, 'last_activity', gmdate( "Y-m-d H:i:s" ) ); 1431 1434 } 1432 1435 add_action( 'wp_head', 'bp_core_record_activity' ); -
trunk/bp-core/bp-core-classes.php
r2318 r2424 137 137 138 138 if ( 'online' == $type ) 139 $sql['where_online'] = "AND DATE_ADD( FROM_UNIXTIME(um.meta_value), INTERVAL 5 MINUTE ) >= NOW()";139 $sql['where_online'] = "AND DATE_ADD( um.meta_value, INTERVAL 5 MINUTE ) >= NOW()"; 140 140 141 141 if ( 'alphabetical' == $type ) -
trunk/bp-groups.php
r2416 r2424 1095 1095 } 1096 1096 1097 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($_POST['group-name']) ), 'date_created' => time() ) ) ) {1097 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($_POST['group-name']) ), 'date_created' => gmdate( "Y-m-d H:i:s" ) ) ) ) { 1098 1098 bp_core_add_message( __( 'There was an error saving group details, please try again.', 'buddypress' ), 'error' ); 1099 1099 bp_core_redirect( $bp->root_domain . '/' . $bp->groups->slug . '/create/step/' . $bp->groups->current_create_step . '/' ); … … 1101 1101 1102 1102 groups_update_groupmeta( $bp->groups->new_group_id, 'total_member_count', 1 ); 1103 groups_update_groupmeta( $bp->groups->new_group_id, 'last_activity', time() );1103 groups_update_groupmeta( $bp->groups->new_group_id, 'last_activity', gmdate( "Y-m-d H:i:s" ) ); 1104 1104 } 1105 1105 … … 1336 1336 1337 1337 function groups_update_last_activity( $group_id ) { 1338 groups_update_groupmeta( $group_id, 'last_activity', time() );1338 groups_update_groupmeta( $group_id, 'last_activity', gmdate( "Y-m-d H:i:s" ) ); 1339 1339 } 1340 1340 add_action( 'groups_joined_group', 'groups_update_last_activity' ); … … 1520 1520 $member->user_title = __( 'Group Admin', 'buddypress' ); 1521 1521 $member->is_confirmed = 1; 1522 $member->date_modified = gmdate( "Y-m-d H:i:s" ); 1522 1523 1523 1524 $member->save(); … … 1692 1693 $new_member->is_admin = 0; 1693 1694 $new_member->user_title = ''; 1694 $new_member->date_modified = time();1695 $new_member->date_modified = gmdate( "Y-m-d H:i:s" ); 1695 1696 $new_member->is_confirmed = 1; 1696 1697 … … 1707 1708 /* Modify group meta */ 1708 1709 groups_update_groupmeta( $group_id, 'total_member_count', (int) groups_get_groupmeta( $group_id, 'total_member_count') + 1 ); 1709 groups_update_groupmeta( $group_id, 'last_activity', time() );1710 groups_update_groupmeta( $group_id, 'last_activity', gmdate( "Y-m-d H:i:s" ) ); 1710 1711 1711 1712 do_action( 'groups_join_group', $group_id, $user_id ); … … 2126 2127 'group_id' => false, 2127 2128 'inviter_id' => $bp->loggedin_user->id, 2128 'date_modified' => time(),2129 'date_modified' => gmdate( "Y-m-d H:i:s" ), 2129 2130 'is_confirmed' => 0 2130 2131 ); … … 2305 2306 $requesting_user->is_admin = 0; 2306 2307 $requesting_user->user_title = ''; 2307 $requesting_user->date_modified = time();2308 $requesting_user->date_modified = gmdate( "Y-m-d H:i:s" ); 2308 2309 $requesting_user->is_confirmed = 0; 2309 2310 $requesting_user->comments = $_POST['group-request-membership-comments']; -
trunk/bp-groups/bp-groups-classes.php
r2411 r2424 42 42 $this->status = $group->status; 43 43 $this->enable_forum = $group->enable_forum; 44 $this->date_created = strtotime($group->date_created);44 $this->date_created = $group->date_created; 45 45 $this->total_member_count = groups_get_groupmeta( $this->id, 'total_member_count' ); 46 46 … … 85 85 status = %s, 86 86 enable_forum = %d, 87 date_created = FROM_UNIXTIME(%d)87 date_created = %s 88 88 WHERE 89 89 id = %d … … 109 109 date_created 110 110 ) VALUES ( 111 %d, %s, %s, %s, %s, %d, FROM_UNIXTIME(%d)111 %d, %s, %s, %s, %s, %d, %s 112 112 )", 113 113 $this->creator_id, … … 643 643 $this->is_banned = $member->is_banned; 644 644 $this->user_title = $member->user_title; 645 $this->date_modified = strtotime($member->date_modified);645 $this->date_modified = $member->date_modified; 646 646 $this->is_confirmed = $member->is_confirmed; 647 647 $this->comments = $member->comments; … … 670 670 671 671 if ( $this->id ) { 672 $sql = $wpdb->prepare( "UPDATE {$bp->groups->table_name_members} SET inviter_id = %d, is_admin = %d, is_mod = %d, is_banned = %d, user_title = %s, date_modified = FROM_UNIXTIME(%d), is_confirmed = %d, comments = %s, invite_sent = %d WHERE id = %d", $this->inviter_id, $this->is_admin, $this->is_mod, $this->is_banned, $this->user_title, $this->date_modified, $this->is_confirmed, $this->comments, $this->invite_sent, $this->id );673 } else { 674 $sql = $wpdb->prepare( "INSERT INTO {$bp->groups->table_name_members} ( user_id, group_id, inviter_id, is_admin, is_mod, is_banned, user_title, date_modified, is_confirmed, comments, invite_sent ) VALUES ( %d, %d, %d, %d, %d, %d, %s, FROM_UNIXTIME(%d), %d, %s, %d )", $this->user_id, $this->group_id, $this->inviter_id, $this->is_admin, $this->is_mod, $this->is_banned, $this->user_title, $this->date_modified, $this->is_confirmed, $this->comments, $this->invite_sent );672 $sql = $wpdb->prepare( "UPDATE {$bp->groups->table_name_members} SET inviter_id = %d, is_admin = %d, is_mod = %d, is_banned = %d, user_title = %s, date_modified = %s, is_confirmed = %d, comments = %s, invite_sent = %d WHERE id = %d", $this->inviter_id, $this->is_admin, $this->is_mod, $this->is_banned, $this->user_title, $this->date_modified, $this->is_confirmed, $this->comments, $this->invite_sent, $this->id ); 673 } else { 674 $sql = $wpdb->prepare( "INSERT INTO {$bp->groups->table_name_members} ( user_id, group_id, inviter_id, is_admin, is_mod, is_banned, user_title, date_modified, is_confirmed, comments, invite_sent ) VALUES ( %d, %d, %d, %d, %d, %d, %s, %s, %d, %s, %d )", $this->user_id, $this->group_id, $this->inviter_id, $this->is_admin, $this->is_mod, $this->is_banned, $this->user_title, $this->date_modified, $this->is_confirmed, $this->comments, $this->invite_sent ); 675 675 } 676 676 -
trunk/bp-themes/bp-default/_inc/ajax.php
r2423 r2424 133 133 134 134 <div class="acomment-meta"> 135 <?php echo bp_core_get_userlink( bp_get_activity_user_id() ) ?> · <?php printf( __( '%s ago', 'buddypress' ), bp_core_time_since( time() ) ) ?> ·135 <?php echo bp_core_get_userlink( bp_get_activity_user_id() ) ?> · <?php printf( __( '%s ago', 'buddypress' ), bp_core_time_since( gmdate( "Y-m-d H:i:s" ) ) ) ?> · 136 136 <a class="acomment-reply" href="#acomment-<?php bp_activity_id() ?>" id="acomment-reply-<?php echo attribute_escape( $_POST['form_id'] ) ?>"><?php _e( 'Reply', 'buddypress' ) ?></a> 137 137 · <a href="<?php echo wp_nonce_url( $bp->root_domain . '/' . $bp->activity->slug . '/delete/' . bp_get_activity_id(), 'bp_activity_delete_link' ) ?>" class="delete acomment-delete confirm"><?php _e( 'Delete', 'buddypress' ) ?></a> -
trunk/bp-themes/bp-default/groups/create.php
r2352 r2424 55 55 <?php if ( is_site_admin() ) : ?> 56 56 <div class="checkbox"> 57 <label><input type="checkbox" disabled="disabled" name="disabled" id="disabled" value="0" /> <?php printf( __('<strong>Attention Site Admin:</strong> Group forums require the <a href="%s">correct setup and configuration</a> of a bbPress installation.', 'buddypress' ), $bp->root_domain . '/wp-admin/admin.php?page=buddypress/bp-forums.php' ) ?></label>57 <label><input type="checkbox" disabled="disabled" name="disabled" id="disabled" value="0" /> <?php printf( __('<strong>Attention Site Admin:</strong> Group forums require the <a href="%s">correct setup and configuration</a> of a bbPress installation.', 'buddypress' ), bp_get_root_domain() . '/wp-admin/admin.php?page=bb-forums-setup' ) ?></label> 58 58 </div> 59 59 <?php endif; ?> -
trunk/bp-themes/bp-sn-parent/_inc/ajax.php
r2413 r2424 268 268 269 269 <h3><a href="<?php echo $bp->loggedin_user->domain ?>"><?php echo $bp->loggedin_user->fullname ?></a></h3> 270 <small><?php printf( __( 'Sent %s ago', 'buddypress' ), bp_core_time_since( time() ) ) ?></small>270 <small><?php printf( __( 'Sent %s ago', 'buddypress' ), bp_core_time_since( gmdate( "Y-m-d H:i:s" ) ) ) ?></small> 271 271 </div> 272 272 … … 531 531 532 532 <div class="acomment-meta"> 533 <?php echo bp_core_get_userlink( $bp->loggedin_user->id ) ?> · <?php echo bp_core_time_since( time() ) ?> ·533 <?php echo bp_core_get_userlink( $bp->loggedin_user->id ) ?> · <?php echo bp_core_time_since( gmdate( "Y-m-d H:i:s" ) ) ?> · 534 534 <a class="acomment-reply" href="#acomment-<?php echo $comment_id ?>" id="acomment-reply-<?php echo attribute_escape( $_POST['form_id'] ) ?>"><?php _e( 'Reply', 'buddypress' ) ?></a> 535 535 <?php if ( is_site_admin() || $bp->loggedin_user->id == $comment->user_id ) : ?>
Note: See TracChangeset
for help on using the changeset viewer.