RVRNEXT-22 use the new repository methods in controllers
rvr-nextgen/pipeline/pr-master This commit looks good
rvr-nextgen/pipeline/pr-master This commit looks good
This commit is contained in:
2 files changed
+7
-9
No files matched your search
@@ -84,19 +84,18 @@ class TransactionController implements IAuthenticationRequired, ISecured
|
||||
$numberOfTransactions = $event ?
|
||||
$this->transactionRepository->countAllByEvent($event) :
|
||||
$this->transactionRepository->countAllByCommunity($this->community);
|
||||
$pages = ceil($numberOfTransactions / $itemsPerPage);
|
||||
$currentPage = Container::$request->query('page') ?: 0;
|
||||
$currentPage = Container::$request->query('page') ?: 1;
|
||||
$transactions = $event ?
|
||||
$this->transactionRepository->getPagedByEvent(
|
||||
$event,
|
||||
$currentPage * $itemsPerPage,
|
||||
$currentPage,
|
||||
$itemsPerPage,
|
||||
true,
|
||||
['currency', 'payer_user', 'payee_user']
|
||||
) :
|
||||
$this->transactionRepository->getPagedByCommunity(
|
||||
$this->community,
|
||||
$currentPage * $itemsPerPage,
|
||||
$currentPage,
|
||||
$itemsPerPage,
|
||||
true,
|
||||
['event', 'currency', 'payer_user', 'payee_user']
|
||||
@@ -106,7 +105,7 @@ class TransactionController implements IAuthenticationRequired, ISecured
|
||||
'community' => $this->community,
|
||||
'event' => $event,
|
||||
'exchangeRateCalculator' => $exchangeRateCalculator,
|
||||
'pages' => $pages,
|
||||
'pages' => ceil($numberOfTransactions / $itemsPerPage),
|
||||
'currentPage' => $currentPage,
|
||||
'numberOfTransactions' => $numberOfTransactions,
|
||||
'transactions' => $transactions
|
||||
|
||||
Reference in new issue
Block a user