fix old calendar name and color not being preserved when editing a calendar
This commit is contained in:
parent
3c910b812b
commit
d92b083c1d
|
@ -151,11 +151,11 @@ class OC_Calendar_Calendar{
|
||||||
$calendar = self::find($id);
|
$calendar = self::find($id);
|
||||||
|
|
||||||
// Keep old stuff
|
// 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($components)) $components = $calendar['components'];
|
||||||
if(is_null($timezone)) $timezone = $calendar['timezone'];
|
if(is_null($timezone)) $timezone = $calendar['timezone'];
|
||||||
if(is_null($order)) $order = $calendar['calendarorder'];
|
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=?' );
|
$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));
|
$result = $stmt->execute(array($name,$order,$color,$timezone,$components,$id));
|
||||||
|
|
Loading…
Reference in New Issue