Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/20/2010 12:32:00 PM (14 years ago)
Author:
apeatling
Message:

Fixed duplicate database hits when calling is_site_admin() in a loop on single WP installs. Fixed duplicate call to bp_activity_content_body() causing issues with filters.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.2/bp-core.php

    r2745 r2753  
    106106    /* The core userdata of the user who is currently logged in. */
    107107    $bp->loggedin_user->userdata = bp_core_get_core_userdata( $bp->loggedin_user->id );
     108
     109    /* is_site_admin() hits the DB on single WP installs, so we need to get this separately so we can call it in a loop. */
     110    $bp->loggedin_user->is_site_admin = is_site_admin();
    108111
    109112    /* The user id of the user currently being viewed, set in /bp-core/bp-core-catchuri.php */
Note: See TracChangeset for help on using the changeset viewer.