fixing extra calendar cells bug

git-svn-id: http://svn.automattic.com/wordpress/trunk@716 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
alex_t_king 2004-01-05 01:43:01 +00:00
parent 7f90eaf4c4
commit 5c8b016bf3
1 changed files with 2 additions and 2 deletions

View File

@ -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<td class='pad' colspan='$pad'>&nbsp;</td>";
echo "\n\t</tr>\n\t</tbody>\n\t</table>";
@ -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;