mirror of
https://framagit.org/tykayn/date-poll-api
synced 2023-08-25 08:23:11 +02:00
migration from framadate 1 choice name using separator for timeSlices in name
This commit is contained in:
parent
afef8edd0b
commit
5716642c09
@ -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 );
|
||||
|
Loading…
Reference in New Issue
Block a user