aboutsummaryrefslogtreecommitdiff
path: root/model/Relive.php
diff options
context:
space:
mode:
Diffstat (limited to 'model/Relive.php')
-rw-r--r--model/Relive.php24
1 files changed, 24 insertions, 0 deletions
diff --git a/model/Relive.php b/model/Relive.php
new file mode 100644
index 0000000..3ffdc1b
--- /dev/null
+++ b/model/Relive.php
@@ -0,0 +1,24 @@
+<?php
+
+class Relive extends ModelBase
+{
+ function relive_talks()
+ {
+ $talks = @file_get_contents(get('OVERVIEW.RELIVE_JSON'));
+ $talks = utf8_decode($talks);
+ $talks = (array)json_decode($talks, true);
+
+ usort($talks, function($a, $b) {
+ $sort = array('live', 'recorded', 'released');
+ return array_search($a['status'], $sort) > array_search($b['status'], $sort);
+ });
+
+ $talks_by_id = array();
+ foreach ($talks as $value)
+ {
+ $talks_by_id[$value['id']] = $value;
+ }
+
+ return $talks_by_id;
+ }
+}