Fixed some weird code in webadmin.cpp that prevented

module arguments from showing up with the new GetParam().


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1944 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
cflakes
2010-04-25 21:58:56 +00:00
parent 08d1d248e2
commit 136ce32f85

View File

@@ -40,9 +40,7 @@ public:
return true;
}
CString GetModArgs(CWebSock& WebSock, const CString& sModName, bool bGlobal = false) {
CUser* pUser = CZNC::Get().FindUser(WebSock.GetParam("user"));
CString GetModArgs(CUser* pUser, const CString& sModName, bool bGlobal = false) {
if (!bGlobal && !pUser) {
return "";
}
@@ -604,7 +602,7 @@ public:
l["Name"] = Info.GetName();
l["Description"] = Info.GetDescription();
l["Args"] = GetModArgs(WebSock, Info.GetName());
l["Args"] = GetModArgs(pUser, Info.GetName());
if (pUser && pUser->GetModules().FindModule(Info.GetName())) {
l["Checked"] = "true";
@@ -832,7 +830,7 @@ public:
l["Name"] = Info.GetName();
l["Description"] = Info.GetDescription();
l["Args"] = GetModArgs(WebSock, Info.GetName(), true);
l["Args"] = GetModArgs(NULL, Info.GetName(), true);
}
return true;