Version 0.9 ()
------------------------------------------------------------------------
+ * Fix putting sticky entry on the last page in postgreSQL setups.
+ Thanks to Nate Johnston for working this out! (garvinhicking)
+
* Make "/archive" view also recognize selected category. Sidebar
archive and calendar plugins also pay strict attention to which
category is selected. Helps "semi-multiple" blogs based on categories
$eventData['addkey'] .= $cond;
}
- $cond = 'orderkey DESC';
+ if ($serendipity['dbType'] == 'postgres') {
+ // PostgreSQL is a bit weird here. Empty columns with NULL or "" content for
+ // orderkey would get sorted on top when using DESC, and only after those
+ // the "true" content would be inserted. Thus we order ASC in postgreSQL,
+ // and silently wonder. Thanks to Nate Johnston for working this out!
+ $cond = 'orderkey ASC';
+ } else {
+ $cond = 'orderkey DESC';
+ }
+
if (empty($eventData['orderby'])) {
$eventData['orderby'] = $cond;
} else {