projects
/
WP-Plugins
/
glm-member-db-events.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
18d3b19
)
Sort for anything not groupByDay
author
Steve Sutton
<steve@gaslightmedia.com>
Thu, 15 Jun 2017 12:11:58 +0000
(08:11 -0400)
committer
Steve 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
patch
|
blob
|
history
diff --git
a/models/front/events/list.php
b/models/front/events/list.php
index
3e6e234
..
5ec124a
100644
(file)
--- a/
models/front/events/list.php
+++ b/
models/front/events/list.php
@@
-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;