Make WordPress Core


Ignore:
Timestamp:
02/12/2006 07:53:23 AM (19 years ago)
Author:
ryan
Message:

Death to trailing tabs. Props Mark J. fixes #2405

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/comment-functions.php

    r3442 r3517  
    4242    $commentdata['comment_date']     = current_time('mysql');
    4343    $commentdata['comment_date_gmt'] = current_time('mysql', 1);
    44    
     44
    4545
    4646    $commentdata = wp_filter_comment($commentdata);
     
    231231    if ( !isset($comment_count_cache[$post_id]) )
    232232        $comment_count_cache[$id] = $wpdb->get_var("SELECT comment_count FROM $wpdb->posts WHERE ID = '$post_id'");
    233    
     233
    234234    return apply_filters('get_comments_number', $comment_count_cache[$post_id]);
    235235}
     
    278278    global $id, $wpcommentspopupfile, $wpcommentsjavascript, $post, $wpdb;
    279279    global $comment_count_cache;
    280    
     280
    281281    if (! is_single() && ! is_page()) {
    282282    if ( !isset($comment_count_cache[$id]) )
    283283        $comment_count_cache[$id] = $wpdb->get_var("SELECT COUNT(comment_ID) FROM $wpdb->comments WHERE comment_post_ID = $id AND comment_approved = '1';");
    284    
     284
    285285    $number = $comment_count_cache[$id];
    286    
     286
    287287    if (0 == $number && 'closed' == $post->comment_status && 'closed' == $post->ping_status) {
    288288        echo $none;
     
    345345function get_comment_author_email() {
    346346    global $comment;
    347     return apply_filters('get_comment_author_email', $comment->comment_author_email);   
     347    return apply_filters('get_comment_author_email', $comment->comment_author_email);
    348348}
    349349
     
    617617    debug_fwrite($log, 'Post contents:');
    618618    debug_fwrite($log, $content."\n");
    619    
     619
    620620    // Step 2.
    621621    // Walking thru the links array
     
    659659            // when set to true, this outputs debug messages by itself
    660660            $client->debug = false;
    661            
     661
    662662            if ( $client->query('pingback.ping', $pagelinkedfrom, $pagelinkedto ) )
    663663                add_ping( $post_ID, $pagelinkedto );
     
    770770        if ( 'attachment' == $post->post_status )
    771771            return true;
    772     }       
     772    }
    773773    return false;
    774774}
     
    796796    if ($wpdb->query($query)) {
    797797        do_action('wp_set_comment_status', $comment_id, $comment_status);
    798        
     798
    799799        $comment = get_comment($comment_id);
    800800        $comment_post_ID = $comment->comment_post_ID;
     
    810810function wp_get_comment_status($comment_id) {
    811811    global $wpdb;
    812    
     812
    813813    $result = $wpdb->get_var("SELECT comment_approved FROM $wpdb->comments WHERE comment_ID='$comment_id' LIMIT 1");
    814814    if ($result == NULL) {
     
    846846            // spam words don't break things:
    847847            $word = preg_quote($word, '#');
    848        
     848
    849849            $pattern = "#$word#i";
    850850            if ( preg_match($pattern, $author) ) return false;
Note: See TracChangeset for help on using the changeset viewer.