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['w'] = (int) $row['w'];
|
||||
$row['h'] = (int) $row['h'];
|
||||
|
||||
// Optional fields
|
||||
if (!$row['isvideo']) {
|
||||
unset($row['isvideo'], $row['video_duration']);
|
||||
}
|
||||
if ($row['categoryid']) {
|
||||
$row['isfavorite'] = 1;
|
||||
}
|
||||
unset($row['categoryid']);
|
||||
if (!$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
|
||||
ClustersBackend\Manager::applyDayPostTransforms($this->request, $row);
|
||||
|
||||
|
|
Loading…
Reference in New Issue