Admin: Fixed the critical error that was been caused by outdated function findCount()

This commit is contained in:
veselcraft 2021-09-11 13:35:27 +03:00
parent 7f1a5f2354
commit 10d2d6ed44
2 changed files with 3 additions and 3 deletions

View file

@ -21,8 +21,8 @@ final class AdminPresenter extends OpenVKPresenter
$query = $this->queryParam("q") ?? ""; $query = $this->queryParam("q") ?? "";
$page = (int) ($this->queryParam("p") ?? 1); $page = (int) ($this->queryParam("p") ?? 1);
$count = $repo->findCount($query); $count = $repo->find($query)->size();
return $repo->find($query, $page); return $repo->find($query)->page($page, 20);
} }
function onStartup(): void function onStartup(): void

View file

@ -58,7 +58,7 @@
</table> </table>
<br/> <br/>
<div align="right"> <div align="right">
{var isLast = ((10 * (($_GET['p'] ?? 1) - 1)) + $amount) < $count} {var isLast = ((20 * (($_GET['p'] ?? 1) - 1)) + $amount) < $count}
<a n:if="($_GET['p'] ?? 1) > 1" class="aui-button" href="?p={($_GET['p'] ?? 1) - 1}"> <a n:if="($_GET['p'] ?? 1) > 1" class="aui-button" href="?p={($_GET['p'] ?? 1) - 1}">
⭁ туда ⭁ туда