Add OnWebPreRequest web module hook to allow modules to do PAGE_DEFERRED style async processing.

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1841 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
cflakes
2010-03-23 17:59:42 +00:00
parent 4daa637130
commit 437eef7fdd
3 changed files with 5 additions and 1 deletions

View File

@@ -582,9 +582,11 @@ CWebSock::EPageReqResult CWebSock::OnPageRequestInternal(const CString& sURI, CS
} else if (pModule->WebRequiresAdmin() && !m_spSession->IsAdmin()) {
sPageRet = GetErrorPage(403, "Forbidden", "You need to be an admin to access this module");
return PAGE_PRINT;
} else if (pModule && !pModule->IsGlobal() && pModule->GetUser() != m_spSession->GetUser()) {
} else if (!pModule->IsGlobal() && pModule->GetUser() != m_spSession->GetUser()) {
sPageRet = GetErrorPage(403, "Forbidden", "You must login as " + pModule->GetUser()->GetUserName() + " in order to view this page");
return PAGE_PRINT;
} else if (pModule->OnWebPreRequest(*this, m_sPage)) {
return PAGE_DEFERRED;
}
VWebSubPages& vSubPages = pModule->GetSubPages();