rem: result.url = s.href(); 
add: result.url = this.href()+s._id; 
context: function evalNewStory(s,param,creator) {   var result;   s.site = this._parent;   // loop through param and collect content properties   var cont = new HopObject();   var contentIsCool = false;   for (var i in param) {      if (i.indexOf ("content_") == 0) {         cont[i.substring(8)] = param[i];         if (!contentIsCool && param[i])            contentIsCool = true;      }   }   // if all story parts are null, return with error-message   if (!contentIsCool)      result = getError("textMissing");   s.setContent (cont);   // let's keep the title property   s.title = param.content_title;   s.prototype = "story";   s.creator = creator;   // check if the create date is set in the param object   if (param.createtime) {      var ctime = tryEval ('parseTimestamp(param.createtime, "yyyy-MM-dd HH:mm")');      if (ctime.error)          result = getError("timestampParse",param.createtime);      else         s.createtime = ctime.value;      s.modifytime = new Date();   } else {      s.modifytime = s.createtime = new Date();   }   s.editableby = !isNaN(parseInt(param.editableby,10)) ? parseInt(param.editableby,10) : null;   s.discussions = (param.discussions_array || param.discussions == null ? 1 : 0);   if (s.createtime) {      // create day of story with respect to site-timezone      s.day = formatTimestamp(s.createtime,"yyyyMMdd");   }   s.ipaddress = param.http_remotehost;   s.reads = 0;   var topic = param.topic ? param.topic : parseInt(param.topicidx,10);   if (!isNaN(topic) && topic >= 0) {      var topicNode = this._parent.topics.get(topic);      s.topic = topicNode ? topicNode.groupname : null;   } else      s.topic = topic ? topic : null;   // check if topic-name contains any forbidden characters   if (!isCleanForURL(s.topic))      result = getError("topicNoSpecialChars");   var status = parseInt(param.online,10);   if (isNaN(status))      result = getError("storyPublish");   else if (status == 1 && !s.topic)      result = getError("storyTopicMissing");   else      s.online = status;   // if everything ok, so proceed with adding the story   if (!result) {      if (this._parent.add(s)) {         result = getConfirm("storyCreate");         result.id = s._id;         if (s.online) {            s.site.lastupdate = s.modifytime;            result.url = s.href();         } else            result.url = this.href();      } else         result = getError("storyCreate");   }   result.story = s;   return (result);}
meta: 993	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/993/fc179f1fa7514382fca48e926afaa8de7a236d1f/objectFunctions.js/clean/code/StoryMgr/objectFunctions.js