diff options
| author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2008-06-13 17:21:00 +0000 |
|---|---|---|
| committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2008-06-13 17:21:00 +0000 |
| commit | 12de05107e4c8b006bde6ee8916f34eb476d08da (patch) | |
| tree | 123ee54ecd1f3f777373b7df54a4604012d43640 /wp-admin/includes/export.php | |
| parent | e51c7a9ca4bfdb45fa3ec7334bd33871e78c68b1 (diff) | |
| download | wordpress-mu-12de05107e4c8b006bde6ee8916f34eb476d08da.tar.gz wordpress-mu-12de05107e4c8b006bde6ee8916f34eb476d08da.tar.xz wordpress-mu-12de05107e4c8b006bde6ee8916f34eb476d08da.zip | |
WP Merge with revision 8075
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1328 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-admin/includes/export.php')
| -rw-r--r-- | wp-admin/includes/export.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/wp-admin/includes/export.php b/wp-admin/includes/export.php index 5590826..00201fa 100644 --- a/wp-admin/includes/export.php +++ b/wp-admin/includes/export.php @@ -17,7 +17,7 @@ header('Content-Type: text/xml; charset=' . get_option('blog_charset'), true); $where = ''; if ( $author and $author != 'all' ) { $author_id = (int) $author; - $where = " WHERE post_author = '$author_id' "; + $where = $wpdb->prepare(" WHERE post_author = %d ", $author_id); } // grab a snapshot of post IDs, just in case it changes during the export @@ -201,6 +201,7 @@ echo '<?xml version="1.0" encoding="' . get_bloginfo('charset') . '"?' . ">\n"; <guid isPermaLink="false"><?php the_guid(); ?></guid> <description></description> <content:encoded><?php echo wxr_cdata( apply_filters('the_content_export', $post->post_content) ); ?></content:encoded> +<excerpt:encoded><?php echo wxr_cdata( apply_filters('the_excerpt_export', $post->post_excerpt) ); ?></excerpt:encoded> <wp:post_id><?php echo $post->ID; ?></wp:post_id> <wp:post_date><?php echo $post->post_date; ?></wp:post_date> <wp:post_date_gmt><?php echo $post->post_date_gmt; ?></wp:post_date_gmt> @@ -217,7 +218,7 @@ if ($post->post_type == 'attachment') { ?> <wp:attachment_url><?php echo wp_get_attachment_url($post->ID); ?></wp:attachment_url> <?php } ?> <?php -$postmeta = $wpdb->get_results("SELECT * FROM $wpdb->postmeta WHERE post_id = $post->ID"); +$postmeta = $wpdb->get_results( $wpdb->prepare("SELECT * FROM $wpdb->postmeta WHERE post_id = %d", $post->ID) ); if ( $postmeta ) { ?> <?php foreach( $postmeta as $meta ) { ?> @@ -228,7 +229,7 @@ if ( $postmeta ) { <?php } ?> <?php } ?> <?php -$comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = $post->ID"); +$comments = $wpdb->get_results( $wpdb->prepare("SELECT * FROM $wpdb->comments WHERE comment_post_ID = %d", $post->ID) ); if ( $comments ) { foreach ( $comments as $c ) { ?> <wp:comment> <wp:comment_id><?php echo $c->comment_ID; ?></wp:comment_id> |
