Ticket #9197: general-template.diff
| File general-template.diff, 1.2 KB (added by johnhennmacc, 4 years ago) |
|---|
-
Tmp/trunk/wp-includes/general-template.php
1024 1024 <tr>'; 1025 1025 1026 1026 // Get days with posts 1027 $nextmonth=$thismonth+1; 1027 1028 $dayswithposts = $wpdb->get_results("SELECT DISTINCT DAYOFMONTH(post_date) 1028 FROM $wpdb->posts WHERE post_date >= '{$thisyear}-{$thismonth}-01 00:00:00'1029 FROM $wpdb->posts WHERE '{$thisyear}-{$nextmonth}-01 00:00:00' >= post_date and post_date >= '{$thisyear}-{$thismonth}-01 00:00:00' 1029 1030 AND post_type = 'post' AND post_status = 'publish' 1030 1031 AND post_date < '" . current_time('mysql') . '\'', ARRAY_N); 1031 1032 if ( $dayswithposts ) { … … 1044 1045 $ak_titles_for_day = array(); 1045 1046 $ak_post_titles = $wpdb->get_results("SELECT post_title, DAYOFMONTH(post_date) as dom " 1046 1047 ."FROM $wpdb->posts " 1047 ."WHERE post_date >= '{$thisyear}-{$thismonth}-01 00:00:00' "1048 ."WHERE '{$thisyear}-{$nextmonth}-01 00:00:00' >= post_date and post_date >= '{$thisyear}-{$thismonth}-01 00:00:00' " 1048 1049 ."AND post_date < '".current_time('mysql')."' " 1049 1050 ."AND post_type = 'post' AND post_status = 'publish'" 1050 1051 );
