rem: var term = gSearchSession.createTerm(); var value = term.value; 
add: var searchAttrib = (IsSpecialFolder(selectedFolder, MSG_FOLDER_FLAG_SENTMAIL | MSG_FOLDER_FLAG_DRAFTS | MSG_FOLDER_FLAG_QUEUE)) ? nsMsgSearchAttrib.ToOrCC : nsMsgSearchAttrib.Sender;     var termList = gSearchInput.value.split("|"); for (var i = 0; i < termList.length; i ++) {  if (termList[i] == "") continue;   var term = gSearchSession.createTerm(); var value = term.value; value.str = termList[i]; term.value = value; term.attrib = nsMsgSearchAttrib.Subject; term.op = nsMsgSearchOp.Contains; term.booleanAnd = false; searchTermsArray.AppendElement(term); 
context: function createSearchTerms(){  var nsMsgSearchScope = Components.interfaces.nsMsgSearchScope;  var nsMsgSearchAttrib = Components.interfaces.nsMsgSearchAttrib;  var nsMsgSearchOp = Components.interfaces.nsMsgSearchOp;  // create an i supports array to store our search terms   var searchTermsArray = Components.classes["@mozilla.org/supports-array;1"].createInstance(Components.interfaces.nsISupportsArray);  var selectedFolder = GetThreadPaneFolder();  var term = gSearchSession.createTerm();  var value = term.value;  value.str = gSearchInput.value;  term.value = value;  term.attrib = nsMsgSearchAttrib.Subject;  term.op = nsMsgSearchOp.Contains;  term.booleanAnd = false;  searchTermsArray.AppendElement(term);  // fill in the 2nd term  term = gSearchSession.createTerm();  if (IsSpecialFolder(selectedFolder, MSG_FOLDER_FLAG_SENTMAIL | MSG_FOLDER_FLAG_DRAFTS | MSG_FOLDER_FLAG_QUEUE))    term.attrib = nsMsgSearchAttrib.ToOrCC;  else    term.attrib = nsMsgSearchAttrib.Sender;  value = term.value;  value.str = gSearchInput.value;  term.value = value;  term.op = nsMsgSearchOp.Contains;   term.booleanAnd = false;  searchTermsArray.AppendElement(term);  // now append the default view criteria to the quick search so we don't lose any default  // view information  if (gDefaultSearchViewTerms)  {    var isupports = null;    var searchTerm;     var termsArray = gDefaultSearchViewTerms.QueryInterface(Components.interfaces.nsISupportsArray);    for (var i = 0; i < termsArray.Count(); i++)    {      isupports = termsArray.GetElementAt(i);      searchTerm = isupports.QueryInterface(Components.interfaces.nsIMsgSearchTerm);      searchTermsArray.AppendElement(searchTerm);    }  }    createSearchTermsWithList(searchTermsArray);    // now that we've added the terms, clear out our input array  searchTermsArray.Clear();}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/23f413171a38693a4eea7d6fc7b63d9d3baa2c53/searchBar.js/buggy/mailnews/base/resources/content/searchBar.js