template fixes + bug fixes + style fixes

This commit is contained in:
Dennis Eichhorn 2024-04-02 21:40:48 +00:00
parent 62c0921096
commit ae08723c48
3 changed files with 6 additions and 8 deletions

View File

@ -75,20 +75,20 @@ final class BackendController extends Controller
$view->data['accounts'] = ProfileMapper::getAll() $view->data['accounts'] = ProfileMapper::getAll()
->with('account') ->with('account')
->with('image') ->with('image')
->where('id', $request->getDataInt('id') ?? 0, '<') ->where('id', $request->getDataInt('offset') ?? 0, '<')
->limit(25)->execute(); ->limit(25)->execute();
} elseif ($request->getData('ptype') === 'n') { } elseif ($request->getData('ptype') === 'n') {
$view->data['accounts'] = ProfileMapper::getAll() $view->data['accounts'] = ProfileMapper::getAll()
->with('account') ->with('account')
->with('image') ->with('image')
->where('id', $request->getDataInt('id') ?? 0, '>') ->where('id', $request->getDataInt('offset') ?? 0, '>')
->limit(25)->execute(); ->limit(25)->execute();
} else { } else {
$view->data['accounts'] = ProfileMapper::getAll() $view->data['accounts'] = ProfileMapper::getAll()
->with('account') ->with('account')
->with('image') ->with('image')
->where('id', 0, '>') ->where('id', 0, '>')
->limit(25)->execute(); ->limit(25)->executeGetArray();
} }
/** @var \Model\Setting $profileImage */ /** @var \Model\Setting $profileImage */
@ -162,7 +162,7 @@ final class BackendController extends Controller
->with('createdBy') ->with('createdBy')
->where('createdBy', (int) $profile->account->id) ->where('createdBy', (int) $profile->account->id)
->limit(25) ->limit(25)
->execute(); ->executeGetArray();
$view->data['media'] = $media; $view->data['media'] = $media;

View File

@ -20,8 +20,8 @@ use phpOMS\Uri\UriFactory;
*/ */
$accounts = $this->data['accounts'] ?? []; $accounts = $this->data['accounts'] ?? [];
$previous = empty($accounts) ? '{/base}/profile/list' : '{/base}/profile/list?{?}&id=' . \reset($accounts)->id . '&ptype=p'; $previous = empty($accounts) ? '{/base}/profile/list' : '{/base}/profile/list?{?}&offset=' . \reset($accounts)->id . '&ptype=p';
$next = empty($accounts) ? '{/base}/profile/list' : '{/base}/profile/list?{?}&id=' . \end($accounts)->id . '&ptype=n'; $next = empty($accounts) ? '{/base}/profile/list' : '{/base}/profile/list?{?}&offset=' . \end($accounts)->id . '&ptype=n';
?> ?>
<div class="row"> <div class="row">
<div class="col-xs-12"> <div class="col-xs-12">

View File

@ -23,7 +23,6 @@ use phpOMS\Account\PermissionType;
use phpOMS\Application\ApplicationAbstract; use phpOMS\Application\ApplicationAbstract;
use phpOMS\Dispatcher\Dispatcher; use phpOMS\Dispatcher\Dispatcher;
use phpOMS\Event\EventManager; use phpOMS\Event\EventManager;
use phpOMS\Localization\ISO3166TwoEnum;
use phpOMS\Localization\L11nManager; use phpOMS\Localization\L11nManager;
use phpOMS\Message\Http\HttpRequest; use phpOMS\Message\Http\HttpRequest;
use phpOMS\Message\Http\HttpResponse; use phpOMS\Message\Http\HttpResponse;
@ -31,7 +30,6 @@ use phpOMS\Message\Http\RequestStatusCode;
use phpOMS\Module\ModuleAbstract; use phpOMS\Module\ModuleAbstract;
use phpOMS\Module\ModuleManager; use phpOMS\Module\ModuleManager;
use phpOMS\Router\WebRouter; use phpOMS\Router\WebRouter;
use phpOMS\Stdlib\Base\AddressType;
use phpOMS\System\MimeType; use phpOMS\System\MimeType;
use phpOMS\Utils\TestUtils; use phpOMS\Utils\TestUtils;