From 600b71019494e1c29898a620e58c0d2602f37b74 Mon Sep 17 00:00:00 2001 From: donncha Date: Fri, 24 Nov 2006 16:16:44 +0000 Subject: WP Merge to 4524 git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@810 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- wp-admin/export.php | 55 +++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 47 insertions(+), 8 deletions(-) (limited to 'wp-admin/export.php') diff --git a/wp-admin/export.php b/wp-admin/export.php index f50b8e0..8f740fc 100644 --- a/wp-admin/export.php +++ b/wp-admin/export.php @@ -15,6 +15,25 @@ require_once ('admin-header.php');

+

+ + + + + + +
+ +

@@ -26,17 +45,35 @@ require_once ('admin-header.php'); get_results("SELECT * FROM $wpdb->posts ORDER BY post_date_gmt ASC"); +header('Content-type: text/wxr+xml; charset=' . get_option('blog_charset'), true); + +$where = ''; +if ( isset( $_GET['author'] ) && $_GET['author'] != 'all' ) { + $author_id = (int) $_GET['author']; + $where = " WHERE post_author = '$author_id' "; +} + +$posts = $wpdb->get_results("SELECT * FROM $wpdb->posts $where ORDER BY post_date_gmt ASC"); ?> + + + + + + + + + + -get_results("SELECT * FROM $wpdb->posts ORDER BY post_date_gmt A post_content ?>]]> +ID; ?> post_date; ?> post_date_gmt; ?> comment_status; ?> @@ -71,7 +109,7 @@ $posts = $wpdb->get_results("SELECT * FROM $wpdb->posts ORDER BY post_date_gmt A post_parent; ?> post_type; ?> get_results("SELECT * FROM $wpdb->postmeta WHERE post_id = $post->ID"); +$postmeta = $wpdb->get_results("SELECT * FROM $wpdb->postmeta WHERE post_id = $post->ID"); if ( $postmeta ) { ?> @@ -82,9 +120,10 @@ if ( $postmeta ) { get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = $post->ID"); +$comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = $post->ID"); if ( $comments ) { foreach ( $comments as $c ) { ?> +comment_ID; ?> comment_author; ?> comment_author_email; ?> comment_author_url; ?> -- cgit