rem: gPublishSiteData[gCurrentSiteIndex].docDir = "/"; gPublishSiteData[gCurrentSiteIndex].otherDir = "/"; gPublishSiteData[gCurrentSiteIndex].dirList = ["/"]; 
add: gPublishSiteData[gCurrentSiteIndex].docDir = ""; gPublishSiteData[gCurrentSiteIndex].otherDir = ""; gPublishSiteData[gCurrentSiteIndex].dirList = [""]; 
context: function UpdateSettings(){  // Validate and add new site  var newName = TrimString(gDialog.SiteNameInput.value);  if (!newName)  {    ShowInputErrorMessage(GetString("MissingSiteNameError"), gDialog.SiteNameInput);    return false;  }  if (PublishSiteNameExists(newName, gPublishSiteData, gCurrentSiteIndex))  {    ShowInputErrorMessage(GetString("DuplicateSiteNameError").replace(/%name%/, newName));                SetTextboxFocus(gDialog.SiteNameInput);    return false;  }  var newUrl = FormatUrlForPublishing(gDialog.PublishUrlInput.value);  if (!newUrl)  {    ShowInputErrorMessage(GetString("MissingPublishUrlError"), gDialog.PublishUrlInput);    return false;  }  // Start assuming we're updating existing site at gCurrentSiteIndex  var newSiteData = false;  if (!gPublishSiteData)  {    // First time used - Create the first site profile    gPublishSiteData = new Array(1);    gCurrentSiteIndex = 0;    newSiteData = true;  }  else if (gCurrentSiteIndex == -1)  {    // No currently-selected site,    //  must be adding a new site    // Add new data at the end of list    gCurrentSiteIndex = gPublishSiteData.length;    newSiteData = true;  }      if (newSiteData)  {    // Init new site profile    gPublishSiteData[gCurrentSiteIndex] = {};    gPublishSiteData[gCurrentSiteIndex].docDir = "/";    gPublishSiteData[gCurrentSiteIndex].otherDir = "/";    gPublishSiteData[gCurrentSiteIndex].dirList = ["/"];  }  gPublishSiteData[gCurrentSiteIndex].siteName = newName;  gPublishSiteData[gCurrentSiteIndex].publishUrl = newUrl;  gPublishSiteData[gCurrentSiteIndex].browseUrl = FormatUrlForPublishing(gDialog.BrowseUrlInput.value);  gPublishSiteData[gCurrentSiteIndex].username = TrimString(gDialog.UsernameInput.value);  gPublishSiteData[gCurrentSiteIndex].password= gDialog.PasswordInput.value;  gPublishSiteData[gCurrentSiteIndex].savePassword = gDialog.SavePassword.checked;  if (gCurrentSiteIndex == gDefaultSiteIndex)    gDefaultSiteName = newName;  // When adding the very first site, assume that's the default  if (gPublishSiteData.length == 1 && !gDefaultSiteName)  {    gDefaultSiteName = gPublishSiteData[0].siteName;    gDefaultSiteIndex = 0;  }  FillSiteList();  // Select current site in list    SetSelectedSiteIndex(gCurrentSiteIndex);  // Signal saving data to prefs  gSiteDataChanged = true;    // Clear current site flags  gSettingsChanged = false;  gAddNewSite = false;  return true;}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/b31b2d731b34704c6dee563a7f28b249affa24b7/EditorPublishSettings.js/buggy/editor/ui/dialogs/content/EditorPublishSettings.js