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