rem:  if( silent ) gICalLib.addEvent( calendarEvent, defaultServer.path ); else editNewEvent( calendarEvent ); } else if( isToDo( calendarEventArray[i] ) ) {  calendarTodo = calendarEventArray[i];   if( gICalLib.fetchTodo( calendarTodo.id ) != null ) { calendarTodo.id = createUniqueID( ); }   if( silent ){alert(defaultServer.path); gICalLib.addTodo( calendarTodo, defaultServer.path );} else gICalLib.addTodo( calendarTodo, defaultServer.path );   } 
add:  if( silent ) gICalLib.addEvent( calendarEvent ); else editNewEvent( calendarEvent ); 
context: function addEventsToCalendar( calendarEventArray, silent ){   var defaultServer = gCalendarWindow.calendarManager.calendars[0];   for(var i = 0; i < calendarEventArray.length; i++)   {      if( isEvent( calendarEventArray[i] ) )      {         var calendarEvent = calendarEventArray[i];	                // Check if event with same ID already in Calendar. If so, import event with new ID.         if( gICalLib.fetchEvent( calendarEvent.id ) != null ) {            calendarEvent.id = createUniqueID( );         }         // the start time is in zulu time, need to convert to current time         if(calendarEvent.allDay != true)         convertZuluToLocal( calendarEvent );         // open the event dialog with the event to add         if( silent )            gICalLib.addEvent( calendarEvent, defaultServer.path );         else            editNewEvent( calendarEvent );      }       else if( isToDo( calendarEventArray[i] ) )      {         //          calendarTodo = calendarEventArray[i];	                // Check if task with same ID already in Calendar. If so, import task with new ID.         if( gICalLib.fetchTodo( calendarTodo.id ) != null ) {            calendarTodo.id = createUniqueID( );         }         // open the todo dialog with the task to add         if( silent ){alert(defaultServer.path);            gICalLib.addTodo( calendarTodo, defaultServer.path );}         else            gICalLib.addTodo( calendarTodo, defaultServer.path );            // XXX TODO: add support to add todo using dialog            // editToDo( calendarTodo );      }   }}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/5d261082cfdf78e9abe5a109fca55443e889fab5/importExport.js/buggy/calendar/resources/content/importExport.js