Skip to content

Commit 2c76595

Browse files
author
Till Brehm
committed
Set log_retention in remote API calls when it is not set.
1 parent 49047ff commit 2c76595

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

interface/lib/classes/remote.d/sites.inc.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,7 @@ public function sites_web_domain_add($session_id, $client_id, $params, $readonly
427427
if($params['document_root'] == '') $params['document_root'] = '-';
428428
if($params['system_user'] == '') $params['system_user'] = '-';
429429
if($params['system_group'] == '') $params['system_group'] = '-';
430+
if($params['log_retention'] == '') $params['log_retention'] = 30;
430431

431432
//* Set a few defaults for nginx servers
432433
if($params['pm_max_children'] == '') $params['pm_max_children'] = 1;
@@ -447,6 +448,8 @@ public function sites_web_domain_update($session_id, $client_id, $primary_id, $p
447448
throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.');
448449
return false;
449450
}
451+
452+
if($params['log_retention'] == '') $params['log_retention'] = 30;
450453

451454
//* Set a few defaults for nginx servers
452455
if($params['pm_max_children'] == '') $params['pm_max_children'] = 1;
@@ -498,6 +501,7 @@ public function sites_web_vhost_aliasdomain_add($session_id, $client_id, $params
498501
if($params['document_root'] == '') $params['document_root'] = '-';
499502
if($params['system_user'] == '') $params['system_user'] = '-';
500503
if($params['system_group'] == '') $params['system_group'] = '-';
504+
if($params['log_retention'] == '') $params['log_retention'] = 30;
501505

502506
//* Set a few defaults for nginx servers
503507
if($params['pm_max_children'] == '') $params['pm_max_children'] = 1;
@@ -516,6 +520,8 @@ public function sites_web_vhost_aliasdomain_update($session_id, $client_id, $pri
516520
throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.');
517521
return false;
518522
}
523+
524+
if($params['log_retention'] == '') $params['log_retention'] = 30;
519525

520526
//* Set a few defaults for nginx servers
521527
if($params['pm_max_children'] == '') $params['pm_max_children'] = 1;
@@ -567,6 +573,7 @@ public function sites_web_vhost_subdomain_add($session_id, $client_id, $params)
567573
if($params['document_root'] == '') $params['document_root'] = '-';
568574
if($params['system_user'] == '') $params['system_user'] = '-';
569575
if($params['system_group'] == '') $params['system_group'] = '-';
576+
if($params['log_retention'] == '') $params['log_retention'] = 30;
570577

571578
//* Set a few defaults for nginx servers
572579
if($params['pm_max_children'] == '') $params['pm_max_children'] = 1;
@@ -585,6 +592,8 @@ public function sites_web_vhost_subdomain_update($session_id, $client_id, $prima
585592
throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.');
586593
return false;
587594
}
595+
596+
if($params['log_retention'] == '') $params['log_retention'] = 30;
588597

589598
//* Set a few defaults for nginx servers
590599
if($params['pm_max_children'] == '') $params['pm_max_children'] = 1;

0 commit comments

Comments
 (0)