Skip to:
Content

BuddyPress.org

Changeset 9916


Ignore:
Timestamp:
06/04/2015 05:37:04 PM (9 years ago)
Author:
boonebgorges
Message:

Allow Members directory page to be nested, after [9723].

Merges [9913] and [9914] into the 2.3 branch.

Props r-a-y.
See #6475.

Location:
branches/2.3
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/2.3

  • branches/2.3/src/bp-core/bp-core-catchuri.php

    r9819 r9916  
    316316                    $bp->current_component = '';
    317317                }
    318             }
    319 
    320             // Reset the offset
    321             $uri_offset = 0;
     318
     319                // Reset the offset
     320                $uri_offset = 0;
     321            }
    322322        }
    323323    }
  • branches/2.3/tests/phpunit/includes/testcase.php

    r9831 r9916  
    5151        buddypress()->displayed_user        = new stdClass();
    5252        buddypress()->loggedin_user         = new stdClass();
     53        buddypress()->pages                 = array();
    5354
    5455        parent::clean_up_global_scope();
  • branches/2.3/tests/phpunit/testcases/routing/members.php

    r9819 r9916  
    2828        $this->go_to( bp_core_get_user_domain( bp_loggedin_user_id() ) );
    2929        $this->assertTrue( bp_is_my_profile() );
     30    }
     31
     32    /**
     33     * @ticket BP6475
     34     */
     35    public function test_member_directory_when_nested_under_wp_page() {
     36        $p = $this->factory->post->create( array(
     37            'post_type' => 'page',
     38            'post_name' => 'foo',
     39        ) );
     40
     41        $members_page = get_page_by_path( 'members' );
     42
     43        wp_update_post( array(
     44            'ID' => $members_page->ID,
     45            'post_parent' => $p,
     46        ) );
     47
     48        $members_page_permalink = bp_get_root_domain() . '/foo/members/';
     49        $this->go_to( $members_page_permalink );
     50
     51        $this->assertTrue( bp_is_members_component() );
     52        $this->assertEquals( '', bp_current_action() );
    3053    }
    3154
Note: See TracChangeset for help on using the changeset viewer.