Page 2 of 2

Posted: Sat Sep 20, 2008 1:37 pm
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.

Posted: Sat Sep 20, 2008 2:08 pm
by ads
This one works with 'orderkey DESC' and with empty $order parameter.

Nice work!