Make WordPress Core


Ignore:
Timestamp:
11/23/2003 10:13:33 PM (22 years ago)
Author:
saxmatt
Message:

New comment notification system.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/b2comments.post.php

    r549 r555  
    9494        $approved = 1;
    9595    }
    96     $wpdb->query("INSERT INTO $tablecomments (comment_ID,comment_post_ID,comment_author,comment_author_email,comment_author_url,comment_author_IP,comment_date,comment_content,comment_karma,comment_approved) VALUES ('0', '$comment_post_ID', '$author', '$email', '$url', '$user_ip', '$now', '$comment', '0', '$approved')");
     96    $wpdb->query("INSERT INTO $tablecomments
     97    (comment_ID, comment_post_ID, comment_author, comment_author_email, comment_author_url, comment_author_IP, comment_date, comment_content, comment_approved)
     98    VALUES
     99    ('0', '$comment_post_ID', '$author', '$email', '$url', '$user_ip', '$now', '$comment', '$approved')
     100    ");
    97101
    98 /*
    99102    $comment_ID = $wpdb->get_var('SELECT last_insert_id()');
    100103
    101     $fp = fopen("/tmp/wpdebug.txt", "w+");
    102     fwrite($fp, "comment_moderation: $comment_moderation\n");
    103     fwrite($fp, "moderation_notify : $moderation_notify\n");
    104    
    105104    if (($moderation_notify) && (!$approved)) {
    106105        wp_notify_moderator($comment_ID);
    107         fwrite($fp, "notify moderator -> $comment_ID\n");
    108106    }
    109107   
    110108    if (($comment_notify) && ($approved)) {
    111         wp_notify_postauthor($comment_ID);
    112         fwrite($fp, "notify postauthor -> $comment_ID\n");
     109        wp_notify_postauthor($comment_ID, 'comment');
    113110    }
    114    
    115     fclose($fp);
    116111
    117 */
    118112    if ($email == '')
    119113        $email = ' '; // this to make sure a cookie is set for 'no email'
Note: See TracChangeset for help on using the changeset viewer.