rem: gPublishData.otherFilesURI.username = publishData.username; gPublishData.otherFilesURI.password = publishData.password; 
add: if (gPublishData.otherFilesURI) { gPublishData.otherFilesURI.username = publishData.username; gPublishData.otherFilesURI.password = publishData.password; } 
context: function Publish(publishData){  if (!publishData)    return false;  // Set data in global for username password requests  //  and to do "post saving" actions after monitoring nsIWebProgressListener messages  //  and we are sure file transfer was successful  gPublishData = publishData;  gPublishData.docURI = CreateURIFromPublishData(publishData, true);  if (!gPublishData.docURI)    return false;  gPublishData.otherFilesURI = CreateURIFromPublishData(publishData, false);  if (gShowDebugOutputStateChange)  {    dump("\n *** publishData: PublishUrl="+publishData.publishUrl+", BrowseUrl="+publishData.browseUrl+      ", Username="+publishData.username+", Dir="+publishData.docDir+      ", Filename="+publishData.filename+"\n");    dump(" * gPublishData.docURI.spec="+gPublishData.docURI.spec+"\n");  }  // XXX Missing username or password will make FTP fail   // and it won't call us for prompt dialog (bug 132320),  // so we should do the prompt before trying to publish  if (GetScheme(publishData.publishUrl) == "ftp" &&      (!publishData.username || !publishData.password))  {    var message = GetString("PromptFTPUsernamePassword").replace(/%host%/, GetHost(publishData.publishUrl));    var savePWobj = {value:publishData.savePassword};    var userObj = {value:publishData.username};    var pwObj = {value:publishData.password};    if (!PromptUsernameAndPassword(GetString("Prompt"), message, savePWobj, userObj, pwObj))      return false; // User canceled out of dialog    // Reset data in URI objects    gPublishData.docURI.username = publishData.username;    gPublishData.docURI.password = publishData.password;    gPublishData.otherFilesURI.username = publishData.username;    gPublishData.otherFilesURI.password = publishData.password;  }  try {    // We launch dialog as a dependent     // Don't allow editing document!    SetDocumentEditable(false);    // Start progress monitoring    gProgressDialog =      window.openDialog("chrome://editor/content/EditorPublishProgress.xul", "_blank",                        "chrome,dependent", gPublishData, gPersistObj);  } catch (e) {}  // Network transfer is often too quick for the progress dialog to be initialized  //  and we can completely miss messages for quickly-terminated bad URLs,  //  so we can't call OutputFileWithPersistAPI right away.  // StartPublishing() is called at the end of the dialog's onload method  return true;}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/d91b053f419d4d0175bdb25deed21f7800ac5c27/ComposerCommands.js/buggy/editor/ui/composer/content/ComposerCommands.js