antville/code/FileMgr/create.hac
Robert Gaggl 0e7ae0b9ef change code according to helma's new session/usermodel:
- using session.user instead of user as argument
changed code to run with snapshot 20020531-fc:
- no more res.skin, using renderSkin instead
2002-06-02 16:17:31 +00:00

25 lines
No EOL
634 B
Text

checkIfLoggedIn(this.href(req.action));
var deny = this.isDenied(session.user);
if (deny) {
res.message = deny;
res.redirect(path.weblog.href());
}
if (req.data.submit == "cancel" || req.data.cancel)
res.redirect(this.href());
else if (req.data.submit == "save" || req.data.save) {
var result = this.evalGoodie(req.data,session.user);
res.message = result.message;
if (!result.error)
res.redirect(this.href());
}
res.data.action = this.href(req.action);
res.data.title = path.weblog.title;
var newGoodie = new goodie();
res.data.body = newGoodie.renderSkinAsString("new");
path.weblog.renderSkin("page");