Show only Person tags in tag management screen.

This commit is contained in:
Aaron van Geffen 2017-11-05 16:26:24 +01:00
parent 08cc6b1c77
commit 31e1357b47
1 changed files with 7 additions and 3 deletions

View File

@ -53,9 +53,9 @@ class ManageTags extends HTMLController
'sort_direction' => !empty($_GET['dir']) ? $_GET['dir'] : null,
'title' => 'Manage tags',
'no_items_label' => 'No tags meet the requirements of the current filter.',
'items_per_page' => 25,
'items_per_page' => 30,
'base_url' => BASEURL . '/managetags/',
'get_data' => function($offset = 0, $limit = 15, $order = '', $direction = 'up') {
'get_data' => function($offset = 0, $limit = 30, $order = '', $direction = 'up') {
if (!in_array($order, ['id_post', 'tag', 'slug', 'kind', 'count']))
$order = 'tag';
if (!in_array($direction, ['up', 'down']))
@ -64,12 +64,14 @@ class ManageTags extends HTMLController
$data = Registry::get('db')->queryAssocs('
SELECT *
FROM tags
WHERE kind != {string:album}
ORDER BY {raw:order}
LIMIT {int:offset}, {int:limit}',
[
'order' => $order . ($direction == 'up' ? ' ASC' : ' DESC'),
'offset' => $offset,
'limit' => $limit,
'album' => 'Album',
]);
return [
@ -81,7 +83,9 @@ class ManageTags extends HTMLController
'get_count' => function() {
return Registry::get('db')->queryValue('
SELECT COUNT(*)
FROM tags');
FROM tags
WHERE kind != {string:album}',
['album' => 'Album']);
}
];