From 5624ca0f6cc15b2f571b26377f289ffe0974c152 Mon Sep 17 00:00:00 2001 From: saxmatt Date: Tue, 13 Jan 2004 09:23:41 +0000 Subject: [PATCH] Fix ups. git-svn-id: http://svn.automattic.com/wordpress/trunk@771 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/edit-form-comment.php | 2 +- wp-login.php | 2 +- wp-mail.php | 27 ++++++++++++++++++++------- 3 files changed, 22 insertions(+), 9 deletions(-) diff --git a/wp-admin/edit-form-comment.php b/wp-admin/edit-form-comment.php index 0d80de96ae..ce43e54947 100644 --- a/wp-admin/edit-form-comment.php +++ b/wp-admin/edit-form-comment.php @@ -100,5 +100,5 @@ if ($user_level > 4) { ?> - +

Delete this comment.

diff --git a/wp-login.php b/wp-login.php index 6de3d8f52d..695d63dd92 100644 --- a/wp-login.php +++ b/wp-login.php @@ -200,7 +200,6 @@ if ($error) echo "
0) { $post_title = xmlrpc_getposttitle($content); - $post_category = xmlrpc_getpostcategory($content); + $post_categories[] = xmlrpc_getpostcategory($content); if ($post_title == '') { $post_title = $subject; } - if ($post_category == '') { - $post_category = $default_category; + if (empty($post_categories)) { + $post_categories[] = $default_category; } if (!$thisisforfunonly) { $post_title = addslashes(trim($post_title)); + $content = preg_replace("|\n([^\n])|", " $1", $content); $content = addslashes(trim($content)); if($flat > 500) { $sql = "INSERT INTO $tableposts (post_author, post_date, post_content, post_title, post_category) VALUES ($post_author, '$post_date', '$content', '$post_title', $post_category)"; @@ -237,17 +238,29 @@ for ($iCount=1; $iCount<=$Count; $iCount++) { if($flat < 500) { pingGeoUrl($post_ID); } - // HACK HACK HACK this next line is commented out because I don't know what the word-press replacement - // is. right now it's undefined and does not work - //rss_update($blog_ID); + pingWeblogs($blog_ID); - pingCafelog($cafelogID, $post_title, $post_ID); pingBlogs($blog_ID); pingback($content, $post_ID); } echo "\n

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

".$content.'

'; + if (!$post_categories) $post_categories[] = 1; + foreach ($post_categories as $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"); + + if (!$exists && $result) { + $wpdb->query(" + INSERT INTO $tablepost2cat + (post_id, category_id) + VALUES + ($post_ID, $post_category) + "); + } + } + if(!$pop3->delete($iCount)) { echo '

Oops '.$pop3->ERROR.'

'; $pop3->reset();