Fixes sorting on Tag Id in the ManageTags View.

This commit is contained in:
Dennis Brentjes 2018-03-15 21:36:24 +01:00
parent bcbb74a680
commit 331193019c

View File

@ -27,7 +27,7 @@ class ManageTags extends HTMLController
],
],
'columns' => [
'id_post' => [
'id_tag' => [
'value' => 'id_tag',
'header' => 'ID',
'is_sortable' => true,
@ -68,7 +68,7 @@ class ManageTags extends HTMLController
'index_class' => 'floatleft',
'base_url' => BASEURL . '/managetags/',
'get_data' => function($offset = 0, $limit = 30, $order = '', $direction = 'up') {
if (!in_array($order, ['id_post', 'tag', 'slug', 'kind', 'count']))
if (!in_array($order, ['id_tag', 'tag', 'slug', 'kind', 'count']))
$order = 'tag';
if (!in_array($direction, ['up', 'down']))
$direction = 'up';