26 lines
No EOL
681 B
Text
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"); |