fix checkbox update

This commit is contained in:
Dennis Eichhorn 2023-11-26 21:30:29 +00:00
parent 2fb040f6da
commit cf562689ce

View File

@ -116,9 +116,9 @@ final class ApiController extends Controller
*/
private function updateCommentListFromRequest(RequestAbstract $request, CommentList $new) : CommentList
{
$new->allowEdit = $request->getDataBool('allow_edit') ?? $new->allowEdit;
$new->allowVoting = $request->getDataBool('allow_voting') ?? $new->allowVoting;
$new->allowFiles = $request->getDataBool('allow_upload') ?? $new->allowFiles;
$new->allowEdit = $request->getDataBool('allow_edit') ?? false;
$new->allowVoting = $request->getDataBool('allow_voting') ?? false;
$new->allowFiles = $request->getDataBool('allow_upload') ?? false;
$new->status = $request->getDataInt('commentlist_status') ?? $new->status;
return $new;