Skip to content
Permalink
Browse files

fixed sort order on 'more events' page; updates #208

  • Loading branch information...
following5 committed Jun 11, 2015
1 parent fc8b056 commit 10da6c8fceb5d81113a293827f4020927d5e889b
Showing with 2 additions and 1 deletion.
  1. +2 −1 htdocs/newcaches.php
@@ -33,6 +33,7 @@
if ($bEvents)
$cachetype_condition .= " AND `date_hidden` >= curdate()";
$date_field = ($bEvents ? 'date_hidden' : 'date_created');
$sort_order = ($bEvents ? 'ASC' : 'DESC');
$newCaches = array();
$rsNewCaches = sql_slave(
@@ -50,7 +51,7 @@
LEFT JOIN `caches_attributes` `ca` ON `ca`.`cache_id`=`caches`.`cache_id` AND `ca`.`attrib_id`=6
WHERE `caches`.`status` = 1" . ($country ? " AND `caches`.`country`='" . sql_escape($country) . "'" : "") .
$cachetype_condition . "
ORDER BY `caches`.`date_created` DESC
ORDER BY `caches`.`$date_field` $sort_order
LIMIT " . ($startat+0) . ', ' . ($perpage+0));
// see also write_newcaches_urls() in sitemap.class.php
while ($rNewCache = sql_fetch_assoc($rsNewCaches))

0 comments on commit 10da6c8

Please sign in to comment.
You can’t perform that action at this time.