Skip to:
Content

BuddyPress.org

Changeset 2342


Ignore:
Timestamp:
01/18/2010 05:49:08 PM (15 years ago)
Author:
apeatling
Message:

Fixes #1220

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-xprofile/bp-xprofile-classes.php

    r2320 r2342  
    4949        do_action( 'xprofile_group_after_save', $this );
    5050
    51         return true;
     51        if ( $this->id )
     52            return $this->id;
     53        else
     54            return $wpdb->insert_id;
    5255    }
    5356
     
    305308        if ( $wpdb->query($sql) !== null ) {
    306309
     310            if ( $this->id )
     311                $field_id = $this->id;
     312            else
     313                $field_id = $wpdb->insert_id;
     314
    307315            // Only do this if we are editing an existing field
    308316            if ( $this->id != null ) {
     
    373381        if ( !$error ) {
    374382            do_action( 'xprofile_field_after_save', $this );
    375             return true;
     383            return $field_id;
    376384        } else {
    377385            return false;
Note: See TracChangeset for help on using the changeset viewer.