Skip to:
Content

BuddyPress.org

Changeset 3319


Ignore:
Timestamp:
10/27/2010 04:08:20 PM (14 years ago)
Author:
boonebgorges
Message:

Sets default value of group_id in groups_update_last_activity() to current group id if no parameter is passed. Fixes #2536.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-groups.php

    r3300 r3319  
    12981298}
    12991299
    1300 function groups_update_last_activity( $group_id ) {
     1300function groups_update_last_activity( $group_id = false ) {
     1301    global $bp;
     1302   
     1303    if ( !$group_id )
     1304        $group_id = $bp->groups->current_group->id;
     1305       
     1306    if ( !$group_id )
     1307        return false;
     1308   
    13011309    groups_update_groupmeta( $group_id, 'last_activity', gmdate( "Y-m-d H:i:s" ) );
    13021310}
Note: See TracChangeset for help on using the changeset viewer.