Skip to content

Commit

Permalink
template fixes + bug fixes + style fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Dennis Eichhorn committed Apr 2, 2024
1 parent 62c0921 commit ae08723
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
8 changes: 4 additions & 4 deletions Controller/BackendController.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,20 +75,20 @@ public function viewProfileList(RequestAbstract $request, ResponseAbstract $resp
$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 */
Expand Down Expand Up @@ -162,7 +162,7 @@ public function viewProfileView(RequestAbstract $request, ResponseAbstract $resp
->with('createdBy')
->where('createdBy', (int) $profile->account->id)
->limit(25)
->execute();
->executeGetArray();

$view->data['media'] = $media;

Expand Down
4 changes: 2 additions & 2 deletions Theme/Backend/profile-list.tpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
*/
$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';
?>
<div class="row">
<div class="col-xs-12">
Expand Down
2 changes: 0 additions & 2 deletions tests/Controller/ApiControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,13 @@
use phpOMS\Application\ApplicationAbstract;
use phpOMS\Dispatcher\Dispatcher;
use phpOMS\Event\EventManager;
use phpOMS\Localization\ISO3166TwoEnum;
use phpOMS\Localization\L11nManager;
use phpOMS\Message\Http\HttpRequest;
use phpOMS\Message\Http\HttpResponse;
use phpOMS\Message\Http\RequestStatusCode;
use phpOMS\Module\ModuleAbstract;
use phpOMS\Module\ModuleManager;
use phpOMS\Router\WebRouter;
use phpOMS\Stdlib\Base\AddressType;
use phpOMS\System\MimeType;
use phpOMS\Utils\TestUtils;

Expand Down

0 comments on commit ae08723

Please sign in to comment.