Ticket #2603: 2603.diff
| File 2603.diff, 1.9 kB (added by Nazgul, 2 years ago) |
|---|
-
wp-includes/pluggable.php
old new 160 160 161 161 if ( !function_exists('wp_mail') ) : 162 162 function wp_mail($to, $subject, $message, $headers = '') { 163 global $is_Windows, $is_Mac; 164 165 if ($is_Windows) { 166 $s_eol = "\r\n"; 167 $bad_eol_sequences = array("'\r[^\n]'","'[^\r]\n'"); 168 } elseif ($is_Mac) { 169 $s_eol = "\r"; 170 $bad_eol_sequences = array("'\r\n'","'[^\r]\n'"); 171 } else { 172 $s_eol = "\n"; 173 $bad_eol_sequences = array("'\r\n'","'\r[^\n]'"); 174 } 175 163 176 if( $headers == '' ) { 164 $headers = "MIME-Version: 1.0 \n".165 "From: wordpress@" . preg_replace('#^www\.#', '', strtolower($_SERVER['SERVER_NAME'])) . "\n".166 "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\" \n";177 $headers = "MIME-Version: 1.0" . $s_eol . 178 "From: wordpress@" . preg_replace('#^www\.#', '', strtolower($_SERVER['SERVER_NAME'])) . $s_eol . 179 "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"" . $s_eol; 167 180 } 181 else 182 $headers = preg_replace($bad_eol_sequences, $s_eol, $headers); 183 184 $message = preg_replace($bad_eol_sequences, $s_eol, $message); 168 185 169 186 return @mail($to, $subject, $message, $headers); 170 187 } -
wp-includes/vars.php
old new 34 34 $is_apache = ( strstr($_SERVER['SERVER_SOFTWARE'], 'Apache') || strstr($_SERVER['SERVER_SOFTWARE'], 'LiteSpeed') ) ? 1 : 0; 35 35 $is_IIS = strstr($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS') ? 1 : 0; 36 36 37 $is_Windows = 'WIN' == strtoupper(substr(PHP_OS, 0, 3) ? 1 : 0; 38 $is_Mac = 'MAC' == strtoupper(substr(PHP_OS, 0, 3) ? 1 : 0; 39 37 40 // if the config file does not provide the smilies array, let's define it here 38 41 if (!isset($wpsmiliestrans)) { 39 42 $wpsmiliestrans = array(
