Make WordPress Core

Changeset 524


Ignore:
Timestamp:
11/05/2003 12:11:03 AM (22 years ago)
Author:
mikelittle
Message:

Added delete link to comment notification mail.
Contribution from Craig R Hughes craig at hughes-family dot org

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/b2comments.post.php

    r458 r524  
    8585
    8686    $wpdb->query("INSERT INTO $tablecomments VALUES ('0', '$comment_post_ID', '$author', '$email', '$url', '$user_ip', '$now', '$comment', '0')");
     87    $comment_ID = $wpdb->get_var("SELECT last_insert_id()");
    8788
    8889    if ($comments_notify) {
     
    9697            $notify_message .= "URL    : $comment_author_url\r\n";
    9798            $notify_message .= "Whois  : http://ws.arin.net/cgi-bin/whois.pl?queryinput=$user_ip\r\n";
     99            $notify_message .= "Delete : $siteurl/wp-admin/wp-post.php?action=deletecomment&p=$comment_post_ID&comment=$comment_ID \r\n";
    98100            $notify_message .= "Comment:\r\n".stripslashes($original_comment)."\r\n\r\n";
    99101            $notify_message .= "You can see all comments on this post here: \r\n";
  • trunk/wp-admin/wp-post.php

    r514 r524  
    357357        $result = $wpdb->query("DELETE FROM $tablecomments WHERE comment_ID=$comment");
    358358
    359         header ('Location: ' . $HTTP_SERVER_VARS['HTTP_REFERER']);
     359        if($HTTP_SERVER_VARS['HTTP_REFERER'] != "") {
     360            header('Location: ' . $HTTP_SERVER_VARS['HTTP_REFERER']);
     361        } else {
     362            header('Location: '.$siteurl.'/wp-admin/');
     363        }
    360364
    361365        break;
Note: See TracChangeset for help on using the changeset viewer.