Management controllers: move table queries into models

This commit is contained in:
2025-01-08 17:17:53 +01:00
parent 2d2ef38422
commit cc0ff71ef7
10 changed files with 144 additions and 156 deletions

View File

@@ -65,11 +65,10 @@ class ManageAlbums extends HTMLController
'index_class' => 'col-md-6',
'base_url' => BASEURL . '/managealbums/',
'get_data' => function($offset, $limit, $order, $direction) {
assert(in_array($order, ['id_tag', 'tag', 'slug', 'count']));
return PhotoAlbum::getHierarchy($order, $direction);
return Tag::getOffset($offset, $limit, $order, $direction, true);
},
'get_count' => function() {
return 9999;
return Tag::getCount(false, 'Album', true);
}
];