Don't join facerect for days (#105)
parent
d5215ef710
commit
aa2ef1d73b
|
@ -102,7 +102,7 @@ class ApiController extends Controller
|
||||||
$uid,
|
$uid,
|
||||||
$recursive,
|
$recursive,
|
||||||
$archive,
|
$archive,
|
||||||
$this->getTransformations(),
|
$this->getTransformations(true),
|
||||||
);
|
);
|
||||||
|
|
||||||
// Preload some day responses
|
// Preload some day responses
|
||||||
|
@ -175,7 +175,7 @@ class ApiController extends Controller
|
||||||
$day_ids,
|
$day_ids,
|
||||||
$recursive,
|
$recursive,
|
||||||
$archive,
|
$archive,
|
||||||
$this->getTransformations(),
|
$this->getTransformations(false),
|
||||||
);
|
);
|
||||||
|
|
||||||
return new JSONResponse($list, Http::STATUS_OK);
|
return new JSONResponse($list, Http::STATUS_OK);
|
||||||
|
@ -637,8 +637,10 @@ class ApiController extends Controller
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get transformations depending on the request.
|
* Get transformations depending on the request.
|
||||||
|
*
|
||||||
|
* @param bool $aggregateOnly Only apply transformations for aggregation (days call)
|
||||||
*/
|
*/
|
||||||
private function getTransformations()
|
private function getTransformations(bool $aggregateOnly)
|
||||||
{
|
{
|
||||||
$transforms = [];
|
$transforms = [];
|
||||||
|
|
||||||
|
@ -660,7 +662,7 @@ class ApiController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
$faceRect = $this->request->getParam('facerect');
|
$faceRect = $this->request->getParam('facerect');
|
||||||
if ($faceRect) {
|
if ($faceRect && !$aggregateOnly) {
|
||||||
$transforms[] = [$this->timelineQuery, 'transformFaceRect', $face];
|
$transforms[] = [$this->timelineQuery, 'transformFaceRect', $face];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -686,7 +688,7 @@ class ApiController extends Controller
|
||||||
private function preloadDays(array &$days, Folder &$folder, bool $recursive, bool $archive)
|
private function preloadDays(array &$days, Folder &$folder, bool $recursive, bool $archive)
|
||||||
{
|
{
|
||||||
$uid = $this->userSession->getUser()->getUID();
|
$uid = $this->userSession->getUser()->getUID();
|
||||||
$transforms = $this->getTransformations();
|
$transforms = $this->getTransformations(false);
|
||||||
$preloaded = 0;
|
$preloaded = 0;
|
||||||
foreach ($days as &$day) {
|
foreach ($days as &$day) {
|
||||||
$day['detail'] = $this->timelineQuery->getDay(
|
$day['detail'] = $this->timelineQuery->getDay(
|
||||||
|
|
|
@ -122,9 +122,6 @@ trait TimelineQueryDays
|
||||||
foreach ($days as &$row) {
|
foreach ($days as &$row) {
|
||||||
$row['dayid'] = (int) $row['dayid'];
|
$row['dayid'] = (int) $row['dayid'];
|
||||||
$row['count'] = (int) $row['count'];
|
$row['count'] = (int) $row['count'];
|
||||||
|
|
||||||
// All transform processing
|
|
||||||
$this->processFace($row, true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $days;
|
return $days;
|
||||||
|
|
Loading…
Reference in New Issue