Changes for frontend
This commit is contained in:
1 parent
af370846e6
commit
8b30298ca6
3 files changed
+14
-7
No files matched your search
@@ -29,8 +29,14 @@ class NewsItem extends Model {
|
||||
parent::ConvertToDateTime($this->published);
|
||||
parent::ConvertToDateTime($this->edited);
|
||||
|
||||
$this->source = $data->source ? new \Model\NewsSource($data->source, $data->source_url, $data->showsource) : null;
|
||||
$this->keywords = trim($data->keywords) ? explode(' ', $data->keywords) : null;
|
||||
$this->source = null;
|
||||
if($data->source)
|
||||
{
|
||||
$data->source = is_object($data->source)
|
||||
? 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->podcast = $data->podcast ? $data->podcast : null;
|
||||
|
||||
$images = ($images != null) ? $images
|
||||
|
||||
Reference in new issue
Block a user