Skip to:
Content

BuddyPress.org

Changeset 2695 for trunk/bp-blogs.php


Ignore:
Timestamp:
02/12/2010 12:31:49 PM (15 years ago)
Author:
apeatling
Message:

Fixing the use of deprecated template tags in bp-default. Merged the fetching of BP runtime settings into one query to significantly reduce the number of run time database hits. Fixed #1916

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-blogs.php

    r2684 r2695  
    6464
    6565    // On first installation - record all existing blogs in the system.
    66     if ( !(int)get_site_option( 'bp-blogs-first-install') && bp_core_is_multisite() ) {
     66    if ( !(int)$bp->site_options['bp-blogs-first-install'] && bp_core_is_multisite() ) {
    6767        bp_blogs_record_existing_blogs();
    6868        add_site_option( 'bp-blogs-first-install', 1 );
     
    7878    if ( is_site_admin() && bp_core_is_multisite() ) {
    7979        /* Need to check db tables exist, activate hook no-worky in mu-plugins folder. */
    80         if ( get_site_option('bp-blogs-db-version') < BP_BLOGS_DB_VERSION )
     80        if ( $bp->site_options['bp-blogs-db-version'] < BP_BLOGS_DB_VERSION )
    8181            bp_blogs_install();
    8282    }
     
    103103}
    104104add_action( 'bp_setup_globals', 'bp_blogs_setup_globals' );
    105 add_action( 'admin_menu', 'bp_blogs_setup_globals', 2 );
    106105
    107106function bp_blogs_setup_root_component() {
     
    383382
    384383    /* This is to stop infinate loops with Donncha's sitewide tags plugin */
    385     if ( (int)get_site_option( 'tags_blog_id' ) == (int)$blog_id )
     384    if ( (int)$bp->site_options['tags_blog_id'] == (int)$blog_id )
    386385        return false;
    387386
     
    408407            if ( (int)get_blog_option( $blog_id, 'blog_public' ) || !bp_core_is_multisite() ) {
    409408                /* Record this in activity streams */
    410                 $post_permalink = bp_post_get_permalink( $post, $blog_id );
     409                $post_permalink = get_permalink( $post_id );
    411410
    412411                $activity_action = sprintf( __( '%s wrote a new blog post: %s', 'buddypress' ), bp_core_get_userlink( (int)$post->post_author ), '<a href="' . $post_permalink . '">' . $post->post_title . '</a>' );
Note: See TracChangeset for help on using the changeset viewer.