You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -160,6 +160,15 @@ function apply_client_templates($clientId) {
160
160
if ($limits[$k] < 1) $limits[$k] = 1;
161
161
break;
162
162
163
+
case'default_mailserver':
164
+
case'default_webserver':
165
+
case'default_dnsserver':
166
+
case'default_slave_dnsserver':
167
+
case'default_dbserver':
168
+
/* additional templates don't override default server from main template */
169
+
if ($limits[$k] == 0) $limits[$k] = $v;
170
+
break;
171
+
163
172
default:
164
173
if ($limits[$k] > -1){
165
174
if ($v == -1){
@@ -225,7 +234,10 @@ function apply_client_templates($clientId) {
225
234
$update = '';
226
235
if(!$is_reseller) unset($limits['limit_client']); // Only Resellers may have limit_client set in template to ensure that we do not convert a client to reseller accidently.
* the template has changed. apply the new data to all clients
93
100
*/
94
-
if ($this->dataRecord["template_type"] == 'm'){
101
+
if ($template_type == 'm'){
95
102
$sql = "SELECT client_id FROM client WHERE template_master = " . $this->id;
96
103
} else {
97
104
$sql = "SELECT client_id FROM client WHERE template_additional LIKE '%/" . $this->id . "/%' OR template_additional LIKE '" . $this->id . "/%' OR template_additional LIKE '%/" . $this->id . "' UNION SELECT client_id FROM client_template_assigned WHERE client_template_id = " . $this->id;
0 commit comments