antville/code/Story/comment.hac
Robert Gaggl fa89ee3a83 - security-functions now demand user-object as argument
- modifications needed due to rewriting of objectFunctions
- now using res.data.* instead of res.*
- removing assignments to res.head
2001-12-10 23:30:53 +00:00

23 lines
No EOL
597 B
Text

autoLogin();
var deny = this.isPostDenied(user);
if (deny) {
res.message = deny;
res.redirect(user.cache.referer ? this.weblog.members.href("login") : this.href());
}
res.skin = "weblog.page";
if (req.data.submit == "cancel" || req.data.cancel)
res.redirect(this.href());
else if (req.data.submit == "save" || req.data.save) {
var result = this.evalComment(req.data,user);
res.message = result.message;
if (!result.error)
res.redirect(this.href());
}
res.data.title = "Antville - " + this.weblog.title;
res.data.body = this.renderSkinAsString("comment");
this.reads++;