Export file content type fixups from mdawaffe. fixes #3080

git-svn-id: http://svn.automattic.com/wordpress/trunk@4563 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2006-12-01 00:11:43 +00:00
parent 162dcec906
commit bdb9f687b5
1 changed files with 13 additions and 8 deletions

View File

@ -49,9 +49,8 @@ global $wpdb, $posts, $post;
$filename = 'wordpress.' . date('Y-m-d') . '.xml';
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header("Content-Disposition: attachment; filename=$filename");
header('Content-type: text/wxr+xml; charset=' . get_option('blog_charset'), true);
header('Content-type: text/xml; charset=' . get_option('blog_charset'), true);
$where = '';
if ( isset( $_GET['author'] ) && $_GET['author'] != 'all' ) {
@ -126,12 +125,18 @@ function wxr_category_description($c) {
<!-- This is a WordPress eXtended RSS file generated by WordPress as an export of your blog. -->
<!-- It contains information about your blog's posts, comments, and categories. -->
<!-- You may use this file to transfer that content from one site to another. -->
<!-- To import this information into a WordPress blog, -->
<!-- 1. Log into that blog as an administrator -->
<!-- 2. Go to Manage: Import in the blog's admin panels -->
<!-- 3. Choose "WordPress" from the list -->
<!-- 4. Upload this file using the form provided on that page -->
<!-- You will be taken through the simple import procedure. -->
<!-- This file is not intended to serve as a complete backup of your blog. -->
<!-- To import this information into a WordPress blog follow these steps. -->
<!-- 1. Log into that blog as an administrator. -->
<!-- 2. Go to Manage: Import in the blog's admin panels. -->
<!-- 3. Choose "WordPress" from the list. -->
<!-- 4. Upload this file using the form provided on that page. -->
<!-- 5. You will first be asked to map the authors in this export file to users -->
<!-- on the blog. For each author, you may choose to map to an -->
<!-- existing user on the blog or to create a new user -->
<!-- 6. WordPress will then import each of the posts, comments, and categories -->
<!-- contained in this file into your blog -->
<!-- generator="wordpress/<?php bloginfo_rss('version') ?>" created="<?php echo date('Y-m-d H:m'); ?>"-->
<rss version="2.0"