tq: check categoryid exists (fix #572)
Signed-off-by: Varun Patil <varunpatil@ucla.edu>pull/579/head
parent
d99647291a
commit
666da6e11d
|
@ -209,17 +209,21 @@ trait TimelineQueryDays
|
||||||
$row['dayid'] = (int) $row['dayid'];
|
$row['dayid'] = (int) $row['dayid'];
|
||||||
$row['w'] = (int) $row['w'];
|
$row['w'] = (int) $row['w'];
|
||||||
$row['h'] = (int) $row['h'];
|
$row['h'] = (int) $row['h'];
|
||||||
|
|
||||||
|
// Optional fields
|
||||||
if (!$row['isvideo']) {
|
if (!$row['isvideo']) {
|
||||||
unset($row['isvideo'], $row['video_duration']);
|
unset($row['isvideo'], $row['video_duration']);
|
||||||
}
|
}
|
||||||
if ($row['categoryid']) {
|
|
||||||
$row['isfavorite'] = 1;
|
|
||||||
}
|
|
||||||
unset($row['categoryid']);
|
|
||||||
if (!$row['liveid']) {
|
if (!$row['liveid']) {
|
||||||
unset($row['liveid']);
|
unset($row['liveid']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Favorite field, may not be present
|
||||||
|
if (\array_key_exists('categoryid', $row) && $row['categoryid']) {
|
||||||
|
$row['isfavorite'] = 1;
|
||||||
|
}
|
||||||
|
unset($row['categoryid']);
|
||||||
|
|
||||||
// All cluster transformations
|
// All cluster transformations
|
||||||
ClustersBackend\Manager::applyDayPostTransforms($this->request, $row);
|
ClustersBackend\Manager::applyDayPostTransforms($this->request, $row);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue