Skip to:
Content

BuddyPress.org

Changeset 3736 for trunk/bp-blogs.php


Ignore:
Timestamp:
01/18/2011 10:46:09 PM (16 years ago)
Author:
boonebgorges
Message:

Modifies upgrade routine so that a site's front-end can continue to be accessible after a BP upgrade but before the wizard has been completed. Adds upgrade nags to the Dashboard. Fixes #2789. Props r-a-y and DJPaul for earlier patches and help testing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-blogs.php

    r3728 r3736  
    1414        if ( !defined( 'BP_BLOGS_SLUG' ) && isset( $bp->pages->blogs->slug ) )
    1515                define ( 'BP_BLOGS_SLUG', bp_core_component_slug_from_root_slug( $bp->pages->blogs->slug ) );
    16         else if( !defined( 'BP_BLOGS_SLUG' ) )
     16        else if ( !defined( 'BP_BLOGS_SLUG' ) )
    1717                define ( 'BP_BLOGS_SLUG', 'blogs' );
    1818
    1919        // For internal identification
    2020        $bp->blogs->id   = 'blogs';
    21         $bp->blogs->name = $bp->pages->blogs->name;
     21        $bp->blogs->name = !empty( $bp->pages->blogs->name ) ? $bp->pages->blogs->name : 'blogs';
    2222
    2323        // Slugs
    2424        $bp->blogs->slug      = BP_BLOGS_SLUG;
    25         $bp->blogs->root_slug = $bp->pages->blogs->slug;
     25        $bp->blogs->root_slug = !empty( $bp->pages->blogs->slug ) ? $bp->pages->blogs->slug : BP_BLOGS_SLUG;
    2626
    2727        // Tables
     
    558558function bp_blogs_remove_post( $post_id, $blog_id = false, $user_id = false ) {
    559559        global $current_blog, $bp;
     560       
     561        if ( empty( $current_blog->blog_id ) )
     562                return false;
    560563
    561564        $post_id = (int)$post_id;
Note: See TracChangeset for help on using the changeset viewer.