Skip to:
Content

BuddyPress.org


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-core/bp-core-widgets.php

    r2669 r2695  
    8787           . $after_title; ?>
    8888
    89         <?php if ( bp_has_members( 'user_id=0&type=newest&max=' . $instance['max_members'] ) ) : ?>
     89        <?php if ( bp_has_members( 'user_id=0&type=newest&max=' . $instance['max_members'] . '&populate_extras=0' ) ) : ?>
    9090            <div class="item-options" id="members-list-options">
    9191                <span class="ajax-loader" id="ajax-loader-members"></span>
     
    255255    global $bp;
    256256
    257     check_ajax_referer('bp_core_widget_members');
     257    check_ajax_referer( 'bp_core_widget_members' );
    258258
    259259    switch ( $_POST['filter'] ) {
     
    267267            $type = 'popular';
    268268        break;
    269     } ?>
    270     <?php if ( bp_has_members( 'user_id=0&type=' . $type . '&per_page=' . $_POST['max-members'] . '&max=' . $_POST['max-members'] ) ) : ?>
    271         <?php echo '0[[SPLIT]]'; // return valid result. TODO: remove this because it's dumb. ?>
     269    }
     270
     271    if ( bp_has_members( 'user_id=0&type=' . $type . '&per_page=' . $_POST['max-members'] . '&max=' . $_POST['max-members'] . '&populate_extras=0' ) ) : ?>
     272        <?php echo '0[[SPLIT]]'; // return valid result. TODO: remove this. ?>
    272273        <div class="avatar-block">
    273274            <?php while ( bp_members() ) : bp_the_member(); ?>
     
    279280                    <div class="item">
    280281                        <div class="item-title fn"><a href="<?php bp_member_permalink() ?>" title="<?php bp_member_name() ?>"><?php bp_member_name() ?></a></div>
    281                         <?php if ( 'active' == $type ) : ?>
     282                        <?php if ( 'active' == $type || 'newest' == $type ) : ?>
    282283                            <div class="item-meta"><span class="activity"><?php bp_member_last_active() ?></span></div>
    283284                        <?php else : ?>
Note: See TracChangeset for help on using the changeset viewer.