From a2a0f6031e1e4b7d86ef937d760f5942e81f5d5a Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Thu, 20 Oct 2005 21:20:52 +0000 Subject: [PATCH] Give wp-mail a little love. git-svn-id: https://develop.svn.wordpress.org/trunk@2960 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-mail.php | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/wp-mail.php b/wp-mail.php index a106e66aed..0978952ec6 100644 --- a/wp-mail.php +++ b/wp-mail.php @@ -136,6 +136,7 @@ for ($i=1; $i <= $count; $i++) : $post_status = 'publish'; $post_data = compact('post_content','post_title','post_date','post_date_gmt','post_author','post_category', 'post_status'); + $post_data = add_magic_quotes($post_data); $post_ID = wp_insert_post($post_data); @@ -150,23 +151,6 @@ for ($i=1; $i <= $count; $i++) : echo "\n

Posted title: $post_title
"; echo "\nPosted content:

".$content.'

'; - 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 $wpdb->post2cat WHERE post_id = $post_ID AND category_id = $post_category"); - - if (!$exists && $result) { - $wpdb->query(" - INSERT INTO $wpdb->post2cat - (post_id, category_id) - VALUES - ($post_ID, $post_category) - "); - } - endforeach; - if(!$pop3->delete($i)) { echo '

Oops '.$pop3->ERROR.'

'; $pop3->reset();