Skip to:
Content

BuddyPress.org

Ticket #6892: 6892.patch

File 6892.patch, 791 bytes (added by imath, 10 years ago)
  • src/bp-core/admin/bp-core-admin-schema.php

    diff --git src/bp-core/admin/bp-core-admin-schema.php src/bp-core/admin/bp-core-admin-schema.php
    index 87ec012..6201bf1 100644
    function bp_core_upgrade_signups() { 
    533533 * @since 2.5.0
    534534 */
    535535function bp_core_install_emails() {
     536        $needs_reset = false;
     537
     538        if ( is_multisite() && ! bp_is_root_blog() ) {
     539                $needs_reset = true;
     540
     541                switch_to_blog( bp_get_root_blog_id() );
     542        }
     543
    536544        $defaults = array(
    537545                'post_status' => 'publish',
    538546                'post_type'   => bp_get_email_post_type(),
    function bp_core_install_emails() { 
    703711                }
    704712        }
    705713
     714        if ( true === $needs_reset ) {
     715                restore_current_blog();
     716        }
     717
    706718        /**
    707719         * Fires after BuddyPress adds the posts for its emails.
    708720         *