Ticket #25239: 25239.diff
File 25239.diff, 3.4 KB (added by , 11 years ago) |
---|
-
wp-includes/ms-functions.php
828 828 829 829 $activate_url = esc_url($activate_url); 830 830 $admin_email = get_site_option( 'admin_email' ); 831 if ( $admin_email == '' ) 832 $admin_email = 'support@' . $_SERVER['SERVER_NAME']; 831 if ( $admin_email == '' ) { 832 global $current_site; 833 $admin_email = 'support@' . $current_site->domain; 834 } 833 835 $from_name = get_site_option( 'site_name' ) == '' ? 'WordPress' : esc_html( get_site_option( 'site_name' ) ); 834 836 $message_headers = "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n"; 835 837 $message = sprintf( … … 921 923 922 924 // Send email with activation link. 923 925 $admin_email = get_site_option( 'admin_email' ); 924 if ( $admin_email == '' ) 925 $admin_email = 'support@' . $_SERVER['SERVER_NAME']; 926 if ( $admin_email == '' ) { 927 global $current_site; 928 $admin_email = 'support@' . $current_site->domain; 929 } 926 930 $from_name = get_site_option( 'site_name' ) == '' ? 'WordPress' : esc_html( get_site_option( 'site_name' ) ); 927 931 $message_headers = "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n"; 928 932 $message = sprintf( … … 1504 1508 $admin_email = get_site_option( 'admin_email' ); 1505 1509 1506 1510 if ( $admin_email == '' ) 1507 $admin_email = 'support@' . $ _SERVER['SERVER_NAME'];1511 $admin_email = 'support@' . $current_site->domain; 1508 1512 1509 1513 $from_name = get_site_option( 'site_name' ) == '' ? 'WordPress' : esc_html( get_site_option( 'site_name' ) ); 1510 1514 $message_headers = "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n"; … … 1582 1586 $admin_email = get_site_option( 'admin_email' ); 1583 1587 1584 1588 if ( $admin_email == '' ) 1585 $admin_email = 'support@' . $ _SERVER['SERVER_NAME'];1589 $admin_email = 'support@' . $current_site->domain; 1586 1590 1587 1591 $from_name = get_site_option( 'site_name' ) == '' ? 'WordPress' : esc_html( get_site_option( 'site_name' ) ); 1588 1592 $message_headers = "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n"; -
wp-includes/pluggable.php
365 365 366 366 if ( !isset( $from_email ) ) { 367 367 // Get the site domain and get rid of www. 368 $sitename = strtolower( $_SERVER['SERVER_NAME'] ); 368 if ( is_multisite() ) { 369 global $current_blog; 370 $sitename = $current_blog->domain; 371 } else { 372 $sitename = parse_url( home_url(), PHP_URL_HOST ); 373 } 369 374 if ( substr( $sitename, 0, 4 ) == 'www.' ) { 370 375 $sitename = substr( $sitename, 4 ); 371 376 } … … 1390 1395 $notify_message .= sprintf( __('Spam it: %s'), admin_url("comment.php?action=spam&c=$comment_id") ) . "\r\n"; 1391 1396 } 1392 1397 1393 $wp_email = 'wordpress@' . preg_replace('#^www\.#', '', strtolower($_SERVER['SERVER_NAME'])); 1398 if ( is_multisite() ) { 1399 global $current_blog; 1400 $sitename = $current_blog->domain; 1401 } else { 1402 $sitename = parse_url( home_url(), PHP_URL_HOST ); 1403 } 1404 $wp_email = 'wordpress@' . preg_replace( '#^www\.#', '', $sitename ); 1394 1405 1395 1406 if ( '' == $comment->comment_author ) { 1396 1407 $from = "From: \"$blogname\" <$wp_email>";