Skip to content

Commit 2f337b0

Browse files
committed
Fix issue that PHP version of a site gets altered when an admin edits the site when domain limit mode is active.
1 parent c29ebd0 commit 2f337b0

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

interface/web/sites/templates/web_vhost_domain_edit.htm

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@
6666
</div>
6767
</tmpl_unless>
6868
</tmpl_if>
69+
<tmpl_if name="domain_option">
70+
<input type="hidden" id="client_group_id" name="client_group_id" value="{tmpl_var name='client_group_id_value'}" />
71+
</tmpl_if>
6972
<div class="form-group">
7073
<label for="ip_address" class="col-sm-3 control-label">{tmpl_var name='ip_address_txt'}</label>
7174
<div class="col-sm-9"><select name="ip_address" id="ip_address" class="form-control">

interface/web/sites/web_vhost_domain_edit.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -725,6 +725,12 @@ function onShowEnd() {
725725
// remove the parent domain part of the domain name before we show it in the text field.
726726
if($this->dataRecord["type"] == 'vhostsubdomain') $this->dataRecord["domain"] = str_replace('.'.$selected_domain, '', $this->dataRecord["domain"]);
727727

728+
// We have to set the client group id value as the client select field is hidden in this mode
729+
if($is_admin) {
730+
$app->tpl->setVar("client_group_id_value", $this->dataRecord["sys_groupid"], true);
731+
} else {
732+
$app->tpl->setVar("client_group_id_value", $_SESSION["s"]["user"]["default_group"], true);
733+
}
728734

729735
} else {
730736
// remove the parent domain part of the domain name before we show it in the text field.

0 commit comments

Comments
 (0)