1
0
forked from Public/pics

Tag: invert behaviour of getCount and getOffset methods

This commit is contained in:
2026-02-14 12:56:50 +01:00
parent 2cd2f472d0
commit b0ee3081a6
4 changed files with 13 additions and 14 deletions

View File

@@ -59,10 +59,10 @@ class ManageAlbums extends HTMLController
'items_per_page' => 9999,
'base_url' => BASEURL . '/managealbums/',
'get_data' => function($offset, $limit, $order, $direction) {
return Tag::getOffset($offset, $limit, $order, $direction, true);
return Tag::getOffset($offset, $limit, $order, $direction);
},
'get_count' => function() {
return Tag::getCount(false, 'Album', true);
return Tag::getCount(false, 'Album');
}
];

View File

@@ -72,10 +72,10 @@ class ManageTags extends HTMLController
'items_per_page' => 9999,
'base_url' => BASEURL . '/managetags/',
'get_data' => function($offset, $limit, $order, $direction) {
return Tag::getOffset($offset, $limit, $order, $direction, false);
return Tag::getOffset($offset, $limit, $order, $direction, true);
},
'get_count' => function() {
return Tag::getCount(false, null, false);
return Tag::getCount(false, null, true);
}
];

View File

@@ -18,7 +18,7 @@ class ViewPeople extends HTMLController
$page = isset($_GET['page']) ? (int) $_GET['page'] : 1;
$start = ($page - 1) * self::PER_PAGE;
$total_count = Tag::getCount(1, 'Person', true);
$total_count = Tag::getCount(1, 'Person');
// Fetch subalbums.
$subalbums = Tag::getPeople(0, $start, self::PER_PAGE);