Merge pull request #13831 from friendica/warning

Fix warning concerning a missing "created" field
This commit is contained in:
Hypolite Petovan
2024-01-15 14:17:06 -05:00
committed by GitHub
2 changed files with 3 additions and 77 deletions

View File

@@ -762,9 +762,10 @@ class Photo
));
} else {
// This query doesn't do the count and is much faster
$albums = DBA::toArray(DBA::p("SELECT DISTINCT(`album`), '' AS `total`
$albums = DBA::toArray(DBA::p("SELECT '' AS `total`, `album`, MIN(`created`) AS `created`
FROM `photo` USE INDEX (`uid_album_scale_created`)
WHERE `uid` = ? AND `photo-type` IN (?, ?, ?) $sql_extra",
WHERE `uid` = ? AND `photo-type` IN (?, ?, ?) $sql_extra
GROUP BY `album` ORDER BY `created` DESC",
$uid,
self::DEFAULT,
$banner_type,