Skip to:
Content

BuddyPress.org

Ticket #589: 589.patch

File 589.patch, 1.4 KB (added by johnbillion, 15 years ago)
  • bp-blogs.php

     
    743743
    744744        if ( !$meta_key ) {
    745745                $wpdb->query( $wpdb->prepare( "DELETE FROM {$bp->blogs->table_name_blogmeta} WHERE blog_id = %d", $blog_id ) );         
    746         } else if ( !$meta_value ) {
     746        } else if ( $meta_value ) {
    747747                $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 ) );
    748748        } else {
    749749                $wpdb->query( $wpdb->prepare( "DELETE FROM {$bp->blogs->table_name_blogmeta} WHERE blog_id = %d AND meta_key = %s", $blog_id, $meta_key ) );
  • bp-groups.php

     
    21622162
    21632163        if ( !$meta_key ) {
    21642164                $wpdb->query( $wpdb->prepare( "DELETE FROM " . $bp->groups->table_name_groupmeta . " WHERE group_id = %d", $group_id ) );               
    2165         } else if ( !$meta_value ) {
     2165        } else if ( $meta_value ) {
    21662166                $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 ) );
    21672167        } else {
    21682168                $wpdb->query( $wpdb->prepare( "DELETE FROM " . $bp->groups->table_name_groupmeta . " WHERE group_id = %d AND meta_key = %s", $group_id, $meta_key ) );