Management controllers: move table queries into models

This commit is contained in:
Aaron committed 2025-01-08 19:11:10 +01:00
1 parent 2d2ef38422
commit cc0ff71ef7
10 files changed
+144 -156

No files matched your search

+2 -3
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);
}
];