diff --git a/Controller/ApiController.php b/Controller/ApiController.php index 960f578..67e6722 100755 --- a/Controller/ApiController.php +++ b/Controller/ApiController.php @@ -107,9 +107,11 @@ final class ApiController extends Controller $accounts[] = $card->createdBy->id; } - foreach ($card->commentList->comments as $element) { - if ($element->createdBy->id !== $comment->createdBy->id) { - $accounts[] = $element->createdBy->id; + if ($card->commentList !== null) { + foreach ($card->commentList->comments as $element) { + if ($element->createdBy->id !== $comment->createdBy->id) { + $accounts[] = $element->createdBy->id; + } } } @@ -456,7 +458,14 @@ final class ApiController extends Controller public function apiCommentCreate(RequestAbstract $request, ResponseAbstract $response, array $data = []) : void { $this->app->moduleManager->get('Comment', 'Api')->apiCommentCreate($request, $response, $data); - $comment = $response->getDataArray($request->uri->__toString())['response']; + $comment = $response->getDataArray($request->uri->__toString())['response'] ?? null; + + if ($comment === null) { + $response->header->status = RequestStatusCode::R_400; + $this->createInvalidCreateResponse($request, $response, $comment); + + return; + } $this->createCommentNotifications($comment, $request); } diff --git a/Docs/Dev/en/structure.md b/Docs/Dev/en/structure.md deleted file mode 100755 index 170446d..0000000 --- a/Docs/Dev/en/structure.md +++ /dev/null @@ -1,5 +0,0 @@ -# Structure - -## ER - -![ER](Modules/Kanban/Docs/Dev/img/er.png) \ No newline at end of file diff --git a/Docs/Dev/img/er.png b/Docs/Dev/img/er.png deleted file mode 100644 index 1671f01..0000000 Binary files a/Docs/Dev/img/er.png and /dev/null differ diff --git a/Docs/introduction.md b/Docs/introduction.md index 9933308..857550a 100755 --- a/Docs/introduction.md +++ b/Docs/introduction.md @@ -4,11 +4,11 @@ The **Kanban** module allows users to create kanban boards to manage projects, e ## Target Group -The target groups for this module is everyone who would like to manage projects and events in a kanban style. +The target groups for this module is everyone who would like to manage projects and events in a kanban style. # Setup -The module can be installed through the integrated module downloader and installer or by uploading the module into the `Modules/` directory and executing the installation through the module installer. +The module can be installed through the integrated module downloader and installer or by uploading the module into the `Modules/` directory and executing the installation through the module installer. The module is depending on the **Editor** module which provides most of the writing features and the **Tasks** module for generating the tasks. @@ -19,7 +19,3 @@ Other modules that work great with this one together are: * [Tasks](Tasks) * [ProjectManagement](ProjectManagement) * [EventManagement](EventManagement) - -# Dependencies - -* [Editor](Editor) diff --git a/Theme/Backend/Lang/de.lang.php b/Theme/Backend/Lang/de.lang.php index 1f7598c..a321f36 100755 --- a/Theme/Backend/Lang/de.lang.php +++ b/Theme/Backend/Lang/de.lang.php @@ -20,8 +20,8 @@ return ['Kanban' => [ 'Back' => 'Zurück', 'Date' => 'Datum', 'Description' => 'Beschreibung', - 'Columns' => 'Spalten', - 'Column' => 'Spalte', + 'Columns' => 'Spalten', + 'Column' => 'Spalte', 'Order' => 'Order', 'Board' => 'Board', 'Name' => 'Name', diff --git a/Theme/Backend/Lang/en.lang.php b/Theme/Backend/Lang/en.lang.php index e458af8..a61a742 100755 --- a/Theme/Backend/Lang/en.lang.php +++ b/Theme/Backend/Lang/en.lang.php @@ -21,8 +21,8 @@ return ['Kanban' => [ 'Date' => 'Date', 'Description' => 'Description', 'Order' => 'Order', - 'Columns' => 'Columns', - 'Column' => 'Column', + 'Columns' => 'Columns', + 'Column' => 'Column', 'Board' => 'Board', 'Name' => 'Name', 'Status' => 'Status', diff --git a/Theme/Backend/kanban-card.tpl.php b/Theme/Backend/kanban-card.tpl.php index 79d0838..3c96f9e 100755 --- a/Theme/Backend/kanban-card.tpl.php +++ b/Theme/Backend/kanban-card.tpl.php @@ -16,7 +16,7 @@ use Modules\Comments\Models\CommentListStatus; use phpOMS\Uri\UriFactory; /** @var \Modules\Kanban\Models\KanbanCard $card */ -$card = $this->data['card']; +$card = $this->data['card']; $isNew = $card->id === 0; $editPossible = $card->createdBy->id === $this->request->header->account; diff --git a/info.json b/info.json index e6c52da..1f36b13 100755 --- a/info.json +++ b/info.json @@ -12,7 +12,7 @@ }, "creator": { "name": "Jingga", - "website": "jingga.app" + "website": "https://jingga.app" }, "description": "Kanban module.", "directory": "Kanban",