rem: gCurSortType = sortType; 
add: if ((sortType == nsMsgViewSortType.byAuthor) && IsSpecialFolder(msgFolder, MSG_FOLDER_FLAG_SENTMAIL | MSG_FOLDER_FLAG_DRAFTS | MSG_FOLDER_FLAG_QUEUE)) { gCurSortType = nsMsgViewSortType.byRecipient; } else { gCurSortType = sortType; } 
context: function CreateBareDBView(msgFolder, viewType, viewFlags, sortType, sortOrder){  var dbviewContractId = "@mozilla.org/messenger/msgdbview;1?type=";  switch (viewType) {      case nsMsgViewType.eShowThreadsWithUnread:          dbviewContractId += "threadswithunread";          break;      case nsMsgViewType.eShowWatchedThreadsWithUnread:          dbviewContractId += "watchedthreadswithunread";          break;      case nsMsgViewType.eShowAllThreads:      default:          dbviewContractId += "threaded";          break;  }  gDBView = Components.classes[dbviewContractId].createInstance(Components.interfaces.nsIMsgDBView);  var isNews = isNewsURI(msgFolder.URI);  if (!viewFlags) {    if (isNews) {      // news defaults to threaded mode      viewFlags = nsMsgViewFlagsType.kThreadedDisplay;    }  }  if (!sortType) {    if (isNews) {      // news defaults to threaded mode      sortType = nsMsgViewSortType.byThread;    }    else {      sortType = nsMsgViewSortType.byDate;    }  }  if (!sortOrder) {    sortOrder = nsMsgViewSortOrder.ascending;  }  gCurViewFlags = viewFlags;  var count = new Object;  if (!gThreadPaneCommandUpdater)    gThreadPaneCommandUpdater = new nsMsgDBViewCommandUpdater();  gCurSortType = sortType;  gDBView.init(messenger, msgWindow, gThreadPaneCommandUpdater);  gDBView.open(msgFolder, sortType, sortOrder, viewFlags, count);}
meta: 5872	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5872/8239f76daad964c0fd795555b2830b8ed78a3257/commandglue.js/clean/mailnews/base/resources/content/commandglue.js