rem: var sitelist = collection.list(); var sorter = function(a, b) { var str1 = a.site.title.toLowerCase(); var str2 = b.site.title.toLowerCase(); if (str1 > str2) 
add: var list = collection.list(); list.sort(function(a, b) { var title1 = a.value("site").value("title").toLowerCase(); var title2 = b.value("site").value("title").toLowerCase(); if (title1 > title2) { 
context: MemberMgr.prototype.renderSubscriptionView = function(collection, title) {   var sitelist = collection.list();   var sorter = function(a, b) {      var str1 = a.site.title.toLowerCase();      var str2 = b.site.title.toLowerCase();      if (str1 > str2)         return 1;      else if (str1 < str2)         return -1;      return 0;   }   sitelist.sort(sorter);   res.data.title = getMessage("MemberMgr.subscriptionsTitle", {titel: title, userName: session.user.name});   res.data.sitelist = renderList(sitelist, "subscriptionlistitem");   res.data.body = session.user.renderSkinAsString("subscriptions");   res.handlers.context.renderSkin("page");   return;};
meta: 993	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/993/c7d828aae929f391c4119da3d964e439a7f89e95/MemberMgr.js/buggy/code/MemberMgr/MemberMgr.js