add:   var autoPublishEnabled = false; var serverInArray = false; for( i = 0; i < gAllEvents.length; i++ ) { var eachEvent = gAllEvents[i].event; var calendarServer = opener.gCalendarWindow.calendarManager.getCalendarByName( eachEvent.parent.server );  if( calendarServer.getAttribute( "http: {  if( !autoPublishEnabled) autoPublishEnabled = true;   if( calendarsToPublish.length == 0 ) serverInArray = false; else {  serverInArray = false; for( var j = 0; j < calendarsToPublish.length; j++ ) { if( calendarsToPublish[j].getAttribute( "http: calendarServer.getAttribute( "http: { serverInArray = true; } } }   if( !serverInArray ) calendarsToPublish[ calendarsToPublish.length ] = calendarServer; } }   if( autoPublishEnabled ) { for( i = 0; i < calendarsToPublish.length; i++ ) { opener.gCalendarWindow.calendarManager.publishCalendar( calendarsToPublish[i] ); } }  
context: function onOkButton( ){   //this would acknowledge all the alarms   for( i = 0; i < gAllEvents.length; i++ )   {      gAllEvents[i].lastAlarmAck = new Date();   }   for( i = 0; i < gAllEvents.length; i++ )   {      gICalLib.modifyEvent( gAllEvents[i] );   }   return( true );}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/03b54c79062246ab92415b18a22faf2e06834db6/alertDialog.js/buggy/calendar/resources/content/alertDialog.js