From 6b1830d0af77301f87f534a76ddf8bdfa6ab4267 Mon Sep 17 00:00:00 2001 From: michelvaldrighi Date: Tue, 30 Mar 2004 01:16:40 +0000 Subject: [PATCH] Tom Jones tunes remain the best weapons against Martians to this day -- big fixes here git-svn-id: http://svn.automattic.com/wordpress/trunk@1030 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-mail.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/wp-mail.php b/wp-mail.php index 5e31c00e10..89a1ecb97e 100644 --- a/wp-mail.php +++ b/wp-mail.php @@ -192,7 +192,7 @@ for ($iCount=1; $iCount<=$Count; $iCount++) { $blah = explode(':', $userpassstring); $user_login = $blah[0]; - $user_pass = $blah[1]; + $user_pass = md5($blah[1]); $content = $contentfirstline.str_replace($firstline, '', $content); $content = trim($content); @@ -227,9 +227,9 @@ for ($iCount=1; $iCount<=$Count; $iCount++) { $content = preg_replace("|\n([^\n])|", " $1", $content); $content = addslashes(trim($content)); if($flat > 500) { - $sql = "INSERT INTO $tableposts (post_author, post_date, post_date_gmt, post_content, post_title, post_category) VALUES ($post_author, '$post_date', '$post_date_gmt', '$content', '$post_title', $post_category)"; + $sql = "INSERT INTO $tableposts (post_author, post_date, post_date_gmt, post_content, post_title, post_modified, post_modified_gmt) VALUES ($post_author, '$post_date', '$post_date_gmt', '$content', '$post_title', '$post_date', '$post_date_gmt')"; } else { - $sql = "INSERT INTO $tableposts (post_author, post_date, post_date_gmt, post_content, post_title, post_category, post_lat, post_lon) VALUES ($post_author, '$post_date', '$post_date_gmt', '$content', '$post_title', $post_category, $flat, $flon)"; + $sql = "INSERT INTO $tableposts (post_author, post_date, post_date_gmt, post_content, post_title, post_modified, post_modified_gmt, post_lat, post_lon) VALUES ($post_author, '$post_date', '$post_date_gmt', '$content', '$post_title', '$post_date', '$post_date_gmt', $flat, $flon)"; } $result = $wpdb->query($sql); $post_ID = $wpdb->insert_id; @@ -252,6 +252,8 @@ for ($iCount=1; $iCount<=$Count; $iCount++) { if (!$post_categories) $post_categories[] = 1; foreach ($post_categories as $post_category) { + $post_category = intval($post_category); + // Double check it's not there already $exists = $wpdb->get_row("SELECT * FROM $tablepost2cat WHERE post_id = $post_ID AND category_id = $post_category");