From b40eca92d8e5cfd561855a440550fecc86ca4bdc Mon Sep 17 00:00:00 2001
From: emkael <emkael@tlen.pl>
Date: Wed, 16 Mar 2016 23:41:41 +0100
Subject:  * custom name in calendar DTO

---
 app/php/dto/CalendarDTO.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/php/dto/CalendarDTO.php b/app/php/dto/CalendarDTO.php
index a222cd6..57636f3 100644
--- a/app/php/dto/CalendarDTO.php
+++ b/app/php/dto/CalendarDTO.php
@@ -10,7 +10,7 @@ class CalendarDTO {
 
     public function loadRecord(Calendar $calendarRecord) {
         $this->ID = $calendarRecord->UID;
-        $this->Name = $calendarRecord->Name;
+        $this->Name = $calendarRecord->CustomName ?: $calendarRecord->Name;
         $this->Website = $calendarRecord->Website;
     }
 
-- 
cgit v1.2.3