Skip to:
Content

BuddyPress.org

Changeset 5402


Ignore:
Timestamp:
11/28/2011 01:33:11 PM (10 years ago)
Author:
boonebgorges
Message:

Allow groups_update_groupmeta() to record an empty value, instead of invoking groups_delete_groupmeta(). Fixes #3139

Location:
trunk/bp-groups
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-groups/bp-groups-actions.php

    r5302 r5402  
    8989            } else {
    9090                // Create the forum if enable_forum = 1
    91                 if ( bp_is_active( 'forums' ) && '' == groups_get_groupmeta( $bp->groups->new_group_id, 'forum_id' ) ) {
     91                if ( bp_is_active( 'forums' ) && !groups_get_groupmeta( $bp->groups->new_group_id, 'forum_id' ) ) {
    9292                    groups_new_group_forum();
    9393                }
  • trunk/bp-groups/bp-groups-functions.php

    r5329 r5402  
    938938    $meta_value = maybe_serialize( $meta_value );
    939939
    940     if ( empty( $meta_value ) )
    941         return groups_delete_groupmeta( $group_id, $meta_key );
    942 
    943940    $cur = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM " . $bp->groups->table_name_groupmeta . " WHERE group_id = %d AND meta_key = %s", $group_id, $meta_key ) );
    944941
Note: See TracChangeset for help on using the changeset viewer.