rem: gSearchSession.addScopeTerm(GetScopeForFolder(realFolder), realFolder); 
add: gSearchSession.addScopeTerm(!searchOnline ? nsMsgSearchScope.offlineMail : GetScopeForFolder(realFolder), realFolder); 
context: function setupXFVirtualFolderSearch(folderUrisToSearch, searchTerms){    var count = new Object;  var i;    gSearchSession = Components.classes[searchSessionContractID].createInstance(Components.interfaces.nsIMsgSearchSession);    gMailSession = Components.classes[mailSessionContractID].getService(Components.interfaces.nsIMsgMailSession);  for (i in folderUrisToSearch)    {      var realFolderRes = GetResourceFromUri(folderUrisToSearch[i]);      var realFolder = realFolderRes.QueryInterface(Components.interfaces.nsIMsgFolder);      if (!realFolder.isServer)        gSearchSession.addScopeTerm(GetScopeForFolder(realFolder), realFolder);    }    var termsArray = searchTerms.QueryInterface(Components.interfaces.nsISupportsArray);  for (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/f38fadfb590160f5c9bb31183868c8850643901a/commandglue.js/clean/mailnews/base/resources/content/commandglue.js