From 239b2cb2889371aa542bcc17d550e4cd4077372d Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Mon, 27 May 2019 21:55:41 +0200 Subject: [PATCH] Fix bugs --- Controller/ApiController.php | 4 ++++ Theme/Backend/helper-list.tpl.php | 6 ------ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/Controller/ApiController.php b/Controller/ApiController.php index 2c70178..29c8ddc 100644 --- a/Controller/ApiController.php +++ b/Controller/ApiController.php @@ -266,6 +266,10 @@ final class ApiController extends Controller $files = \json_decode($files, true); } + if (!\is_array($files)) { + $files = [$files]; + } + // TODO: make sure this user has permissions for provided files /* Create collection */ diff --git a/Theme/Backend/helper-list.tpl.php b/Theme/Backend/helper-list.tpl.php index e882404..53b4de0 100644 --- a/Theme/Backend/helper-list.tpl.php +++ b/Theme/Backend/helper-list.tpl.php @@ -16,12 +16,6 @@ $templates = $this->getData('reports'); -$footerView = new \phpOMS\Views\PaginationView($this->app, $this->request, $this->response); -$footerView->setTemplate('/Web/Templates/Lists/Footer/PaginationBig'); - -$footerView->setPages(\count($templates) / 25); -$footerView->setPage(1); -$footerView->setResults(\count($templates)); echo $this->getData('nav')->render(); ?>