1
0
mirror of https://framagit.org/tykayn/date-poll-api synced 2023-08-25 08:23:11 +02:00

check field add poll

This commit is contained in:
Tykayn 2021-04-30 23:49:02 +02:00 committed by tykayn
parent ff0da0cf49
commit 60207dc361

View File

@ -250,7 +250,10 @@ class PollController extends EmailsController {
// emails
$newpoll->setMailOnComment( true );
if(isset($data['isOwnerNotifiedByEmailOnNewVote'])){
$newpoll->setMailOnVote( $data['isOwnerNotifiedByEmailOnNewVote'] );
}
$newpoll->setDescription( $data['description'] );
$newpoll->setHideResults( false );
// possible answers
@ -278,7 +281,7 @@ class PollController extends EmailsController {
elseif ( $data[ 'kind' ] == 'date' ) {
$choices = $data[ 'dateChoices' ];
if ( $data[ 'hasSeveralHours' ] == true ) {
if ( isset($data[ 'hasSeveralHours' ]) && $data[ 'hasSeveralHours' ] == true ) {
// different hours spans make more choices
foreach ( $choices as $c ) {