Make WordPress Core

Opened 18 years ago

Closed 18 years ago

Last modified 15 years ago

#3961 closed defect (bug) (fixed)

wp_get_archives('type=postbypost') missing ORDER BY

Reported by: mattbta's profile mattbta Owned by:
Milestone: 2.2 Priority: normal
Severity: major Version: 2.2
Component: Template Keywords: commit
Focuses: Cc:

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)

3961.diff (718 bytes) - added by foolswisdom 18 years ago.

Download all attachments as: .zip

Change History (6)

@foolswisdom
18 years ago

#1 @westi
18 years ago

  • Keywords commit added

+1

/me hides in shame for breaking it with his last patch

#2 @westi
18 years ago

  • Resolution set to duplicate
  • Status changed from new to closed

Notes that this is a dupe of #3951

Closing as dupe of earlier ticket which also has-patch

#3 @foolswisdom
18 years ago

  • Milestone 2.2 deleted

#4 @ryan
18 years ago

  • Resolution changed from duplicate to fixed

(In [5036]) Fix order by in wp_get_archives(). Props mattbta. fixes #3961

#5 @ryan
18 years ago

  • Milestone set to 2.2
Note: See TracTickets for help on using tickets.