rem: var story = site.allcontent.get(i); 
add: var story = site.stories.all.get(i); 
context: function storylist_macro(param) {   // disable caching of any contentPart containing this macro   res.meta.cachePart = false;   var site = param.of ? root.get(param.of) : res.handlers.site;   if (!site)      return;   // untrusted sites are only allowed to use "light" version   if (res.handlers.site && !res.handlers.site.trusted) {      param.limit = param.limit ? Math.min(site.allstories.count(), parseInt(param.limit), 50) : 25;      for (var i=0; i<param.limit; i++) {         var story = site.allcontent.get(i);         if (!story)            continue;         res.write(param.itemprefix);         html.openLink({href: story.href()});         var str = story.title;         if (!str)            str = story.getRenderedContentPart("text").stripTags().clip(10, "...", "\\s").softwrap(30);         res.write(str ? str : "...");         html.closeLink();         res.write(param.itemsuffix);      }      return;   }   // this is db-heavy action available for trusted users only (yet?)   if (param.sortby != "title" && param.sortby != "createtime" && param.sortby != "modifytime")      param.sortby = "modifytime";   if (param.order != "asc" && param.order != "desc")      param.order = "asc";   var order = " order by TEXT_" + param.sortby.toUpperCase() + " " + param.order;   var rel = "";   if (param.show == "stories")      rel += " and TEXT_PROTOTYPE = 'story'";   else if (param.show == "comments")      rel += " and TEXT_PROTOTYPE = 'comment'";   if (param.topic)      rel += " and TEXT_TOPIC = '" + param.topic + "'";   var query = "select TEXT_ID from AV_TEXT where TEXT_F_SITE = " + site._id + " and TEXT_ISONLINE > 0" + rel + order;   var connex = getDBConnection("antville");   var rows = connex.executeRetrieval(query);   if (rows) {      var cnt = 0;      param.limit = param.limit ? Math.min(parseInt(param.limit), 100) : 25;      while (rows.next() && (cnt < param.limit)) {         cnt++;         var id = rows.getColumnItem("TEXT_ID").toString();         var story = site.allcontent.get(id);         if (!story)            continue;         if (param.skin) {            story.renderSkin(param.skin);         } else {            res.write(param.itemprefix);            html.openLink({href: story.href()});            var str = story.title;            if (!str)               str = story.getRenderedContentPart("text").stripTags().clip(10, "...", "\\s").softwrap(30);            res.write(str ? str : "...");            html.closeLink();            res.write(param.itemsuffix);          }               }   }   rows.release();   return;}
meta: 993	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/993/6e28d59eebd1ae098121be8d4b53baf4137a0411/Global.js/clean/code/Global/Global.js