- using session.user instead of user as argument changed code to run with snapshot 20020531-fc: - no more res.skin, using renderSkin instead
25 lines
No EOL
634 B
Text
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"); |