Sourcecode in Comment/objectFunctions.js:
1: function updateComment(param) {
2: // collect content
3: var content = extractContent(param, this.content.getAll());
4: if (!content.exists)
5: throw new Exception("textMissing");
6: this.setContent(content.value);
7: // let's keep the comment title property:
8: this.title = content.value.title;
9: if (content.isMajorUpdate) {
10: this.modifytime = new Date();
11: // send e-mail notification
12: if (this.site.isNotificationEnabled())
13: this.site.sendNotification("update", this);
14: }
15: this.ipaddress = param.http_remotehost;
16: return new Message("update");
17: }
|