rem: var str = ""; var storyList = this.mostread.list(); storyList.sort(this.sortMostReads); var len = storyList.length; var max = 25; var lim = Math.min(max, len); var param = new Object(); for (var i=0; i<lim; i++) { var s = storyList[i]; if (s.cache.reads > 0) { s.reads += s.cache.reads; s.cache.reads = 0; } param.reads = s.reads; param.rank = i+1; str += s.renderSkinAsString("mostread", param); } return(str); 
add: var str = ""; var storyList = this.mostread.list(); storyList.sort(this.sortMostReads); var len = storyList.length; var max = 25; var lim = Math.min(max, len); var param = new Object(); for (var i=0; i<lim; i++) { var s = storyList[i]; if (s.cache.reads > 0) { s.reads += s.cache.reads; s.cache.reads = 0; } param.reads = s.reads; param.rank = i+1; str += s.renderSkinAsString("mostread", param); } return(str); 
context: function listMostRead_macro() {  var str = "";  var storyList = this.mostread.list();  storyList.sort(this.sortMostReads);  var len = storyList.length;  var max = 25;  var lim = Math.min(max, len); //len > max ? max : len;  var param = new Object();  for (var i=0; i<lim; i++) {    var s = storyList[i];	  if (s.cache.reads > 0) {	  	s.reads += s.cache.reads;	  	s.cache.reads = 0;	  }    param.reads = s.reads; // + s.cache.reads;    param.rank = i+1;    str += s.renderSkinAsString("mostread", param);  }  return(str);}
meta: 993	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/993/0c446c83629128922d14f1e68ff5a9118fab2692/macros.js/buggy/code/Site/macros.js