Merge some work by Jens-Andre Koch

Only his changes to the core are presented here.
Unfortunately, the skin itself looks ugly on Opera,
and simply doesn't work on Firefox...

Merge branch 'master' into znc-ation

Conflicts:
	modules/data/lastseen/tmpl/lastseen_WebadminUser.tmpl
	modules/data/webadmin/tmpl/settings.tmpl
This commit is contained in:
Alexey Sokolov
2012-04-10 23:10:36 +07:00
38 changed files with 272 additions and 1542 deletions

View File

@@ -687,12 +687,13 @@ CWebSock::EPageReqResult CWebSock::OnPageRequestInternal(const CString& sURI, CS
break;
}
if (!pModule)
return PAGE_NOTFOUND;
m_Template["ModPath"] = pModule->GetWebPath();
m_Template["ModFilesPath"] = pModule->GetWebFilesPath();
if (!pModule) {
return PAGE_NOTFOUND;
} else if (pModule->WebRequiresLogin() && !ForceLogin()) {
if (pModule->WebRequiresLogin() && !ForceLogin()) {
return PAGE_PRINT;
} else if (pModule->WebRequiresAdmin() && !GetSession()->IsAdmin()) {
PrintErrorPage(403, "Forbidden", "You need to be an admin to access this module");