antville/code/Root/main.hac

21 lines
No EOL
584 B
Text

res.data.title = root.getSysTitle();
// check if this installation is already configured
// if not, we display the welcome-page as frontpage
if (!root.sys_issetup) {
if (!root.users.size()) {
res.data.body = this.renderSkinAsString("welcome");
root.renderSkin("page");
return;
} else
res.redirect(this.manage.href("setup"));
} else if (!root.size())
res.redirect(this.href("new"));
if (res.handlers.site) {
res.handlers.site.main_action();
} else {
res.data.body = root.renderSkinAsString("main");
root.renderSkin("page");
logAccess();
}