antville/code/Comment/delete.hac
Robert Gaggl 67a6f7792f changed because the prototype weblog was renamed to site
plus story.author was renamed to story.creator
2002-06-26 16:15:43 +00:00

26 lines
No EOL
681 B
Text

checkIfLoggedIn(this.href(req.action));
var deny = this.isDeleteDenied(session.user);
if (deny) {
res.message = deny;
res.redirect(this.story.href());
}
if (req.data.submit == "cancel" || req.data.cancel)
res.redirect(path.story.href());
else if (req.data.submit == "delete" || req.data.remove) {
var url = path.story.href();
res.message = path.story.deleteComment(this);
res.redirect(url);
}
res.data.action = this.href(req.action);
res.data.title = this.site.title;
var skinParam = new Object();
skinParam.what = "a comment from <b>" + this.creator.name + "</b>";
res.data.body = this.renderSkinAsString("delete",skinParam);
path.site.renderSkin("page");