Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Give wp-mail a little love.

git-svn-id: http://svn.automattic.com/wordpress/trunk@2960 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information...
commit df89b36156ef3a9fdf933ccb8037f4ba855c8346 1 parent 54d4d7f
ryan authored
Showing with 1 addition and 17 deletions.
  1. +1 −17 wp-mail.php
View
18 wp-mail.php
@@ -136,6 +136,7 @@
$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 @@
echo "\n<p><b>Posted title:</b> $post_title<br />";
echo "\n<b>Posted content:</b><br /><pre>".$content.'</pre></p>';
- 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 '<p>Oops '.$pop3->ERROR.'</p></div>';
$pop3->reset();

0 comments on commit df89b36

Please sign in to comment.
Something went wrong with that request. Please try again.