Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
10/10/2008 11:47:28 PM (16 years ago)
Author:
apeatling
Message:

Fixed issues with 404's on group pages with sub directory installations.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-catchuri.php

    r375 r388  
    2525 *
    2626 * @package BuddyPress Core
    27  * @global $menu WordPress admin navigation array global
    28  * @global $submenu WordPress admin sub navigation array global
    29  * @global $thirdlevel BuddyPress admin third level navigation
    30  * @uses add_menu_page() WordPress function to add a new top level admin navigation tab
    3127 */
    3228function bp_core_set_uri_globals() {
    3329    global $current_component, $current_action, $action_variables;
     30   
     31    /* Fetch the current URI and explode each part seperated by '/' into an array */
     32    $bp_uri = explode( "/", $_SERVER['REQUEST_URI'] );
     33
     34    /* This is used to determine where the component and action indexes should start */
     35    $root_components = explode( ',', BP_CORE_ROOT_COMPONENTS );
     36    $is_root_component = in_array( $bp_uri[1], $root_components );
    3437   
    3538    /* Set the indexes, these are incresed by one if we are not on a VHOST install */
     
    3740    $action_index = 1;
    3841
    39     if ( VHOST == 'no' ) {
     42    if ( VHOST == 'no' && !$is_root_component ) {
    4043        $component_index++;
    4144        $action_index++;
    4245    }
    43 
    44     /* Fetch the current URI and explode each part seperated by '/' into an array */
    45     $bp_uri = explode( "/", $_SERVER['REQUEST_URI'] );
    4646
    4747    /* Take empties off the end */
Note: See TracChangeset for help on using the changeset viewer.