diff options
author | MaZderMind | 2016-12-10 18:27:07 +0100 |
---|---|---|
committer | MaZderMind | 2016-12-10 18:27:07 +0100 |
commit | 0c3fca54cfce9c595f713b0e0d62e1300ca05045 (patch) | |
tree | 2c29f08a379f66d6773f528a06af5f1f37cbe49a /model/Relive.php | |
parent | 51ee8234fa7d8c2fbda0705563ab724746dfe9ce (diff) | |
parent | 751c58ebf7e8e6ea20b5f5116866f065e52ea1a2 (diff) |
Merge branch 'cleanups'
Diffstat (limited to '')
-rw-r--r-- | model/Relive.php | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/model/Relive.php b/model/Relive.php index ca32f19..7f0e747 100644 --- a/model/Relive.php +++ b/model/Relive.php @@ -34,22 +34,22 @@ class Relive $mapping = $this->getScheduleToRoomMapping(); - usort($talks, function($a, $b) { - // first, make sure that live talks are always on top - if($a['status'] == 'live' && $b['status'] != 'live') { - return -1; - } else if($a['status'] != 'live' && $b['status'] == 'live') { - return 1; - } else if($a['status'] == 'live' && $b['status'] == 'live') { - // sort live talks by room - - return strcmp($a['room'], $b['room']); - } - - // all other talks get sorted by their name - - return strcmp($a['title'], $b['title']); - }); + usort($talks, function($a, $b) { + // first, make sure that live talks are always on top + if($a['status'] == 'live' && $b['status'] != 'live') { + return -1; + } + else if($a['status'] != 'live' && $b['status'] == 'live') { + return 1; + } + else if($a['status'] == 'live' && $b['status'] == 'live') { + // sort live talks by room + return strcmp($a['room'], $b['room']); + } + + // all other talks get sorted by their name + return strcmp($a['title'], $b['title']); + }); $talks_by_id = array(); foreach ($talks as $talk) |