fixing extra calendar cells bug
git-svn-id: https://develop.svn.wordpress.org/trunk@716 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
beecaecc46
commit
fc1fbafc58
|
@ -458,7 +458,7 @@ function get_calendar($daylength = 1) {
|
||||||
}
|
}
|
||||||
|
|
||||||
$pad = 7 - date('w', mktime(0, 0 , 0, $thismonth, $day, $thisyear));
|
$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'> </td>";
|
echo "\n\t\t<td class='pad' colspan='$pad'> </td>";
|
||||||
|
|
||||||
echo "\n\t</tr>\n\t</tbody>\n\t</table>";
|
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') {
|
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 $id, $wpcommentspopupfile, $wpcommentsjavascript, $post, $wpdb, $tablecomments, $HTTP_COOKIE_VARS, $cookiehash;
|
||||||
global $querystring_start, $querystring_equal, $querystring_separator, $siteurl;
|
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) {
|
if (0 == $number && 'closed' == $post->comment_status && 'closed' == $post->ping_status) {
|
||||||
echo $none;
|
echo $none;
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue