Skip to:
Content

BuddyPress.org

Changeset 3490


Ignore:
Timestamp:
11/28/2010 03:49:00 PM (9 years ago)
Author:
boonebgorges
Message:

Modifies bp_core_set_uri_globals() to properly catch search requests. Fixes #2710

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core.php

    r3479 r3490  
    2222if ( !defined( 'CUSTOM_USER_META_TABLE' ) )
    2323    define( 'CUSTOM_USER_META_TABLE', $wpdb->base_prefix . 'usermeta' );
     24
     25// The search slug has to be defined nice and early because of the way search requests are loaded
     26if ( !defined( 'BP_SEARCH_SLUG' ) )
     27        define( 'BP_SEARCH_SLUG', 'search' );
    2428
    2529/* Load the files containing functions that we globally will need. */
     
    203207    if ( !defined( 'BP_ACTIVATION_SLUG' ) )
    204208        define( 'BP_ACTIVATION_SLUG', $bp->pages->activate->slug );
    205 
    206     if ( !defined( 'BP_SEARCH_SLUG' ) )
    207         define( 'BP_SEARCH_SLUG', 'search' );
    208209}
    209210add_action( 'bp_setup_globals', 'bp_core_define_slugs' );
  • trunk/bp-core/bp-core-catchuri.php

    r3488 r3490  
    140140        unset( $uri_chunks );
    141141    }
    142 
     142   
     143    // Search doesn't have an associated page, so we check for it separately
     144    if ( BP_SEARCH_SLUG == $bp_uri[0] )
     145        $matches[] = 1;
     146       
    143147    // This is not a BuddyPress page, so just return.
    144148    if ( !isset( $matches ) )
Note: See TracChangeset for help on using the changeset viewer.