From 98226cf593d69f6915040e15535ed6f9ffaaa1e6 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Thu, 20 Oct 2011 11:24:23 -0400
Subject: [PATCH] Fixed: FS#1787 - API and new optional nignix fields and apache
---
interface/lib/classes/remoting.inc.php | 6 ++++++
remoting_client/examples/sites_web_domain_add.php | 9 +++------
2 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/interface/lib/classes/remoting.inc.php b/interface/lib/classes/remoting.inc.php
index 0dfed21..f7fa519 100644
--- a/interface/lib/classes/remoting.inc.php
+++ b/interface/lib/classes/remoting.inc.php
@@ -1353,6 +1353,12 @@
if($params['system_user'] == '') $params['system_user'] = '-';
if($params['system_group'] == '') $params['system_group'] = '-';
+ //* Set a few defaults for nginx servers
+ if($params['pm_max_children'] == '') $params['pm_max_children'] = 1;
+ if($params['pm_start_servers'] == '') $params['pm_start_servers'] = 1;
+ if($params['pm_min_spare_servers'] == '') $params['pm_min_spare_servers'] = 1;
+ if($params['pm_max_spare_servers'] == '') $params['pm_max_spare_servers'] = 1;
+
$domain_id = $this->insertQuery('../sites/form/web_domain.tform.php',$client_id,$params, 'sites:web_domain:on_after_insert');
if ($readonly === true)
$app->db->query("UPDATE web_domain SET `sys_userid` = '1' WHERE domain_id = ".$domain_id);
diff --git a/remoting_client/examples/sites_web_domain_add.php b/remoting_client/examples/sites_web_domain_add.php
index ba0cfea..2905db0 100644
--- a/remoting_client/examples/sites_web_domain_add.php
+++ b/remoting_client/examples/sites_web_domain_add.php
@@ -21,12 +21,9 @@
'server_id' => 0,
'ip_address' => '',
'domain' => 'test2.int',
- 'type' => '',
+ 'type' => 'vhost',
'parent_domain_id' => 0,
- 'vhost_type' => '',
- 'document_root' => '/web/dom',
- 'system_user' => 'benutzer',
- 'system_group' => 'gruppe',
+ 'vhost_type' => 'name',
'hd_quota' => 100000,
'traffic_quota' => -1,
'cgi' => 'y',
@@ -54,7 +51,7 @@
'stats_type' => 'webalizer',
'allow_override' => 'All',
'apache_directives' => '',
- 'php_open_basedir' => '/php',
+ 'php_open_basedir' => '/',
'custom_php_ini' => '',
'backup_interval' => '',
'backup_copies' => 1,
--
Gitblit v1.9.1