rem: var actualSortColumn; if (gAbView && gCurDirectory == GetSelectedDirectory()) 
add: var sortColumn = kDefaultSortColumn; var sortDirection = kDefaultAscending;  if (gAbView) { sortColumn = gAbView.sortColumn; sortDirection = gAbView.sortDirection; } else { if (document.getElementById("abResultsTree").hasAttribute("sortCol")) sortColumn = document.getElementById("abResultsTree").getAttribute("sortCol"); if (document.getElementById(sortColumn).hasAttribute("sortDirection")) sortDirection = document.getElementById(sortColumn).getAttribute("sortDirection"); }  if (!gAbView || (gCurDirectory != GetSelectedDirectory())) 
context: function SetAbView(uri, searchView, sortColumn, sortDirection){  var actualSortColumn;  if (gAbView && gCurDirectory == GetSelectedDirectory())  {    // re-init the view    actualSortColumn = gAbView.init(uri, searchView, GetAbViewListener(), sortColumn, sortDirection);  }  else{  CloseAbView();    gCurDirectory = GetSelectedDirectory();  if (!sortColumn)    sortColumn = kDefaultSortColumn;  if (!sortDirection)    sortDirection = kDefaultAscending;  gAbView = Components.classes["@mozilla.org/addressbook/abview;1"].createInstance(Components.interfaces.nsIAbView);    actualSortColumn = gAbView.init(uri, searchView, GetAbViewListener(), sortColumn, sortDirection);  }  var boxObject = GetAbResultsBoxObject();  boxObject.view = gAbView.QueryInterface(Components.interfaces.nsITreeView);  UpdateSortIndicators(sortColumn, sortDirection);    return actualSortColumn;}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/87155c66dd1749b48ca58b0ba0484325530f2877/abCommon.js/buggy/mailnews/addrbook/resources/content/abCommon.js