@@ -183,7 +183,7 @@ public function findAll($since = -1, $details = null, $includeArchived = true) {
183183 * @throws \OCP\AppFramework\Db\MultipleObjectsReturnedException
184184 * @throws BadRequestException
185185 */
186- public function find ($ boardId ) {
186+ public function find ($ boardId, bool $ allowDeleted = false ) {
187187 $ this ->boardServiceValidator ->check (compact ('boardId ' ));
188188 if ($ this ->boardsCache && isset ($ this ->boardsCache [$ boardId ])) {
189189 return $ this ->boardsCache [$ boardId ];
@@ -194,7 +194,7 @@ public function find($boardId) {
194194
195195 $ this ->permissionService ->checkPermission ($ this ->boardMapper , $ boardId , Acl::PERMISSION_READ );
196196 /** @var Board $board */
197- $ board = $ this ->boardMapper ->find ($ boardId , true , true );
197+ $ board = $ this ->boardMapper ->find (( int ) $ boardId , true , true , $ allowDeleted );
198198 $ this ->boardMapper ->mapOwner ($ board );
199199 if ($ board ->getAcl () !== null ) {
200200 foreach ($ board ->getAcl () as $ acl ) {
@@ -369,7 +369,7 @@ public function deleteUndo($id) {
369369 $ this ->boardServiceValidator ->check (compact ('id ' ));
370370
371371 $ this ->permissionService ->checkPermission ($ this ->boardMapper , $ id , Acl::PERMISSION_MANAGE );
372- $ board = $ this ->find ($ id );
372+ $ board = $ this ->find ($ id, true );
373373 $ board ->setDeletedAt (0 );
374374 $ board = $ this ->boardMapper ->update ($ board );
375375 $ this ->activityManager ->triggerEvent (ActivityManager::DECK_OBJECT_BOARD , $ board , ActivityManager::SUBJECT_BOARD_RESTORE );
@@ -390,7 +390,7 @@ public function deleteForce($id) {
390390 $ this ->boardServiceValidator ->check (compact ('id ' ));
391391
392392 $ this ->permissionService ->checkPermission ($ this ->boardMapper , $ id , Acl::PERMISSION_MANAGE );
393- $ board = $ this ->find ($ id );
393+ $ board = $ this ->find ($ id, true );
394394 $ delete = $ this ->boardMapper ->delete ($ board );
395395
396396 return $ delete ;
0 commit comments