Changeset 1355 for trunk/wp-includes/template-functions-comment.php
- Timestamp:
- 05/24/2004 08:22:18 AM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/template-functions-comment.php
r1255 r1355 27 27 28 28 function comments_number($zero='No Comments', $one='1 Comment', $more='% Comments', $number='') { 29 global $id, $comment, $ tablecomments, $wpdb, $comment_count_cache;30 if ('' == $comment_count_cache["$id"]) $number = $wpdb->get_var("SELECT COUNT(*) FROM $ tablecomments WHERE comment_post_ID = $id AND comment_approved = '1'");29 global $id, $comment, $wpdb, $comment_count_cache; 30 if ('' == $comment_count_cache["$id"]) $number = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->comments WHERE comment_post_ID = $id AND comment_approved = '1'"); 31 31 else $number = $comment_count_cache["$id"]; 32 32 if ($number == 0) { … … 57 57 58 58 function comments_popup_link($zero='No Comments', $one='1 Comment', $more='% Comments', $CSSclass='', $none='Comments Off') { 59 global $id, $wpcommentspopupfile, $wpcommentsjavascript, $post, $wpdb, $ tablecomments, $cookiehash;59 global $id, $wpcommentspopupfile, $wpcommentsjavascript, $post, $wpdb, $cookiehash; 60 60 global $querystring_start, $querystring_equal, $querystring_separator; 61 61 global $comment_count_cache, $single; 62 62 if (!$single) { 63 63 if ('' == $comment_count_cache["$id"]) { 64 $number = $wpdb->get_var("SELECT COUNT(comment_ID) FROM $ tablecomments WHERE comment_post_ID = $id AND comment_approved = '1';");64 $number = $wpdb->get_var("SELECT COUNT(comment_ID) FROM $wpdb->comments WHERE comment_post_ID = $id AND comment_approved = '1';"); 65 65 } else { 66 66 $number = $comment_count_cache["$id"];
Note: See TracChangeset
for help on using the changeset viewer.