Skip to:
Content

BuddyPress.org

Changeset 5454


Ignore:
Timestamp:
12/07/2011 01:39:28 AM (13 years ago)
Author:
boonebgorges
Message:

Be smarter about checking for verified empty groupmeta items in the WP cache, in groups_get_groupmeta(). Fixes #3803

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-groups/bp-groups-functions.php

    r5431 r5454  
    919919        $meta_key = preg_replace( '|[^a-z0-9_]|i', '', $meta_key );
    920920
    921         if ( !$metas = wp_cache_get( 'bp_groups_groupmeta_' . $group_id . '_' . $meta_key, 'bp' ) ) {
     921        $metas = wp_cache_get( 'bp_groups_groupmeta_' . $group_id . '_' . $meta_key, 'bp' );       
     922        if ( false === $metas ) {
    922923            $metas = $wpdb->get_col( $wpdb->prepare("SELECT meta_value FROM " . $bp->groups->table_name_groupmeta . " WHERE group_id = %d AND meta_key = %s", $group_id, $meta_key) );
    923924            wp_cache_set( 'bp_groups_groupmeta_' . $group_id . '_' . $meta_key, $metas, 'bp' );
Note: See TracChangeset for help on using the changeset viewer.