AccountSettings: list tags owned by current user
This commit is contained in:
@@ -96,6 +96,25 @@ class Tag
|
||||
return $rows;
|
||||
}
|
||||
|
||||
public static function getAllByOwner($id_user_owner)
|
||||
{
|
||||
$db = Registry::get('db');
|
||||
$res = $db->query('
|
||||
SELECT *
|
||||
FROM tags
|
||||
WHERE id_user_owner = {int:id_user_owner}
|
||||
ORDER BY tag',
|
||||
[
|
||||
'id_user_owner' => $id_user_owner,
|
||||
]);
|
||||
|
||||
$objects = [];
|
||||
while ($row = $db->fetch_assoc($res))
|
||||
$objects[$row['id_tag']] = new Tag($row);
|
||||
|
||||
return $objects;
|
||||
}
|
||||
|
||||
public static function getAlbums($id_parent = 0, $offset = 0, $limit = 24, $return_format = 'array')
|
||||
{
|
||||
$rows = Registry::get('db')->queryAssocs('
|
||||
|
||||
Reference in New Issue
Block a user