template fixes + bug fixes + style fixes

This commit is contained in:
Dennis Eichhorn 2024-04-02 21:40:47 +00:00
parent 99747a5fc2
commit cff678c0d4
4 changed files with 5 additions and 5 deletions

View File

@ -63,7 +63,7 @@ final class BackendController extends Controller
->with('tags/title')
->where('virtualPath', $path)
->where('tags/title/language', $response->header->l11n->language)
->execute();
->executeGetArray();
list($collection, $parent) = CollectionMapper::getCollectionsByPath($path);

View File

@ -17,7 +17,7 @@ use phpOMS\Uri\UriFactory;
/**
* @var \phpOMS\Views\View $this
*/
$templateList = \Modules\Helper\Models\TemplateMapper::getAll()->execute();
$templateList = \Modules\Helper\Models\TemplateMapper::getAll()->executeGetArray();
echo $this->data['nav']->render(); ?>

View File

@ -29,8 +29,8 @@ $accountDir = $account->id . ' ' . $account->login;
$collections = $this->data['collections'];
$mediaPath = \urldecode($this->getData('path') ?? '/');
$previous = empty($templates) ? '{/base}/helper/list' : '{/base}/helper/list?{?}&id=' . \reset($templates)->id . '&ptype=p';
$next = empty($templates) ? '{/base}/helper/list' : 'helper/list?{?}&id=' . \end($templates)->id . '&ptype=n';
$previous = empty($templates) ? '{/base}/helper/list' : '{/base}/helper/list?{?}&offset=' . \reset($templates)->id . '&ptype=p';
$next = empty($templates) ? '{/base}/helper/list' : 'helper/list?{?}&offset=' . \end($templates)->id . '&ptype=n';
echo $this->data['nav']->render(); ?>
<div class="row">

View File

@ -119,7 +119,7 @@ final class TemplateMapperTest extends \PHPUnit\Framework\TestCase
#[\PHPUnit\Framework\Attributes\TestDox('The newest model can be read from the database')]
public function testNewest() : void
{
$newest = TemplateMapper::getAll()->sort('id', OrderType::DESC)->limit(1)->execute();
$newest = TemplateMapper::getAll()->sort('id', OrderType::DESC)->limit(1)->executeGetArray();
self::assertCount(1, $newest);
}