/comment_action
comment action

Sourcecode in Comment/actions.js:
1:   function comment_action() {
2:      // restore any rescued text
3:      if (session.data.rescuedText)
4:         restoreRescuedText();
5:      
6:      if (req.data.cancel)
7:         res.redirect(this.story.href());
8:      else if (req.data.save) {
9:         try {
10:           var result = this.evalComment(req.data, session.user);
11:           res.message = result.toString();
12:           res.redirect(this.story.href() + "#" + result.id);
13:        } catch (err) {
14:           res.message = err.toString();
15:        }
16:     }
17:     
18:     res.data.action = this.href(req.action);
19:     res.data.title = this.site.title;
20:     if (this.story.title)
21:        res.data.title += " - " + encode(this.story.title);
22:     res.data.body = this.renderSkinAsString("toplevel");
23:     res.data.action = this.href("comment");
24:     res.data.body += (new Comment()).renderSkinAsString("edit");
25:     this.site.renderSkin("page");
26:     return;
27:  }