Changeset 1487
- Timestamp:
- 07/27/2004 03:04:37 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/wp-mail.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-mail.php
r1484 r1487 7 7 8 8 $time_difference = get_settings('gmt_offset') * 3600; 9 10 $phone_delim = get_settings('use_phoneemail'); 11 if (empty($phone_delim)) $phone_delim = '::'; 9 12 10 13 $pop3 = new POP3(); … … 60 63 $subject = wp_iso_descrambler($subject); 61 64 } 62 // Captures any text in the subject before ::as the subject63 $subject = explode( '::', $subject);65 // Captures any text in the subject before $phone_delim as the subject 66 $subject = explode($phone_delim, $subject); 64 67 $subject = $subject[0]; 65 66 68 } 67 69 if (preg_match('/Date: /i', $line)) { // of the form '20 Mar 2002 20:32:37' … … 81 83 $ddate_d = $date_arr[0]; 82 84 $ddate_Y = $date_arr[2]; 83 84 85 for ($j=0; $j<12; $j++) { 85 86 if ($ddate_m == $dmonths[$j]) { … … 89 90 90 91 $time_zn = intval($date_arr[4]) * 36; 91 if ( $time_zn < 0 ) { 92 if (abs($time_difference) > abs($time_zn)) { 93 $time_zn = abs($time_difference) - abs($time_zn); 94 } else { 95 $time_zn = abs($time_zn) - abs($time_difference); 96 } 97 } else { 98 $time_zn = abs($time_zn) + abs($time_difference); 99 } 100 101 $ddate_U = mktime($ddate_H, $ddate_i, $ddate_s, $ddate_m, $ddate_d, $ddate_Y); 92 $ddate_U = gmmktime($ddate_H, $ddate_i, $ddate_s, $ddate_m, $ddate_d, $ddate_Y); 102 93 $ddate_U = $ddate_U - $time_zn; 103 94 $post_date = gmdate('Y-m-d H:i:s', $ddate_U + $time_difference); … … 116 107 } 117 108 $content = trim($content); 118 // Captures any text in the body after ::as the body119 $content = explode( '::', $content);120 $content = $content[1];109 // Captures any text in the body after $phone_delim as the body 110 $content = explode($phone_delim, $content); 111 $content[1] ? $content = $content[1] : $content = $content[0]; 121 112 122 113 echo "<p><b>Content-type:</b> $content_type, <b>boundary:</b> $boundary</p>\n"; … … 138 129 $content = preg_replace("|\n([^\n])|", " $1", $content); 139 130 $content = addslashes(trim($content)); 140 141 131 142 132 $sql = "INSERT INTO $wpdb->posts (post_author, post_date, post_date_gmt, post_content, post_title, post_name, post_modified, post_modified_gmt) VALUES (1, '$post_date', '$post_date_gmt', '$content', '$post_title', '$post_name', '$post_date', '$post_date_gmt')";
Note: See TracChangeset
for help on using the changeset viewer.