]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix old calendar name and color not being preserved when editing a calendar
authorRobin Appelman <icewind1991@gmail.com>
Wed, 11 Jan 2012 00:53:25 +0000 (01:53 +0100)
committerRobin Appelman <icewind1991@gmail.com>
Wed, 11 Jan 2012 00:53:25 +0000 (01:53 +0100)
apps/calendar/lib/calendar.php

index ea60526a5bd7e39193c5538092eb319afc36a871..4199ab5a7cc042e7c002bef8d822cf632940d95e 100644 (file)
@@ -151,11 +151,11 @@ class OC_Calendar_Calendar{
                $calendar = self::find($id);
 
                // Keep old stuff
-               if(is_null($name)) $name = $calendar['name'];
+               if(is_null($name)) $name = $calendar['displayname'];
                if(is_null($components)) $components = $calendar['components'];
                if(is_null($timezone)) $timezone = $calendar['timezone'];
                if(is_null($order)) $order = $calendar['calendarorder'];
-               if(is_null($color)) $color = $calendar['color'];
+               if(is_null($color)) $color = $calendar['calendarcolor'];
 
                $stmt = OC_DB::prepare( 'UPDATE *PREFIX*calendar_calendars SET displayname=?,calendarorder=?,calendarcolor=?,timezone=?,components=?,ctag=ctag+1 WHERE id=?' );
                $result = $stmt->execute(array($name,$order,$color,$timezone,$components,$id));