From dd54ce2ad63c06a4d9d22e9ca8a0f84d20b4470f Mon Sep 17 00:00:00 2001 From: saxmatt Date: Fri, 11 Feb 2005 02:44:38 +0000 Subject: [PATCH] Blogger import fix - http://mosquito.wordpress.org/view.php?id=365 git-svn-id: http://svn.automattic.com/wordpress/trunk@2265 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/import-blogger.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/wp-admin/import-blogger.php b/wp-admin/import-blogger.php index ceff823a92..2098d4da59 100644 --- a/wp-admin/import-blogger.php +++ b/wp-admin/import-blogger.php @@ -50,7 +50,7 @@ case "step1": $posts = explode('', $archive); - for ($i = 1; $i < (count($posts)+1); $i = $i + 1) { + for ($i = 1; $i < count($posts); $i = $i + 1) { $postinfo = explode('|||', $posts[$i]); $post_date = $postinfo[0]; @@ -119,6 +119,8 @@ case "step1": if (($post_date[2] == 'PM') && ($posthour != '12')) $posthour = $posthour + 12; + else if (($post_date[2] == 'AM') && ($posthour == '12')) + $posthour = '00'; $post_date = "$postyear-$postmonth-$postday $posthour:$postminute:$postsecond"; @@ -149,10 +151,6 @@ case "step1": }} } - /* we've still got a bug that adds some empty posts with the date 0000-00-00 00:00:00 - here's the bugfix: */ - $result = $wpdb->query("DELETE FROM $wpdb->posts WHERE post_date=\"0000-00-00 00:00:00\""); - upgrade_all(); ?>