Make WordPress Core

Changeset 406 for trunk/b2calendar.php


Ignore:
Timestamp:
10/03/2003 03:23:10 AM (23 years ago)
Author:
alex_t_king
Message:

added checks for future posts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/b2calendar.php

    r365 r406  
    128128$calendarmonthwithpost = 0;
    129129while($calendarmonthwithpost == 0) {
    130         $arc_sql="SELECT DISTINCT YEAR(post_date), MONTH(post_date), DAYOFMONTH(post_date) AS dom FROM $tableposts WHERE MONTH(post_date) = '$thismonth' AND YEAR(post_date) = '$thisyear' AND post_status = 'publish' ORDER BY post_date DESC";
     130        $arc_sql="SELECT DISTINCT YEAR(post_date), MONTH(post_date), DAYOFMONTH(post_date) AS dom "
     131            ."FROM $tableposts "
     132            ."WHERE MONTH(post_date) = '$thismonth' "
     133            ."AND YEAR(post_date) = '$thisyear' "
     134                ."AND post_date < '".date("Y-m-d H:i:s")."' "
     135            ."AND post_status = 'publish' "
     136            ."ORDER BY post_date DESC";
    131137        $querycount++;
    132138    $arc_results = $wpdb->get_results($arc_sql);
     
    209215// original tooltip hack by Alex King
    210216if ($ak_use_tooltip_titles == 1) {
    211         $ak_days_result = $wpdb->get_results("SELECT post_title, post_date FROM $tableposts WHERE YEAR(post_date) = '$thisyear' AND MONTH(post_date) = '$thismonth' AND post_status = 'publish'");
     217        $ak_days_result = $wpdb->get_results("SELECT post_title, post_date "
     218                                            ."FROM $tableposts "
     219                                            ."WHERE YEAR(post_date) = '$thisyear' "
     220                                            ."AND MONTH(post_date) = '$thismonth' "
     221                                            ."AND post_date < '".date("Y-m-d H:i:s")."' "
     222                                            ."AND post_status = 'publish'"
     223                                            );
    212224
    213225        $ak_day_title_array = array();
Note: See TracChangeset for help on using the changeset viewer.