summaryrefslogtreecommitdiffstats
path: root/wp-inst/wp-includes/comment.php
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2006-06-07 14:28:14 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2006-06-07 14:28:14 +0000
commit9d42ec4ee5db0437e9ad14b793f044fa0f5de8fe (patch)
treea0bb93e81f1856204377f936a97a8a285f77f2b7 /wp-inst/wp-includes/comment.php
parent16cdc878fce216364bd57f498baeeb1b94ca8662 (diff)
downloadwordpress-mu-9d42ec4ee5db0437e9ad14b793f044fa0f5de8fe.tar.gz
wordpress-mu-9d42ec4ee5db0437e9ad14b793f044fa0f5de8fe.tar.xz
wordpress-mu-9d42ec4ee5db0437e9ad14b793f044fa0f5de8fe.zip
WP Merge and new features
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@550 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-inst/wp-includes/comment.php')
-rw-r--r--wp-inst/wp-includes/comment.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/wp-inst/wp-includes/comment.php b/wp-inst/wp-includes/comment.php
index a5acdd3..931a8a5 100644
--- a/wp-inst/wp-includes/comment.php
+++ b/wp-inst/wp-includes/comment.php
@@ -60,7 +60,9 @@ function check_comment($author, $email, $url, $comment, $user_ip, $user_agent, $
function get_approved_comments($post_id) {
global $wpdb;
- return $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = $post_id AND comment_approved = '1' ORDER BY comment_date");
+
+ $post_id = (int) $post_id;
+ return $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = '$post_id' AND comment_approved = '1' ORDER BY comment_date");
}
// Retrieves comment data given a comment ID or comment object.