From 3a4570b0fc8b3d6339bef71d17d7701554e0bbf7 Mon Sep 17 00:00:00 2001 From: donncha Date: Fri, 12 Oct 2007 16:21:15 +0000 Subject: Merge with WP 2.3 - testing use only! Move pluggable functions out of wpmu-functions and into pluggable.php, fixes #439 git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1069 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- wp-admin/import/rss.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'wp-admin/import/rss.php') diff --git a/wp-admin/import/rss.php b/wp-admin/import/rss.php index f46caa1..11fc770 100644 --- a/wp-admin/import/rss.php +++ b/wp-admin/import/rss.php @@ -110,6 +110,8 @@ class RSS_Import { _e('Post already imported'); } else { $post_id = wp_insert_post($post); + if ( is_wp_error( $post_id ) ) + return $post_id; if (!$post_id) { _e("Couldn't get post ID"); return; @@ -135,7 +137,9 @@ class RSS_Import { $this->file = $file['file']; $this->get_posts(); - $this->import_posts(); + $result = $this->import_posts(); + if ( is_wp_error( $result ) ) + return $result; wp_import_cleanup($file['id']); echo '

'; @@ -157,7 +161,9 @@ class RSS_Import { break; case 1 : check_admin_referer('import-upload'); - $this->import(); + $result = $this->import(); + if ( is_wp_error( $result ) ) + echo $result->get_error_message(); break; } -- cgit