From 9c5068a754829fb7162218bb5125a09ed984fee5 Mon Sep 17 00:00:00 2001 From: cflakes Date: Sun, 25 Apr 2010 14:45:22 +0000 Subject: [PATCH] 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 --- WebModules.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/WebModules.cpp b/WebModules.cpp index f75976f1..f5f0c1bf 100644 --- a/WebModules.cpp +++ b/WebModules.cpp @@ -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);