Sourcecode in Comment/actions.js:
1: function delete_action() {
2: if (req.data.cancel)
3: res.redirect(this.story.href());
4: else if (req.data.remove) {
5: try {
6: var url = this.story.href();
7: res.message = this.story.deleteComment(this);
8: res.redirect(url);
9: } catch (err) {
10: res.message = err.toString();
11: }
12: }
13:
14: res.data.action = this.href(req.action);
15: res.data.title = this.site.title;
16: var skinParam = {
17: description: getMessage("Comment.deleteDescription"),
18: detail: this.creator.name
19: };
20: res.data.body = this.renderSkinAsString("delete", skinParam);
21: this.site.renderSkin("page");
22: return;
23: }
|