From d5773b8c6ea0fd5fb56d815134a6a44c866815ee Mon Sep 17 00:00:00 2001 From: Tim Schumacher Date: Mon, 17 Nov 2014 22:57:04 +0100 Subject: [PATCH] Strip new lines for ical files. --- src/Hackspace/Bundle/CalciferBundle/Entity/Event.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Hackspace/Bundle/CalciferBundle/Entity/Event.php b/src/Hackspace/Bundle/CalciferBundle/Entity/Event.php index eb23903..8c0c4c7 100755 --- a/src/Hackspace/Bundle/CalciferBundle/Entity/Event.php +++ b/src/Hackspace/Bundle/CalciferBundle/Entity/Event.php @@ -5,7 +5,7 @@ namespace Hackspace\Bundle\CalciferBundle\Entity; use Doctrine\ORM\Mapping as ORM; -use Jsvrcek\ICS\Model\Description\Location; +use Jsvrcek\ICS\Model\Description\Location As EventLocation; use Symfony\Component\Validator\Constraints\DateTime; use Jsvrcek\ICS\Model\Calendar; use Jsvrcek\ICS\Model\CalendarEvent; @@ -151,7 +151,7 @@ class Event extends BaseEntity $event->setSummary($this->summary); $event->setUrl($this->url); if ($this->location instanceof Location) { - $location = new Location(); + $location = new EventLocation(); $location->setName($this->location->name); $event->setLocations([$location]); if (\is_float($this->location->lon) && \is_float($this->location->lat)) { @@ -161,7 +161,7 @@ class Event extends BaseEntity $event->setGeo($geo); } } - $event->setDescription($this->description); + $event->setDescription(str_replace("\r","",str_replace("\n",'\n',$this->description))); return $event; } }