Make WordPress Core

Changeset 716


Ignore:
Timestamp:
01/05/2004 01:43:01 AM (23 years ago)
Author:
alex_t_king
Message:

fixing extra calendar cells bug

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/template-functions.php

    r713 r716  
    459459
    460460        $pad = 7 - date('w', mktime(0, 0 , 0, $thismonth, $day, $thisyear));
    461         if (0 != $pad)
     461        if ($pad != 0 && $pad != 7)
    462462                echo "\n\t\t<td class='pad' colspan='$pad'>&nbsp;</td>";
    463463
    … …  
    15921592        global $id, $wpcommentspopupfile, $wpcommentsjavascript, $post, $wpdb, $tablecomments, $HTTP_COOKIE_VARS, $cookiehash;
    15931593        global $querystring_start, $querystring_equal, $querystring_separator, $siteurl;
    1594         $number = $wpdb->get_var("SELECT COUNT(*) FROM $tablecomments WHERE comment_post_ID = $id AND comment_approved = '1';");
     1594        $number = $wpdb->get_var("SELECT COUNT(comment_ID) FROM $tablecomments WHERE comment_post_ID = $id AND comment_approved = '1';");
    15951595        if (0 == $number && 'closed' == $post->comment_status && 'closed' == $post->ping_status) {
    15961596                echo $none;
Note: See TracChangeset for help on using the changeset viewer.