rem: aItemArray.length, aItemArray); 
add: aItemArray.length, aItemArray, null); 
context: function publishItemArray(aItemArray, aPath, aProgressDialog) {    var outputStream;    var inputStream;    var storageStream;    var icsURL = makeURL(aPath);    var ioService = Components.classes["@mozilla.org/network/io-service;1"]                              .getService(Components.interfaces.nsIIOService);    var channel = ioService.newChannelFromURI(icsURL);    if (icsURL.schemeIs('webcal'))        icsURL.scheme = 'http';    if (icsURL.schemeIs('webcals'))        icsURL.scheme = 'https';            switch(icsURL.scheme) {        case 'http':        case 'https':            channel = channel.QueryInterface(Components.interfaces.nsIHttpChannel);            break;        case 'ftp':            channel = channel.QueryInterface(Components.interfaces.nsIFTPChannel);            break;        case 'file':            channel = channel.QueryInterface(Components.interfaces.nsIFileChannel);            break;        default:            dump("No such scheme\n");            return;    }    var uploadChannel = channel.QueryInterface(Components.interfaces.nsIUploadChannel);    uploadChannel.notificationCallbacks = notificationCallbacks;    storageStream = Components.classes["@mozilla.org/storagestream;1"]                                  .createInstance(Components.interfaces.nsIStorageStream);    storageStream.init(32768, 0xffffffff, null);    outputStream = storageStream.getOutputStream(0);    var exporter = Components.classes["@mozilla.org/calendar/export;1?type=ics"]                             .getService(Components.interfaces.calIExporter);    exporter.exportToStream(outputStream,                            aItemArray.length, aItemArray);    outputStream.close();    inputStream = storageStream.newInputStream(0);    uploadChannel.setUploadStream(inputStream,                                  "text/calendar", -1);    try {        channel.asyncOpen(publishingListener, aProgressDialog);    } catch (e) {        var calendarStringBundle = srGetStrBundle("chrome://calendar/locale/calendar.properties");        var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]                                      .getService(Components.interfaces.nsIPromptService);        promptService.alert(null, calendarStringBundle.GetStringFromName('errorTitle'),                            calendarStringBundle.formatStringFromName('otherPutError',[e.message],1));    }}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/e688c0f74d5a222e41a6e3b715a5d797856a964b/publish.js/clean/calendar/resources/content/publish.js