diff options
| author | Nick Palmer <nick@sluggardy.net> | 2008-01-12 14:47:27 +0000 |
|---|---|---|
| committer | Nick Palmer <nick@sluggardy.net> | 2008-01-12 14:47:27 +0000 |
| commit | 3943ba4588e64128d5de89a2be0b8e9098db9a32 (patch) | |
| tree | 049d212e5f7e4b389b91e77f4cc5ddf10836e5ad /admin | |
| parent | d2723bfd80b48ba8dc88d1ff67d93c744069a149 (diff) | |
| download | blogs-3943ba4588e64128d5de89a2be0b8e9098db9a32.tar.gz blogs-3943ba4588e64128d5de89a2be0b8e9098db9a32.tar.bz2 blogs-3943ba4588e64128d5de89a2be0b8e9098db9a32.zip | |
Remove double creation of posts. Don't know how that got in there.
Diffstat (limited to 'admin')
| -rw-r--r-- | admin/wp-migrate.php | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/admin/wp-migrate.php b/admin/wp-migrate.php index 940194f..dc25876 100644 --- a/admin/wp-migrate.php +++ b/admin/wp-migrate.php @@ -256,44 +256,6 @@ function migrate_wp_posts() { } } - if (!empty($posts)) { - foreach ($posts as $post) { - $pParamHash = array(); - $pParamHash['data'] = wptexturize(convert_chars(wpautop($post->post_content))); - $pParamHash['title'] = $post->post_title; - if ($post->post_status == 'draft') { - $pParamHash['content_status'] = -5; - } - else { - $pParamHash['content_status'] = 50; - } - $pParamHash['publish_date'] = $gBitSystem->mServerTimestamp->getTimestampFromIso($post->post_date_gmt); - $pParamHash['last_modified'] = $gBitSystem->mServerTimestamp->getTimestampFromIso($post->post_modified_gmt); - $pParamHash['expire_date'] = NULL; - if (empty($gUserMap[$post->post_author])) { - $pParamHash['owner_id'] = 1; - $gErrorMap[]['warning'] = "Blog Post: " . $pParamHash['title'] . " author defaulted to Administrator."; - } - else { - $pParamHash['owner_id'] = $gUserMap[$post->post_author]; - $pParamHash['current_owner_id'] = -1; - } - - // TODO: Check attachments - - $bp = new BitBlogPost(); - $bp->store($pParamHash); - if (empty($bp->mErrors)) { - $gPostMap[$post->ID] = $bp->mContentId; - $query = "UPDATE liberty_content SET created = ? WHERE content_id = ?"; - $gBitSystem->mDb->query($query, array($pParamHash['publish_date'], $bp->mContentId)); - } - else { - $pErrorMap[]['error'] = "Blog Post: " . $pParamHash['title'] . " had errors " . implode(", ", $bp->mErrors); - } - } - } - $sql = "INSERT INTO `".BIT_DB_PREFIX."blogs_wp_posts` (`wp_id`, `post_id`) VALUES (?, ?)"; foreach($gPostMap as $wp_id => $post_id) { if ($wp_id > $gMaxPost) { |
