diff --git a/src/app/contact/controllers/ContactController.php b/src/app/contact/controllers/ContactController.php index b7782956fa11cba05fe32ed17f3b88ebf60c3e68..5aebac7398e349caaab48be37a12600aebb3c9ed 100755 --- a/src/app/contact/controllers/ContactController.php +++ b/src/app/contact/controllers/ContactController.php @@ -216,7 +216,7 @@ class ContactController $contact = [ 'id' => $rawContact['id'], - 'civility' => $rawContact['civility'], + 'civility' => !empty($rawContact['civility']) ? ContactModel::getCivilityLabel(['civilityId' => $rawContact['civility']]) : null, 'firstname' => $rawContact['firstname'], 'lastname' => $rawContact['lastname'], 'company' => $rawContact['company'], diff --git a/src/app/contentManagement/controllers/OnlyOfficeController.php b/src/app/contentManagement/controllers/OnlyOfficeController.php index cdb8f4ba676114b6d2eb3a1b2cc8b26b9d2f3fb2..31260a148442db1e8e160bc5f2a92c5ae1b0c9f7 100644 --- a/src/app/contentManagement/controllers/OnlyOfficeController.php +++ b/src/app/contentManagement/controllers/OnlyOfficeController.php @@ -45,7 +45,7 @@ class OnlyOfficeController if (!Validator::stringType()->notEmpty()->validate($body['onlyOfficeKey'])) { return $response->withStatus(400)->withJson(['errors' => 'Query params onlyOfficeKey is empty']); - } elseif (!preg_match('/[^a-z0-9]/i', $body['onlyOfficeKey'])) { + } elseif (!preg_match('/[A-Za-z0-9]/i', $body['onlyOfficeKey'])) { return $response->withStatus(400)->withJson(['errors' => 'Query params onlyOfficeKey is forbidden']); }