Skip to content
Snippets Groups Projects
Commit d92b083c authored by Robin Appelman's avatar Robin Appelman
Browse files

fix old calendar name and color not being preserved when editing a calendar

parent 3c910b81
No related branches found
No related tags found
No related merge requests found
......@@ -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));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment