Webadmin: Fix Edit Network when using DenySetNetwork (#1942)

This commit is contained in:
Daniel
2025-04-18 09:11:43 +08:00
committed by GitHub
parent 9ab81d1dad
commit a206d1a3bb
2 changed files with 5 additions and 4 deletions

View File

@@ -31,8 +31,9 @@
<div class="sectionbody">
<div class="subsection">
<div class="inputlabel"><label for="name"><? FORMAT "Network Name:" ?></label></div>
<input id="name" type="text" name="name" value="<? VAR Name ?>" class="half" maxlength="128"
<input id="name" type="text" name="name<? IF !NameEdit ?>_disabled<? ENDIF ?>" value="<? VAR Name ?>" class="half" maxlength="128"
title="<? FORMAT "The name of the IRC network." ?>" <? IF !NameEdit ?>disabled<? ENDIF ?> />
<? IF !NameEdit ?><input type="hidden" name="name" value="<? VAR Name ?>"><? ENDIF ?>
</div>
<div class="subsection">

View File

@@ -1030,20 +1030,20 @@ class CWebAdminMod : public CModule {
if (spSession->IsAdmin() ||
!spSession->GetUser()->DenySetIdent()) {
Tmpl["IdentEdit"] = "true";
Tmpl["Ident"] = pNetwork->GetIdent();
}
Tmpl["Ident"] = pNetwork->GetIdent();
if (spSession->IsAdmin() ||
!spSession->GetUser()->DenySetRealName()) {
Tmpl["RealNameEdit"] = "true";
Tmpl["RealName"] = pNetwork->GetRealName();
}
Tmpl["RealName"] = pNetwork->GetRealName();
if (spSession->IsAdmin() ||
!spSession->GetUser()->DenySetQuitMsg()) {
Tmpl["QuitMsgEdit"] = "true";
Tmpl["QuitMsg"] = pNetwork->GetQuitMsg();
}
Tmpl["QuitMsg"] = pNetwork->GetQuitMsg();
Tmpl["NetworkEdit"] =
spSession->IsAdmin() || !spSession->GetUser()->DenySetNetwork()