From 8beec6fda376b842a9ddb7a2425829690f0a8b48 Mon Sep 17 00:00:00 2001 From: MaZderMind Date: Sun, 11 Dec 2016 20:27:35 +0100 Subject: use DateTime objects for ends/startsAt --- model/Conferences.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'model/Conferences.php') diff --git a/model/Conferences.php b/model/Conferences.php index 2dc9f35..8de4029 100644 --- a/model/Conferences.php +++ b/model/Conferences.php @@ -48,7 +48,7 @@ class Conferences $sorted = Conferences::getConferences(); usort($sorted, function($a, $b) { - return $b->startsAt() - $a->endsAt(); + return $b->startsAt() > $a->endsAt() ? 1 : -1; }); return $sorted; -- cgit v1.2.3 From 4c9cc1f8e6bcb8c68e5106437fcb41bbbc380885 Mon Sep 17 00:00:00 2001 From: MaZderMind Date: Sun, 11 Dec 2016 20:27:58 +0100 Subject: list conferences sorted on startpage --- model/Conferences.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'model/Conferences.php') diff --git a/model/Conferences.php b/model/Conferences.php index 8de4029..f930e32 100644 --- a/model/Conferences.php +++ b/model/Conferences.php @@ -33,7 +33,7 @@ class Conferences public static function getActiveConferences() { return array_values(array_filter( - Conferences::getConferences(), + Conferences::getConferencesSorted(), function($conference) { return !$conference->isClosed(); } -- cgit v1.2.3