Changes to schedule for frontend
This commit is contained in:
@@ -13,7 +13,7 @@ class NewsImage extends Model {
|
||||
// Deserialisatie van JSON heeft url in data,
|
||||
// lezen uit database heeft file en (als het goed is) urlPrefix
|
||||
if(isset($data->file)) {
|
||||
$this->url = $urlPrefix . $data->file;
|
||||
$this->url = 'http://www.6fm.nl' . $urlPrefix . $data->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
|
||||
|
||||
@@ -16,9 +16,14 @@ class Program extends Model {
|
||||
public function __construct($data) {
|
||||
parent::__construct($data);
|
||||
|
||||
$this->isSpecial = ($data->priority < 2);
|
||||
if(!isset($data->isSpecial) && isset($data->priority)) {
|
||||
$this->isSpecial = ($data->priority < 2);
|
||||
}
|
||||
|
||||
if(($mailComma = strpos($data->email, ',')) !== false) {
|
||||
$this->email = substr($data->email, 0, $mailComma);
|
||||
}
|
||||
|
||||
$this->url = "/{$this->id}/" . parent::url_slug($this->name);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user