Changes to schedule for frontend

This commit is contained in:
2017-07-27 00:06:57 +02:00
parent 8b30298ca6
commit 4ff0d7acc2
5 changed files with 28 additions and 19 deletions

View File

@@ -36,7 +36,14 @@ class NewsItem extends Model {
? new \Model\NewsSource($data->source->title, $data->source->url, $data->source->url)
: new \Model\NewsSource($data->source, $data->source_url, $data->showsource);
}
$this->keywords = !is_array($data->keywords) && trim($data->keywords) ? explode(' ', $data->keywords) : null;
$this->keywords = null;
if(is_array($data->keywords)) {
$this->keywords = $data->keywords;
} else if(trim($data->keywords)) {
$this->keywords = explode(' ', $data->keywords);
}
$this->podcast = $data->podcast ? $data->podcast : null;
$images = ($images != null) ? $images