antville/code/File/edit.hac

24 lines
621 B
Text
Raw Normal View History

checkIfLoggedIn(this.href(req.action));
2001-11-03 09:17:41 +00:00
var deny = this.isEditDenied(session.user);
2001-11-03 09:17:41 +00:00
if (deny) {
res.message = deny;
res.redirect(this.site.files.href());
2001-11-03 09:17:41 +00:00
}
if (req.data.submit == "cancel" || req.data.cancel)
res.redirect(this.site.files.href());
else if (req.data.submit == "save" || req.data.save) {
var result = this.evalFile(req.data,session.user);
res.message = result.message;
if (!result.error)
res.redirect(path.filemgr.href());
}
2001-11-03 09:17:41 +00:00
2002-05-15 23:12:41 +00:00
res.data.action = this.href(req.action);
res.data.title = this.site.title;
2001-11-03 09:17:41 +00:00
res.data.body = this.renderSkinAsString("edit");
path.site.renderSkin("page");