Skip to:
Content

BuddyPress.org


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.5/bp-core/bp-core-functions.php

    r5151 r5239  
    137137    if ( $page_ids = bp_core_get_directory_page_ids() ) {
    138138
    139         $posts_table_name = bp_is_multiblog_mode() ? $wpdb->get_blog_prefix( bp_get_root_blog_id() ) . 'posts' : $wpdb->posts;
     139        // Always get page data from the root blog, except on multiblog mode, when it comes
     140        // from the current blog
     141        $posts_table_name = bp_is_multiblog_mode() ? $wpdb->posts : $wpdb->get_blog_prefix( bp_get_root_blog_id() ) . 'posts';
    140142        $page_ids_sql     = implode( ',', (array)$page_ids );
    141143        $page_names       = $wpdb->get_results( $wpdb->prepare( "SELECT ID, post_name, post_parent, post_title FROM {$posts_table_name} WHERE ID IN ({$page_ids_sql}) AND post_status = 'publish' " ) );
     
    839841                $slug = '';
    840842                $var  = '/?s=';
     843
     844                // If posts aren't displayed on the front page, find the post page's slug.
     845                if ( 'page' == get_option( 'show_on_front' ) ) {
     846                    $page = get_post( get_option( 'page_for_posts' ) );
     847
     848                    if ( !is_wp_error( $page ) && !empty( $page->post_name ) ) {
     849                        $slug = $page->post_name;
     850                        $var  = '?s=';
     851                    }
     852                }
    841853                break;
    842854
     
    972984        'bp-deactivated-components'       => serialize( array( ) ),
    973985        'bp-blogs-first-install'          => '0',
    974         'bp-disable-blog-forum-comments'  => '0',
     986        'bp-disable-blogforum-comments'  => '0',
    975987        'bp-xprofile-base-group-name'     => 'Base',
    976988        'bp-xprofile-fullname-field-name' => 'Name',
     
    979991        'bp-disable-account-deletion'     => '0',
    980992        'bp-disable-blogforum-comments'   => '0',
    981         'bb-config-location'              => ABSPATH,
     993        'bb-config-location'              => ABSPATH . 'bb-config.php',
    982994        'hide-loggedout-adminbar'         => '0',
    983995
Note: See TracChangeset for help on using the changeset viewer.