Bug in Archive plugin

Found a bug? Tell us!!
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

This DIFF should do the trick:

Code: Select all

Index: include/functions_entries.inc.php
===================================================================
--- include/functions_entries.inc.php   (revision 2337)
+++ include/functions_entries.inc.php   (working copy)
@@ -408,7 +408,7 @@
                      {$serendipity['fullCountQuery']}
                      {$cond['group']}
                      {$cond['having']}
-            ORDER BY {$cond['orderby']}
+                     " . (!empty($cond['orderby']) ? "ORDER BY {$cond['orderby']}" : "") . "
                      $limit";

     // DEBUG:
Please tell me if that works out for you, then I can commit both fixes.
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
ads
Regular
Posts: 93
Joined: Sun Oct 29, 2006 11:39 am

Post by ads »

This one works with 'orderkey DESC' and with empty $order parameter.

Nice work!
Post Reply