rem: var name = promptService.prompt(window,renameTitle,promptStr,result,null,{value:0}); if ((!result.value) || (result.value == "") || result.value == currentName)     return(false); 
add: var confirmed = promptService.prompt(window,renameTitle,promptStr,result,null,{value:0}); if (!confirmed || (!result.value) || (result.value == "") || result.value == currentName)     return(false); 
context: function RenameCategory(){  // make sure we have at least one category  var categoryPopup = document.getElementById( "categoryPopup" );  if (!categoryPopup) return(false);  if (categoryPopup.childNodes.length < 1)  return(false);  var categoryList = document.getElementById( "categoryList" );  var currentName = categoryList.selectedItem.getAttribute("label");  var promptStr = bundle.GetStringFromName("RenameCategoryPrompt");  var renameTitle = bundle.GetStringFromName("RenameCategoryTitle");  var result = {value:currentName};  var name = promptService.prompt(window,renameTitle,promptStr,result,null,{value:0});  if ((!result.value) || (result.value == "") || result.value == currentName)     return(false);  var currentCatID = categoryList.selectedItem.getAttribute("id");  var currentCatRes = RDF.GetResource(currentCatID);  if (!currentCatRes) return(false);  var titleRes = RDF.GetResource("http://home.netscape.com/NC-rdf#title");  if (!titleRes)  return(false);  var newName = RDF.GetLiteral(result.value);  if (!newName) return(false);  var oldName = catDS.GetTarget(currentCatRes, titleRes, true);  if (oldName)  oldName = oldName.QueryInterface(Components.interfaces.nsIRDFLiteral);  if (oldName)  {    catDS.Change(currentCatRes, titleRes, oldName, newName);  }  else  {    catDS.Assert(currentCatRes, titleRes, newName, true);  }  // force popup to update  chooseCategory(categoryList.selectedItem);  return(true);}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/74fc600bb502409292d054147ee8515f644bd672/search-editor.js/buggy/suite/common/search/search-editor.js