Skip to:
Content

BuddyPress.org

Ticket #2350: patch-2350.patch

File patch-2350.patch, 1000 bytes (added by DJPaul, 16 years ago)
  • bp-core/bp-core-templatetags.php

     
    959959        }
    960960
    961961function bp_has_custom_activation_page() {
    962         if ( locate_template( array( 'activate.php' ), false ) || locate_template( array( '/registration/activate.php' ), false ) )
     962        global $wpdb;
     963
     964        $activation_pages = array( 'activate.php', '/registration/activate.php' );
     965
     966        if ( bp_core_is_multisite() && $wpdb->blogid != BP_ROOT_BLOG ) {
     967                $original_blog = $wpdb->blogid;
     968                switch_to_blog( BP_ROOT_BLOG );
     969
     970                foreach ( $activation_pages as $page ) {
     971                        if ( file_exists( get_stylesheet_directory() . '/' . $page ) )
     972                                return true;
     973                        else if ( file_exists( get_template_directory() . '/' . $page ) )
     974                                return true;
     975                }
     976
     977                switch_to_blog( $original_blog );
     978        }
     979
     980        if ( locate_template( $activation_pages, false ) )
    963981                return true;
    964982
    965983        return false;