Allow users to filter albums by contributors #48

Merged
Roflin merged 18 commits from refactor/viewalbum into master 2024-01-20 20:11:18 +01:00
Showing only changes of commit 16683d2f1f - Show all commits

View File

@ -141,6 +141,21 @@ class Tag
return $rows;
}
public function getContributorList()
{
return Registry::get('db')->queryPairs('
SELECT u.id_user, u.first_name, u.surname, u.slug, COUNT(*) AS num_assets
FROM assets_tags AS at
LEFT JOIN assets AS a ON at.id_asset = a.id_asset
LEFT JOIN users AS u ON a.id_user_uploaded = u.id_user
WHERE at.id_tag = {int:id_tag}
GROUP BY a.id_user_uploaded
ORDER BY u.first_name, u.surname',
[
'id_tag' => $this->id_tag,
]);
}
public static function getPeople($id_parent = 0, $offset = 0, $limit = 24, $return_format = 'array')
{
$rows = Registry::get('db')->queryAssocs('