diff --git a/controllers/ManageTags.php b/controllers/ManageTags.php index 26f2b49..cb1ffd2 100644 --- a/controllers/ManageTags.php +++ b/controllers/ManageTags.php @@ -50,10 +50,18 @@ class ManageTags extends HTMLController 'data' => 'slug', ], ], - 'kind' => [ - 'header' => 'Kind', + 'id_user_owner' => [ + 'header' => 'Owning user', 'is_sortable' => true, - 'value' => 'kind', + 'parse' => [ + 'type' => 'function', + 'data' => function($row) { + if (!empty($row['first_name'])) + return $row['first_name'] . ' ' . $row['surname']; + else + return 'n/a'; + }, + ], ], 'count' => [ 'header' => 'Cardinality', @@ -76,8 +84,9 @@ class ManageTags extends HTMLController $direction = 'up'; $data = Registry::get('db')->queryAssocs(' - SELECT * - FROM tags + SELECT t.*, u.id_user, u.first_name, u.surname + FROM tags AS t + LEFT JOIN users AS u ON t.id_user_owner = u.id_user WHERE kind != {string:album} ORDER BY {raw:order} LIMIT {int:offset}, {int:limit}',