WordPress.org

Make WordPress Core

Ticket #1532: bug1532.diff

File bug1532.diff, 822 bytes (added by graeme, 10 years ago)
  • wp-includes/pluggable-functions.php

     
    278278        $notify_message .= sprintf( __('To delete this comment, visit: %s'), get_settings('siteurl').'/wp-admin/post.php?action=confirmdeletecomment&p='.$comment->comment_post_ID."&comment=$comment_id" ) . "\r\n"; 
    279279 
    280280        if ('' == $comment->comment_author_email || '' == $comment->comment_author) { 
    281                 $from = "From: \"$blogname\" <wordpress@" . $_SERVER['SERVER_NAME'] . '>'; 
     281                $from = "From: \"$blogname\" <wordpress@" . preg_replace("/^www\./", "", $_SERVER['SERVER_NAME']) . '>'; 
    282282        } else { 
    283283                $from = 'From: "' . $comment->comment_author . "\" <$comment->comment_author_email>"; 
    284284        }