Sort for anything not groupByDay
authorSteve Sutton <steve@gaslightmedia.com>
Thu, 15 Jun 2017 12:11:58 +0000 (08:11 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Thu, 15 Jun 2017 12:11:58 +0000 (08:11 -0400)
If the $groupByDay is false then sort the events.

models/front/events/list.php

index 3e6e234..5ec124a 100644 (file)
@@ -713,7 +713,9 @@ class GlmMembersFront_events_list extends GlmMembersFront_events_baseAction
                 }
             }
             $eventsByDate = $mainEvents;
-        } else if ( $events && $action == 'featured' ) {
+            // If the events are not grouped by day then they need to be
+sorted.
+        } else if ( $events && !$groupByDay ) {
             usort( $events, function( $event1, $event2 ){
                 if ( $event1['starting_timestamp'] == $event2['starting_timestamp'] ) {
                     return 0;