mirror of
https://github.com/znc/znc.git
synced 2026-05-05 21:12:37 +02:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user