rem: gSearchSession.addScopeTerm(gSearchInput.searchMode == kQuickSearchBody && !ioService.offline ? nsMsgSearchScope.onlineMail : nsMsgSearchScope.offlineMail, selectedFolder); 
add: gSearchSession.addScopeTerm(gSearchInput.searchMode == kQuickSearchBody && !ioService.offline && selectedFolder.server.type == 'imap' ? nsMsgSearchScope.onlineMail : nsMsgSearchScope.offlineMail, selectedFolder); 
context: function createSearchTermsWithList(aTermsArray){  var nsMsgSearchScope = Components.interfaces.nsMsgSearchScope;  var nsMsgSearchAttrib = Components.interfaces.nsMsgSearchAttrib;  var nsMsgSearchOp = Components.interfaces.nsMsgSearchOp;  gSearchSession.clearScopes();  var searchTerms = gSearchSession.searchTerms;  var searchTermsArray = searchTerms.QueryInterface(Components.interfaces.nsISupportsArray);  searchTermsArray.Clear();  var selectedFolder = GetThreadPaneFolder();  var ioService = Components.classes["@mozilla.org/network/io-service;1"]                  .getService(Components.interfaces.nsIIOService);  gSearchSession.addScopeTerm(gSearchInput.searchMode == kQuickSearchBody && !ioService.offline ? nsMsgSearchScope.onlineMail : nsMsgSearchScope.offlineMail, selectedFolder);  // add each item in termsArray to the search session  var termsArray = aTermsArray.QueryInterface(Components.interfaces.nsISupportsArray);  for (var i = 0; i < termsArray.Count(); i++)    gSearchSession.appendTerm(termsArray.GetElementAt(i).QueryInterface(Components.interfaces.nsIMsgSearchTerm));}
meta: 5872	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5872/6de4b3f3d80f57b0b9e585271b1d14a13dbd2b0b/searchBar.js/buggy/mail/base/content/searchBar.js