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

This commit is contained in:
Robin Appelman 2012-01-11 01:53:25 +01:00
parent 3c910b812b
commit d92b083c1d
1 changed files with 2 additions and 2 deletions

View 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));