Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
04/20/2024 06:48:57 PM (2 years ago)
Author:
espellcaste
Message:

While pulling XProfile group fields objects from cache with the BP_XProfile_Group::get method,
avoid unnecessary queries for the cached bp_xprofile_get_signup_field_ids() function.

See #8976

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/testcases/xprofile/template.php

    r13528 r13797  
    9494            array(
    9595                'field_group_id' => $group_1,
    96                 'type' => 'textbox',
    97                 'name' => 'InSignupForm1'
     96                'type'           => 'textbox',
     97                'name'           => 'InSignupForm1'
    9898            )
    9999        );
     
    105105            array(
    106106                'field_group_id' => $group_2,
    107                 'type' => 'textbox',
    108                 'name' => 'InSignupForm2'
     107                'type'           => 'textbox',
     108                'name'           => 'InSignupForm2'
    109109            )
    110110        );
     
    121121        $this->assertSame( $expected_names, $names );
    122122
     123        // Confirm the fields are in the right order.
     124        $this->assertSame( 'InSignupForm2', $group->fields[1]->name );
     125        $this->assertSame( 'InSignupForm1', $group->fields[2]->name );
     126
    123127        xprofile_delete_field_group( $group_1 );
    124128        xprofile_delete_field_group( $group_2 );
     
    139143        $g3 = self::factory()->xprofile_group->create();
    140144
    141         $field_in_1 = self::factory()->xprofile_field->create(
     145        self::factory()->xprofile_field->create(
    142146            [
    143147                'field_group_id' => $g1,
     
    147151        );
    148152
    149         $field_in_2 = self::factory()->xprofile_field->create(
     153        self::factory()->xprofile_field->create(
    150154            [
    151155                'field_group_id' => $g2,
Note: See TracChangeset for help on using the changeset viewer.