mirror of
git://develop.git.wordpress.org/
synced 2025-01-19 05:38:07 +01:00
Blogger import fix - http://mosquito.wordpress.org/view.php?id=365
git-svn-id: https://develop.svn.wordpress.org/trunk@2265 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
ff4bdeb94a
commit
09a5bc663a
@ -50,7 +50,7 @@ case "step1":
|
||||
|
||||
$posts = explode('<wordpresspost>', $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();
|
||||
?>
|
||||
</ul>
|
||||
|
Loading…
x
Reference in New Issue
Block a user