migration from framadate 1 choice name using separator for timeSlices in name

This commit is contained in:
Tykayn 2021-05-18 23:42:10 +02:00 committed by tykayn
parent afef8edd0b
commit 5716642c09
1 changed files with 2 additions and 2 deletions

View File

@ -97,10 +97,10 @@ class MigrationController extends EmailsController {
$moments = explode( ',', $d->moments );
foreach ( $moments as $moment ) {
$newChoice = new Choice();
$dateOfDay = date_create( strtotime( $d->title ) );
$newChoice
->setPoll( $poll )
->setDateTime( date_create( strtotime( $d->title ) ) )
->setName( $moment );
->setName( $dateOfDay->format('y-m-d'). ' >>> ' . $moment );
$pollChoicesOrderedBySlug[ $pollSlug ][] = $newChoice;
$poll->addChoice( $newChoice );