diff --git a/Controller/BackendController.php b/Controller/BackendController.php index 3c6c6d0..8d1cdb7 100755 --- a/Controller/BackendController.php +++ b/Controller/BackendController.php @@ -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); diff --git a/Theme/Backend/helper-create.tpl.php b/Theme/Backend/helper-create.tpl.php index a0968e7..af55a2d 100755 --- a/Theme/Backend/helper-create.tpl.php +++ b/Theme/Backend/helper-create.tpl.php @@ -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(); ?> diff --git a/Theme/Backend/helper-list.tpl.php b/Theme/Backend/helper-list.tpl.php index daca02b..ed5b185 100755 --- a/Theme/Backend/helper-list.tpl.php +++ b/Theme/Backend/helper-list.tpl.php @@ -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(); ?>
diff --git a/tests/Models/TemplateMapperTest.php b/tests/Models/TemplateMapperTest.php index e0649b8..a91a402 100755 --- a/tests/Models/TemplateMapperTest.php +++ b/tests/Models/TemplateMapperTest.php @@ -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); }