mirror of
https://github.com/znc/znc.git
synced 2026-05-18 07:15:54 +02:00
Webadmin: Don't reset all channel settings submitting a user page
In r1058 the behaviour of CUser::Clone() was changed. It now also handles the channel settings. This change breaks webadmin, because it doesn't properly set up the channels it feeds to CUser::Clone() This commit 'fixes' this by adding an extra parameter to CUser::Clone() which makes it revert to the old behaviour. Webadmin uses this parameter. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1074 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
@@ -251,7 +251,7 @@ void CUser::UserDisconnected(CClient* pClient) {
|
||||
}
|
||||
}
|
||||
|
||||
bool CUser::Clone(const CUser& User, CString& sErrorRet) {
|
||||
bool CUser::Clone(const CUser& User, CString& sErrorRet, bool bCloneChans) {
|
||||
unsigned int a = 0;
|
||||
sErrorRet.clear();
|
||||
|
||||
@@ -392,7 +392,8 @@ bool CUser::Clone(const CUser& User, CString& sErrorRet) {
|
||||
if (!pNewChan) {
|
||||
pChan->SetInConfig(false);
|
||||
} else {
|
||||
pChan->Clone(*pNewChan);
|
||||
if (bCloneChans)
|
||||
pChan->Clone(*pNewChan);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user