Skip to:
Content

BuddyPress.org

Changeset 1217


Ignore:
Timestamp:
03/16/2009 11:52:10 AM (16 years ago)
Author:
apeatling
Message:

FIxes #589 props johnbillion.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-blogs.php

    r1209 r1217  
    726726//
    727727
    728 function bp_blogs_delete_blogmeta( $blog_id, $meta_key = false, $meta_value = false ) {
     728function bp_blogs_delete_blogmeta( $blog_id, $meta_key, $meta_value = false ) {
    729729    global $wpdb, $bp;
    730730   
     
    739739    $meta_value = trim( $meta_value );
    740740
    741     if ( !$meta_key ) {
    742         $wpdb->query( $wpdb->prepare( "DELETE FROM {$bp->blogs->table_name_blogmeta} WHERE blog_id = %d", $blog_id ) );     
    743     } else if ( !$meta_value ) {
     741    if ( $meta_value ) {
    744742        $wpdb->query( $wpdb->prepare( "DELETE FROM {$bp->blogs->table_name_blogmeta} WHERE blog_id = %d AND meta_key = %s AND meta_value = %s", $blog_id, $meta_key, $meta_value ) );
    745743    } else {
  • trunk/bp-groups.php

    r1209 r1217  
    21482148//
    21492149
    2150 function groups_delete_groupmeta( $group_id, $meta_key = false, $meta_value = false ) {
     2150function groups_delete_groupmeta( $group_id, $meta_key, $meta_value = false ) {
    21512151    global $wpdb, $bp;
    21522152   
     
    21612161    $meta_value = trim( $meta_value );
    21622162
    2163     if ( !$meta_key ) {
    2164         $wpdb->query( $wpdb->prepare( "DELETE FROM " . $bp->groups->table_name_groupmeta . " WHERE group_id = %d", $group_id ) );       
    2165     } else if ( !$meta_value ) {
     2163    if ( $meta_value ) {
    21662164        $wpdb->query( $wpdb->prepare( "DELETE FROM " . $bp->groups->table_name_groupmeta . " WHERE group_id = %d AND meta_key = %s AND meta_value = %s", $group_id, $meta_key, $meta_value ) );
    21672165    } else {
Note: See TracChangeset for help on using the changeset viewer.