WordPress.org

Make WordPress Core

Changeset 7288


Ignore:
Timestamp:
03/14/2008 08:39:07 AM (10 years ago)
Author:
matt
Message:

Only show months that actually have attachments.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/upload.php

    r7251 r7288  
    143143
    144144if ( !is_singular() ) :
    145     $arc_query = "SELECT DISTINCT YEAR(post_date) AS yyear, MONTH(post_date) AS mmonth FROM $wpdb->posts WHERE post_type = 'post' ORDER BY post_date DESC";
     145    $arc_query = "SELECT DISTINCT YEAR(post_date) AS yyear, MONTH(post_date) AS mmonth FROM $wpdb->posts WHERE post_type = 'attachment' ORDER BY post_date DESC";
    146146
    147147    $arc_result = $wpdb->get_results( $arc_query );
Note: See TracChangeset for help on using the changeset viewer.