Fixed duplicated tags creation
Change-Id: I59100984ed54aad9f2c1b1fb3c0331065ecb4e29
This commit is contained in:
parent
aecde32468
commit
08e644a434
@ -59,7 +59,8 @@ final class DoctrineTagRepository
|
||||
->from(\models\main\Tag::class, "t")
|
||||
->where('UPPER(TRIM(t.tag)) = UPPER(TRIM(:tag))')
|
||||
->setParameter('tag', $tag)
|
||||
->getQuery()->getFirstResult();
|
||||
->setMaxResults(1)
|
||||
->getQuery()->getOneOrNullResult();
|
||||
}
|
||||
catch(NoResultException $e){
|
||||
return null;
|
||||
|
@ -73,12 +73,23 @@ final class VanderpoelScheduleFeed extends AbstractExternalScheduleFeed
|
||||
'start_date' => $event['start_timestamp'],
|
||||
'end_date' => $event['end_timestamp'],
|
||||
'speakers' => $speakers,
|
||||
'tags' => utf8_encode($event["keywords"])
|
||||
'tags' => self::encode_array($event["keywords"])
|
||||
];
|
||||
}
|
||||
return $events;
|
||||
}
|
||||
|
||||
private static function encode_array($array){
|
||||
if(is_array($array)){
|
||||
$res = [];
|
||||
foreach ($array as $element){
|
||||
$res[] = utf8_encode($element);
|
||||
}
|
||||
return $res;
|
||||
}
|
||||
return $array;
|
||||
}
|
||||
|
||||
public function getSpeakers(): array
|
||||
{
|
||||
return $this->speakers;
|
||||
|
Loading…
Reference in New Issue
Block a user