From 12de05107e4c8b006bde6ee8916f34eb476d08da Mon Sep 17 00:00:00 2001 From: donncha Date: Fri, 13 Jun 2008 17:21:00 +0000 Subject: WP Merge with revision 8075 git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1328 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- wp-admin/upload.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'wp-admin/upload.php') diff --git a/wp-admin/upload.php b/wp-admin/upload.php index 0f7412d..cf6c191 100644 --- a/wp-admin/upload.php +++ b/wp-admin/upload.php @@ -125,6 +125,7 @@ endif; ?>

+

@@ -211,7 +212,7 @@ if ( $page_links ) if ( 1 == count($posts) && is_singular() ) : - $comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = $id AND comment_approved != 'spam' ORDER BY comment_date"); + $comments = $wpdb->get_results( $wpdb->prepare("SELECT * FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_approved != 'spam' ORDER BY comment_date", $id) ); if ( $comments ) : // Make sure comments, post, and post_author are cached update_comment_cache($comments); -- cgit