WordPress.org

Plugin Directory

Changeset 1303534


Ignore:
Timestamp:
12/09/15 03:40:30 (2 years ago)
Author:
nofearinc
Message:

Update unanswered issue with no unanswered comments and comment count

Location:
dx-unanswered-comments/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • dx-unanswered-comments/trunk/dx-unanswered-comments.php

    r778434 r1303534  
    5555            $non_replied_comments = DXUC_Helper::get_non_replied_comments( $internal_user_ids_list ); 
    5656 
    57             if ( empty( $non_replied_comments ) ) 
    58                 return $clauses; 
     57            if ( empty( $non_replied_comments ) ) { 
     58                $clauses['where'] = '1 = 0'; // $clauses; 
     59                return $clauses; 
     60            } 
    5961             
    6062            $non_replied_comments_list = implode( ',' ,  $non_replied_comments ); 
     
    7678            $clauses['where'] = apply_filters( 'dxuc_comments_filter_where', $where ); 
    7779        } 
    78          
     80 
    7981        return $clauses; 
    8082    } 
  • dx-unanswered-comments/trunk/inc/dxuc-add-comment-count-top.php

    r778432 r1303534  
    2525    $non_replied_comments = DXUC_Helper::get_non_replied_comments( $internal_user_ids_list ); 
    2626    if( empty( $non_replied_comments ) ) 
    27         return $wpdb->get_var( "SELECT count(*) FROM $wpdb->comments WHERE $not_spam" ); 
     27        return 0; 
     28        // return $wpdb->get_var( "SELECT count(*) FROM $wpdb->comments WHERE $not_spam" ); 
    2829     
    2930    $non_replied_comments_list = implode( ',' ,  $non_replied_comments ); 
Note: See TracChangeset for help on using the changeset viewer.