File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change 1
1
<?php
2
2
3
- $ meetups = RemoteSystems \Meetup::getEvents ();
3
+ $ now = new DateTime ();
4
+ $ meetups = Emergence \Meetup \Connector::getUpcomingEvents ();
4
5
$ nextMeetup = array_shift ($ meetups );
5
6
7
+
6
8
// detect if meetup is happening right now
7
- if ($ nextMeetup && $ nextMeetup ['time ' ] < time () * 1000 ) {
9
+ // - use ?next_meetup_now=1 to test feature before any event
10
+ if (
11
+ ($ nextMeetup && $ nextMeetup ['time_start ' ] < $ now )
12
+ || !empty ($ _GET ['next_meetup_now ' ])
13
+ ) {
8
14
$ currentMeetup = $ nextMeetup ;
9
- $ checkins = Laddr \MemberCheckin::getAllByField ('MeetupID ' , $ currentMeetup ['id ' ], array ('order ' => 'ID DESC ' ));
10
15
$ nextMeetup = array_shift ($ meetups );
16
+ $ checkins = Laddr \MemberCheckin::getAllByField ('MeetupID ' , $ currentMeetup ['id ' ], array ('order ' => 'ID DESC ' ));
11
17
}
12
-
18
+
19
+
13
20
RequestHandler::respond ('bigscreen ' , array (
14
21
'currentMeetup ' => $ currentMeetup
15
22
,'checkins ' => $ checkins
16
23
,'nextMeetup ' => $ nextMeetup
17
- ));
24
+ ));
You can’t perform that action at this time.
0 commit comments