Code Duplication    Length = 8-8 lines in 2 locations

mail/inc/class.mail_compose.inc.php 1 location

@@ 1895-1902 (lines=8) @@
1892
				if (!$eventid) $eventid = -1;
1893
				$event = $calendar_ical->importVCal($attachment['attachment'],(is_array($eventid)?$eventid[0]:$eventid),null,true);
1894
				//error_log(__METHOD__.$event);
1895
				if ((int)$event > 0)
1896
				{
1897
					$vars = array(
1898
						'menuaction'      => 'calendar.calendar_uiforms.edit',
1899
						'cal_id'      => $event,
1900
					);
1901
					$GLOBALS['egw']->redirect_link('../index.php',$vars);
1902
				}
1903
				//Import failed, download content anyway
1904
			}
1905
			if (strtoupper($attachment['type']) == 'TEXT/X-VCARD' || strtoupper($attachment['type']) == 'TEXT/VCARD')

mail/inc/class.mail_ui.inc.php 1 location

@@ 2453-2460 (lines=8) @@
2450
				if (!$eventid) $eventid = -1;
2451
				$event = $calendar_ical->importVCal($attachment['attachment'],(is_array($eventid)?$eventid[0]:$eventid),null,true,0,'',null,$attachment['charset']);
2452
				//error_log(__METHOD__.$event);
2453
				if ((int)$event > 0)
2454
				{
2455
					$vars = array(
2456
						'menuaction'      => 'calendar.calendar_uiforms.edit',
2457
						'cal_id'      => $event,
2458
					);
2459
					Egw::redirect_link('../index.php',$vars);
2460
				}
2461
				//Import failed, download content anyway
2462
			}
2463
			if (strtoupper($attachment['type']) == 'TEXT/X-VCARD' || strtoupper($attachment['type']) == 'TEXT/VCARD')