Code Duplication    Length = 8-8 lines in 2 locations

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

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

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

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