diff --git a/adminstuds.php b/adminstuds.php index 94c56485a9de023c9bb4f685e402e96ff2677e49..26a2e2825d8086ba6d5d41df73a680dbe237d9bc 100644 --- a/adminstuds.php +++ b/adminstuds.php @@ -467,10 +467,10 @@ if (isset($_POST['confirm_add_column'])) { if ($poll->format === 'D') { $date = DateTime::createFromFormat(__('Date', 'Y-m-d'), $_POST['newdate'])->setTime(0, 0, 0); $time = $date->getTimestamp(); - $newmoment = str_replace(',', '-', strip_tags($_POST['newmoment'])); + $newmoment = strip_tags($_POST['newmoment']); $adminPollService->addDateSlot($poll_id, $time, $newmoment); } else { - $newslot = str_replace(',', '-', strip_tags($_POST['choice'])); + $newslot = strip_tags($_POST['choice']); $adminPollService->addClassicSlot($poll_id, $newslot); } diff --git a/app/classes/Framadate/Services/AdminPollService.php b/app/classes/Framadate/Services/AdminPollService.php index 51760f9c288e072cd72ed78beeb99c939d5c4d10..62912c8ccd3611bededd1a519c31da5865d0ee32 100644 --- a/app/classes/Framadate/Services/AdminPollService.php +++ b/app/classes/Framadate/Services/AdminPollService.php @@ -200,7 +200,7 @@ class AdminPollService { * @throws \Doctrine\DBAL\ConnectionException */ public function addDateSlot($poll_id, $datetime, $new_moment) { - $this->logService->log('ADD_COLUMN', 'id:' . $poll_id . ', datetime:' . $datetime . ', moment:' . $new_moment); + $this->logService->log('ADD_COLUMN', 'id:' . $poll_id . ', datetime:' . $datetime . ', moment:' . str_replace(',', '-', $new_moment)); try { $slots = $this->slotRepository->listByPollId($poll_id); @@ -252,7 +252,7 @@ class AdminPollService { * @throws \Doctrine\DBAL\DBALException */ public function addClassicSlot($poll_id, $title) { - $this->logService->log('ADD_COLUMN', 'id:' . $poll_id . ', title:' . $title); + $this->logService->log('ADD_COLUMN', 'id:' . $poll_id . ', title:' . str_replace(',', '-', $title)); $slots = $this->slotRepository->listByPollId($poll_id);