From 80cf043f1d026b0ec68e37e7a70a1c52d0214606 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Fri, 21 Mar 2025 02:48:19 +0000 Subject: [PATCH] crash backup --- Controller/ApiController.php | 2 +- Controller/BackendController.php | 6 +++--- Theme/Backend/kanban-card.tpl.php | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Controller/ApiController.php b/Controller/ApiController.php index f898034..79d2d91 100755 --- a/Controller/ApiController.php +++ b/Controller/ApiController.php @@ -347,7 +347,7 @@ final class ApiController extends Controller public function apiKanbanBoardUpdate(RequestAbstract $request, ResponseAbstract $response, array $data = []) : void { /** @var \Modules\Kanban\Models\KanbanBoard $old */ - $old = KanbanBoardMapper::get()->where('id', (int) $request->getData('id'))->execute(); + $old = KanbanBoardMapper::get()->where('id', $request->getDataInt('id') ?? 0)->execute(); $new = $this->updateBoardFromRequest($request, clone $old); $this->updateModel($request->header->account, $old, $new, KanbanBoardMapper::class, 'board', $request->getOrigin()); diff --git a/Controller/BackendController.php b/Controller/BackendController.php index 6ea0c9b..c4a4ab1 100755 --- a/Controller/BackendController.php +++ b/Controller/BackendController.php @@ -112,7 +112,7 @@ final class BackendController extends Controller ->with('columns/cards/commentList/comments') ->with('columns/cards/tags') ->with('columns/cards/tags/title') - ->where('id', (int) $request->getData('id')) + ->where('id', $request->getDataInt('id') ?? 0) ->where('columns/cards/tags/title/language', $request->header->l11n->language) ->sort('columns/order', OrderType::ASC) ->execute(); @@ -161,7 +161,7 @@ final class BackendController extends Controller $view->data['board'] = KanbanBoardMapper::get() ->with('columns') - ->where('id', (int) $request->getData('id')) + ->where('id', $request->getDataInt('id') ?? 0) ->execute(); if ($view->data['board']->id === 0) { @@ -267,7 +267,7 @@ final class BackendController extends Controller ->with('commentList/comments') ->with('commentList/comments/files') ->with('commentList/comments/createdBy') - ->where('id', (int) $request->getData('id')) + ->where('id', $request->getDataInt('id') ?? 0) ->where('tags/title/language', $response->header->l11n->language) ->execute(); diff --git a/Theme/Backend/kanban-card.tpl.php b/Theme/Backend/kanban-card.tpl.php index 9b32f1b..62ac11e 100755 --- a/Theme/Backend/kanban-card.tpl.php +++ b/Theme/Backend/kanban-card.tpl.php @@ -88,11 +88,11 @@ $commentList = $card->commentList; if ($this->data['commentPermissions']['write'] && $commentList?->status === CommentListStatus::ACTIVE ) : - echo $this->getData('commentCreate')->render(1); + echo $this->data['commentCreate']->render(1); endif; if ($this->data['commentPermissions']['list_modify'] || ($this->data['commentPermissions']['list_read'] && $commentList->status !== CommentListStatus::INACTIVE) ) : - echo $this->getData('commentList')->render($commentList); + echo $this->data['commentList']->render($commentList); endif;