antville/code/Comment/delete.hac
2001-08-26 19:48:24 +00:00

22 lines
No EOL
623 B
Text

if (!this.isDeleteAllowed())
res.redirect(this.story.href());
if (req.data.submit == "cancel")
res.redirect(this.story.href("main"));
if (req.data.submit == "delete") {
var redirTo = this.story.href();
if (this.parent)
this.parent.deleteComment(this);
else
this.story.deleteComment(this);
res.redirect(redirTo);
}
res.skin = "main";
res.title = "Antville - " + this.weblog.title;
res.head = this.weblog.renderSkinAsString("javascript");
res.head += this.weblog.renderSkinAsString("style");
res.body = this.weblog.renderSkinAsString("header");
res.body += this.renderSkinAsString("delete");