#3961 closed defect (bug) (fixed)
wp_get_archives('type=postbypost') missing ORDER BY
| Reported by: | mattbta | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 2.2 |
| Component: | Template | Version: | 2.2 |
| Severity: | major | Keywords: | commit |
| Cc: | Focuses: |
Description
wp-includes/general-template.php function wp_get_archives() line 417/418 :
('alpha' == $type) ? $orderby = "post_title ASC " : $orderby = "post_date DESC ";
$arcresults = $wpdb->get_results("SELECT * FROM $wpdb->posts $join $where $orderby $limit");
Should be:
('alpha' == $type) ? $orderby = "post_title ASC " : $orderby = "post_date DESC ";
$arcresults = $wpdb->get_results("SELECT * FROM $wpdb->posts $join $where ORDER BY $orderby $limit");
Attachments (1)
Change History (6)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
+1
/me hides in shame for breaking it with his last patch