pull/37/head
Varun Patil 2022-08-15 23:14:24 +00:00
parent 61161b234e
commit 5c55b79175
2 changed files with 12 additions and 10 deletions

View File

@ -115,14 +115,15 @@ class Util {
string $user, string $user,
int $dayId, int $dayId,
): array { ): array {
$qb = $connection->getQueryBuilder(); $sql = 'SELECT file_id, oc_filecache.etag
$qb->select('file_id') FROM oc_betterphotos
->from('betterphotos') LEFT JOIN oc_filecache
->where($qb->expr()->eq('user_id', $qb->createNamedParameter($user))) ON oc_filecache.fileid = oc_betterphotos.file_id
->andWhere($qb->expr()->eq('day_id', $qb->createNamedParameter($dayId))) WHERE user_id = ? AND day_id = ?
->orderBy('date_taken', 'DESC'); ORDER BY date_taken DESC';
$result = $qb->executeQuery(); $rows = $connection->executeQuery($sql, [$user, $dayId], [
$rows = $result->fetchAll(); \PDO::PARAM_STR, \PDO::PARAM_INT,
return $rows; ]);
return $rows->fetchAll();
} }
} }

View File

@ -262,7 +262,7 @@ export default {
// Add the photo to the row // Add the photo to the row
this.list[rowIdx].photos.push({ this.list[rowIdx].photos.push({
id: p.file_id, id: p.file_id,
src: `/core/preview?fileId=${p.file_id}&x=250&y=250`, src: `/core/preview?fileId=${p.file_id}&c=${p.etag}&x=250&y=250&forceIcon=0&a=0`,
}); });
} }
@ -432,6 +432,7 @@ export default {
font-size: 0.8em; font-size: 0.8em;
color: grey; color: grey;
right: 5px; right: 5px;
transform: translateY(-50%);
} }
.timeline-scroll .tick .dash { .timeline-scroll .tick .dash {