webadmin: Fix using empty value for defaults in user page for buffer size.

Thanks to p3k for finding it.
This commit is contained in:
Alexey Sokolov
2012-09-06 19:11:00 +07:00
parent c4f7290333
commit 58d61539c3
+8 -4
View File
@@ -247,10 +247,14 @@ public:
pNewUser->SetDCCBindHost(pUser->GetDCCBindHost());
}
// First apply the old limit in case the new one is too high
if (pUser)
pNewUser->SetBufferCount(pUser->GetBufferCount(), true);
pNewUser->SetBufferCount(WebSock.GetParam("bufsize").ToUInt(), spSession->IsAdmin());
sArg = WebSock.GetParam("bufsize"); if (!sArg.empty()) pNewUser->SetBufferCount(sArg.ToUInt(), spSession->IsAdmin());
if (!sArg.empty()) {
// First apply the old limit in case the new one is too high
if (pUser)
pNewUser->SetBufferCount(pUser->GetBufferCount(), true);
pNewUser->SetBufferCount(sArg.ToUInt(), spSession->IsAdmin());
}
pNewUser->SetSkinName(WebSock.GetParam("skin"));
pNewUser->SetAutoClearChanBuffer(WebSock.GetParam("autoclearchanbuffer").ToBool());
pNewUser->SetMultiClients(WebSock.GetParam("multiclients").ToBool());