mirror of
https://github.com/znc/znc.git
synced 2026-05-05 21:12:37 +02:00
WebMods: Fix cookie check and menu entry variables to use the new GetParam methods.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1936 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
@@ -20,7 +20,7 @@ CZNCTagHandler::CZNCTagHandler(CWebSock& WebSock) : CTemplateTagHandler(), m_Web
|
||||
bool CZNCTagHandler::HandleTag(CTemplate& Tmpl, const CString& sName, const CString& sArgs, CString& sOutput) {
|
||||
if (sName.Equals("URLPARAM")) {
|
||||
//sOutput = CZNC::Get()
|
||||
sOutput = m_WebSock.GetParam(sArgs.Token(0));
|
||||
sOutput = m_WebSock.GetParam(sArgs.Token(0), false);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -388,7 +388,7 @@ bool CWebSock::AddModLoop(const CString& sLoopName, CModule& Module) {
|
||||
sParams += ssNV.second.Escape_n(CString::EURL);
|
||||
}
|
||||
|
||||
if (bActive && GetParam(ssNV.first) != ssNV.second) {
|
||||
if (bActive && GetParam(ssNV.first, false) != ssNV.second) {
|
||||
bActive = false;
|
||||
}
|
||||
}
|
||||
@@ -538,7 +538,7 @@ CWebSock::EPageReqResult CWebSock::OnPageRequestInternal(const CString& sURI, CS
|
||||
|
||||
// Handle the static pages that don't require a login
|
||||
if (sURI == "/") {
|
||||
if(!m_bLoggedIn && GetParam("cookie_check").ToBool() && GetRequestCookie("SessionId").empty()) {
|
||||
if(!m_bLoggedIn && GetParam("cookie_check", false).ToBool() && GetRequestCookie("SessionId").empty()) {
|
||||
GetSession()->AddError("Your browser does not have cookies enabled for this site!");
|
||||
}
|
||||
return PrintTemplate("index", sPageRet);
|
||||
|
||||
Reference in New Issue
Block a user