### Eclipse Workspace Patch 1.0
#P wordpress-trunk
|
|
|
869 | 869 | } |
870 | 870 | } elseif ( 'weekly' == $type ) { |
871 | 871 | $start_of_week = get_option('start_of_week'); |
872 | | $query = "SELECT DISTINCT WEEK(post_date, $start_of_week) AS `week`, YEAR(post_date) AS yr, DATE_FORMAT(post_date, '%Y-%m-%d') AS yyyymmdd, count(ID) as posts FROM $wpdb->posts $join $where GROUP BY WEEK(post_date, $start_of_week), YEAR(post_date) ORDER BY post_date DESC $limit"; |
| 872 | $query = $wpdb->prepare("SELECT DISTINCT WEEK(post_date, %d) AS `week`, YEAR(post_date) AS yr, DATE_FORMAT(post_date, '%%Y-%%m-%%d') AS yyyymmdd, count(ID) as posts FROM $wpdb->posts $join $where GROUP BY WEEK(post_date, $start_of_week), YEAR(post_date) ORDER BY post_date DESC %d", $start_of_week, $limit); |
873 | 873 | $key = md5($query); |
874 | 874 | $cache = wp_cache_get( 'wp_get_archives' , 'general'); |
875 | 875 | if ( !isset( $cache[ $key ] ) ) { |