Skip to:
Content

BuddyPress.org

Changeset 5322


Ignore:
Timestamp:
11/09/2011 08:11:59 AM (13 years ago)
Author:
johnjamesjacoby
Message:

Revert part of r5320 causing issues with hierarchical pages as root components.

File:
1 edited

Legend:

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

    r5320 r5322  
    343343 */
    344344function bp_core_load_template( $templates ) {
    345     global $post, $bp, $wp_query;
     345    global $post, $bp, $wpdb, $wp_query;
    346346
    347347    // Bail if there is no offset
     
    350350
    351351    // Determine if the root object WP page exists for this request
    352     if ( !get_page_by_path( $bp->unfiltered_uri[$bp->unfiltered_uri_offset] ) )
     352    // (@todo: use reliable API function (get_page_by_path() doesn't work?)
     353    if ( !$wpdb->get_var( $wpdb->prepare( "SELECT ID FROM {$wpdb->posts} WHERE post_name = %s", $bp->unfiltered_uri[$bp->unfiltered_uri_offset] ) ) )
    353354        return false;
    354355
Note: See TracChangeset for help on using the changeset viewer.