Make WordPress Core


Ignore:
Timestamp:
02/11/2005 02:44:38 AM (21 years ago)
Author:
saxmatt
Message:

Blogger import fix - http://mosquito.wordpress.org/view.php?id=365

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/import-blogger.php

    r1429 r2265  
    5151            $posts = explode('<wordpresspost>', $archive);
    5252
    53             for ($i = 1; $i < (count($posts)+1); $i = $i + 1) {
     53            for ($i = 1; $i < count($posts); $i = $i + 1) {
    5454
    5555            $postinfo = explode('|||', $posts[$i]);
     
    120120            if (($post_date[2] == 'PM') && ($posthour != '12'))
    121121                $posthour = $posthour + 12;
     122            else if (($post_date[2] == 'AM') && ($posthour == '12'))
     123                $posthour = '00';
    122124
    123125            $post_date = "$postyear-$postmonth-$postday $posthour:$postminute:$postsecond";
     
    150152    }
    151153
    152     /* we've still got a bug that adds some empty posts with the date 0000-00-00 00:00:00
    153        here's the bugfix: */
    154     $result = $wpdb->query("DELETE FROM $wpdb->posts WHERE post_date=\"0000-00-00 00:00:00\"");
    155 
    156154    upgrade_all();
    157155    ?>
Note: See TracChangeset for help on using the changeset viewer.