Ticket #25239: 25239.2.diff
File 25239.2.diff, 3.6 KB (added by , 8 years ago) |
---|
-
src/wp-includes/ms-functions.php
796 796 797 797 $activate_url = esc_url($activate_url); 798 798 $admin_email = get_site_option( 'admin_email' ); 799 if ( $admin_email == '' ) 800 $admin_email = 'support@' . $_SERVER['SERVER_NAME']; 799 if ( $admin_email == '' ) { 800 global $current_site; 801 $admin_email = 'support@' . $current_site->domain; 802 } 801 803 $from_name = get_site_option( 'site_name' ) == '' ? 'WordPress' : esc_html( get_site_option( 'site_name' ) ); 802 804 $message_headers = "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n"; 803 805 $message = sprintf( … … 889 891 890 892 // Send email with activation link. 891 893 $admin_email = get_site_option( 'admin_email' ); 892 if ( $admin_email == '' ) 893 $admin_email = 'support@' . $_SERVER['SERVER_NAME']; 894 if ( $admin_email == '' ) { 895 global $current_site; 896 $admin_email = 'support@' . $current_site->domain; 897 } 894 898 $from_name = get_site_option( 'site_name' ) == '' ? 'WordPress' : esc_html( get_site_option( 'site_name' ) ); 895 899 $message_headers = "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n"; 896 900 $message = sprintf( … … 1490 1494 $welcome_email = apply_filters( 'update_welcome_email', $welcome_email, $blog_id, $user_id, $password, $title, $meta ); 1491 1495 $admin_email = get_site_option( 'admin_email' ); 1492 1496 1493 if ( $admin_email == '' ) 1494 $admin_email = 'support@' . $_SERVER['SERVER_NAME']; 1497 if ( $admin_email == '' ) { 1498 $admin_email = 'support@' . $current_site->domain; 1499 } 1495 1500 1496 1501 $from_name = get_site_option( 'site_name' ) == '' ? 'WordPress' : esc_html( get_site_option( 'site_name' ) ); 1497 1502 $message_headers = "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n"; … … 1569 1574 1570 1575 $admin_email = get_site_option( 'admin_email' ); 1571 1576 1572 if ( $admin_email == '' ) 1573 $admin_email = 'support@' . $_SERVER['SERVER_NAME']; 1577 if ( $admin_email == '' ) { 1578 $admin_email = 'support@' . $current_site->domain; 1579 } 1574 1580 1575 1581 $from_name = get_site_option( 'site_name' ) == '' ? 'WordPress' : esc_html( get_site_option( 'site_name' ) ); 1576 1582 $message_headers = "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n"; -
src/wp-includes/pluggable.php
323 323 324 324 if ( !isset( $from_email ) ) { 325 325 // Get the site domain and get rid of www. 326 $sitename = strtolower( $_SERVER['SERVER_NAME'] ); 326 if ( is_multisite() ) { 327 global $current_blog; 328 $sitename = $current_blog->domain; 329 } else { 330 $sitename = parse_url( home_url(), PHP_URL_HOST ); 331 } 327 332 if ( substr( $sitename, 0, 4 ) == 'www.' ) { 328 333 $sitename = substr( $sitename, 4 ); 329 334 } … … 1466 1471 $notify_message .= sprintf( __( 'Spam it: %s' ), admin_url( "comment.php?action=spam&c={$comment->comment_ID}#wpbody-content" ) ) . "\r\n"; 1467 1472 } 1468 1473 1469 $wp_email = 'wordpress@' . preg_replace('#^www\.#', '', strtolower($_SERVER['SERVER_NAME'])); 1474 if ( is_multisite() ) { 1475 global $current_blog; 1476 $sitename = $current_blog->domain; 1477 } else { 1478 $sitename = parse_url( home_url(), PHP_URL_HOST ); 1479 } 1480 $wp_email = 'wordpress@' . preg_replace( '#^www\.#', '', $sitename ); 1470 1481 1471 1482 if ( '' == $comment->comment_author ) { 1472 1483 $from = "From: \"$blogname\" <$wp_email>";