[wp-cvs] wordpress wp-mail.php,1.17,1.18
Ryan Boren
rboren at users.sourceforge.net
Tue Jul 27 15:04:39 UTC 2004
Update of /cvsroot/cafelog/wordpress
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11994
Modified Files:
wp-mail.php
Log Message:
More wp-mail timezone and delimiter fixes from Kitten.
Index: wp-mail.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-mail.php,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** wp-mail.php 26 Jul 2004 15:57:32 -0000 1.17
--- wp-mail.php 27 Jul 2004 15:04:37 -0000 1.18
***************
*** 8,11 ****
--- 8,14 ----
$time_difference = get_settings('gmt_offset') * 3600;
+ $phone_delim = get_settings('use_phoneemail');
+ if (empty($phone_delim)) $phone_delim = '::';
+
$pop3 = new POP3();
***************
*** 60,67 ****
$subject = wp_iso_descrambler($subject);
}
! // Captures any text in the subject before :: as the subject
! $subject = explode('::', $subject);
$subject = $subject[0];
-
}
if (preg_match('/Date: /i', $line)) { // of the form '20 Mar 2002 20:32:37'
--- 63,69 ----
$subject = wp_iso_descrambler($subject);
}
! // Captures any text in the subject before $phone_delim as the subject
! $subject = explode($phone_delim, $subject);
$subject = $subject[0];
}
if (preg_match('/Date: /i', $line)) { // of the form '20 Mar 2002 20:32:37'
***************
*** 81,85 ****
$ddate_d = $date_arr[0];
$ddate_Y = $date_arr[2];
-
for ($j=0; $j<12; $j++) {
if ($ddate_m == $dmonths[$j]) {
--- 83,86 ----
***************
*** 89,103 ****
$time_zn = intval($date_arr[4]) * 36;
! if ( $time_zn < 0 ) {
! if (abs($time_difference) > abs($time_zn)) {
! $time_zn = abs($time_difference) - abs($time_zn);
! } else {
! $time_zn = abs($time_zn) - abs($time_difference);
! }
! } else {
! $time_zn = abs($time_zn) + abs($time_difference);
! }
!
! $ddate_U = mktime($ddate_H, $ddate_i, $ddate_s, $ddate_m, $ddate_d, $ddate_Y);
$ddate_U = $ddate_U - $time_zn;
$post_date = gmdate('Y-m-d H:i:s', $ddate_U + $time_difference);
--- 90,94 ----
$time_zn = intval($date_arr[4]) * 36;
! $ddate_U = gmmktime($ddate_H, $ddate_i, $ddate_s, $ddate_m, $ddate_d, $ddate_Y);
$ddate_U = $ddate_U - $time_zn;
$post_date = gmdate('Y-m-d H:i:s', $ddate_U + $time_difference);
***************
*** 116,122 ****
}
$content = trim($content);
! // Captures any text in the body after :: as the body
! $content = explode('::', $content);
! $content = $content[1];
echo "<p><b>Content-type:</b> $content_type, <b>boundary:</b> $boundary</p>\n";
--- 107,113 ----
}
$content = trim($content);
! // Captures any text in the body after $phone_delim as the body
! $content = explode($phone_delim, $content);
! $content[1] ? $content = $content[1] : $content = $content[0];
echo "<p><b>Content-type:</b> $content_type, <b>boundary:</b> $boundary</p>\n";
***************
*** 139,143 ****
$content = addslashes(trim($content));
-
$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')";
--- 130,133 ----
More information about the cvs
mailing list