From 5c8b016bf3083a1aaae911e48220f3b23f1b8772 Mon Sep 17 00:00:00 2001 From: alex_t_king Date: Mon, 5 Jan 2004 01:43:01 +0000 Subject: [PATCH] fixing extra calendar cells bug git-svn-id: http://svn.automattic.com/wordpress/trunk@716 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/template-functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/template-functions.php b/wp-includes/template-functions.php index 14906e63d..ab862a017 100644 --- a/wp-includes/template-functions.php +++ b/wp-includes/template-functions.php @@ -458,7 +458,7 @@ function get_calendar($daylength = 1) { } $pad = 7 - date('w', mktime(0, 0 , 0, $thismonth, $day, $thisyear)); - if (0 != $pad) + if ($pad != 0 && $pad != 7) echo "\n\t\t "; echo "\n\t\n\t\n\t"; @@ -1591,7 +1591,7 @@ function comments_popup_script($width=400, $height=400, $file='wp-comments-popup function comments_popup_link($zero='No Comments', $one='1 Comment', $more='% Comments', $CSSclass='', $none='Comments Off') { global $id, $wpcommentspopupfile, $wpcommentsjavascript, $post, $wpdb, $tablecomments, $HTTP_COOKIE_VARS, $cookiehash; global $querystring_start, $querystring_equal, $querystring_separator, $siteurl; - $number = $wpdb->get_var("SELECT COUNT(*) FROM $tablecomments WHERE comment_post_ID = $id AND comment_approved = '1';"); + $number = $wpdb->get_var("SELECT COUNT(comment_ID) FROM $tablecomments WHERE comment_post_ID = $id AND comment_approved = '1';"); if (0 == $number && 'closed' == $post->comment_status && 'closed' == $post->ping_status) { echo $none; return;