Code Duplication    Length = 11-14 lines in 2 locations

calendar/inc/class.calendar_ical.inc.php 2 locations

@@ 1689-1702 (lines=14) @@
1686
					case 'SERIES-MASTER':
1687
					case 'SERIES-EXCEPTION':
1688
					case 'SERIES-EXCEPTION-PROPAGATE':
1689
						if (is_array($event_info['stored_event'])) // status update requires a stored event
1690
						{
1691
							if ($event_info['acl_edit'])
1692
							{
1693
								// update all participants if we have the right to do that
1694
								$this->update_status($event, $event_info['stored_event'],0,$skip_notification);
1695
							}
1696
							elseif (isset($event['participants'][$this->user]) || isset($event_info['stored_event']['participants'][$this->user]))
1697
							{
1698
								// update the users status only
1699
								$this->set_status($event_info['stored_event']['id'], $this->user,
1700
									($event['participants'][$this->user] ? $event['participants'][$this->user] : 'R'), 0, true,true,$skip_notification);
1701
							}
1702
						}
1703
						break;
1704
1705
					case 'SERIES-PSEUDO-EXCEPTION':
@@ 1709-1719 (lines=11) @@
1706
						if (is_array($event_info['master_event'])) // status update requires a stored master event
1707
						{
1708
							$recurrence = $this->date2usertime($event['recurrence']);
1709
							if ($event_info['acl_edit'])
1710
							{
1711
								// update all participants if we have the right to do that
1712
								$this->update_status($event, $event_info['stored_event'], $recurrence,$skip_notification);
1713
							}
1714
							elseif (isset($event['participants'][$this->user]) || isset($event_info['master_event']['participants'][$this->user]))
1715
							{
1716
								// update the users status only
1717
								$this->set_status($event_info['master_event']['id'], $this->user,
1718
									($event['participants'][$this->user] ? $event['participants'][$this->user] : 'R'), $recurrence, true,true,$skip_notification);
1719
							}
1720
						}
1721
						break;
1722
				}