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:
parent
ff0da0cf49
commit
60207dc361
@ -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 ) {
|
||||
|
Loading…
Reference in New Issue
Block a user