diff --git a/Controller/BackendController.php b/Controller/BackendController.php index dd2da8a..0735548 100755 --- a/Controller/BackendController.php +++ b/Controller/BackendController.php @@ -75,20 +75,20 @@ final class BackendController extends Controller $view->data['accounts'] = ProfileMapper::getAll() ->with('account') ->with('image') - ->where('id', $request->getDataInt('id') ?? 0, '<') + ->where('id', $request->getDataInt('offset') ?? 0, '<') ->limit(25)->execute(); } elseif ($request->getData('ptype') === 'n') { $view->data['accounts'] = ProfileMapper::getAll() ->with('account') ->with('image') - ->where('id', $request->getDataInt('id') ?? 0, '>') + ->where('id', $request->getDataInt('offset') ?? 0, '>') ->limit(25)->execute(); } else { $view->data['accounts'] = ProfileMapper::getAll() ->with('account') ->with('image') ->where('id', 0, '>') - ->limit(25)->execute(); + ->limit(25)->executeGetArray(); } /** @var \Model\Setting $profileImage */ @@ -162,7 +162,7 @@ final class BackendController extends Controller ->with('createdBy') ->where('createdBy', (int) $profile->account->id) ->limit(25) - ->execute(); + ->executeGetArray(); $view->data['media'] = $media; diff --git a/Theme/Backend/profile-list.tpl.php b/Theme/Backend/profile-list.tpl.php index dd78bab..4cae7c5 100755 --- a/Theme/Backend/profile-list.tpl.php +++ b/Theme/Backend/profile-list.tpl.php @@ -20,8 +20,8 @@ use phpOMS\Uri\UriFactory; */ $accounts = $this->data['accounts'] ?? []; -$previous = empty($accounts) ? '{/base}/profile/list' : '{/base}/profile/list?{?}&id=' . \reset($accounts)->id . '&ptype=p'; -$next = empty($accounts) ? '{/base}/profile/list' : '{/base}/profile/list?{?}&id=' . \end($accounts)->id . '&ptype=n'; +$previous = empty($accounts) ? '{/base}/profile/list' : '{/base}/profile/list?{?}&offset=' . \reset($accounts)->id . '&ptype=p'; +$next = empty($accounts) ? '{/base}/profile/list' : '{/base}/profile/list?{?}&offset=' . \end($accounts)->id . '&ptype=n'; ?>