Merge branch 'origin-0.10.13' into private-0.10.12
This commit is contained in:
@@ -583,8 +583,12 @@ abstract class ApiCommand extends ApiParameter
|
||||
"group" => $group,
|
||||
"var" => $varname
|
||||
), true, true);
|
||||
$content = $default;
|
||||
if ($result) {
|
||||
$content = $result['value'] ?? $default;
|
||||
}
|
||||
// @fixme html_entity_decode
|
||||
$content = html_entity_decode(\Froxlor\PhpHelper::replaceVariables((($result['value'] != '') ? $result['value'] : $default), $replace_arr));
|
||||
$content = html_entity_decode(\Froxlor\PhpHelper::replaceVariables($content, $replace_arr));
|
||||
return $content;
|
||||
}
|
||||
|
||||
|
||||
@@ -265,7 +265,7 @@ class Admins extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\ResourceEnt
|
||||
'login' => $loginname
|
||||
), true, true);
|
||||
|
||||
if (strtolower($loginname_check['loginname']) == strtolower($loginname) || strtolower($loginname_check_admin['loginname']) == strtolower($loginname)) {
|
||||
if (($loginname_check && strtolower($loginname_check['loginname']) == strtolower($loginname)) || ($loginname_check_admin && strtolower($loginname_check_admin['loginname']) == strtolower($loginname))) {
|
||||
\Froxlor\UI\Response::standard_error('loginnameexists', $loginname, true);
|
||||
} elseif (preg_match('/^' . preg_quote(Settings::Get('customer.accountprefix'), '/') . '([0-9]+)/', $loginname)) {
|
||||
// Accounts which match systemaccounts are not allowed, filtering them
|
||||
|
||||
@@ -411,7 +411,7 @@ class Customers extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resource
|
||||
), true, true);
|
||||
|
||||
$mysql_maxlen = \Froxlor\Database\Database::getSqlUsernameLength() - strlen(Settings::Get('customer.mysqlprefix'));
|
||||
if (strtolower($loginname_check['loginname']) == strtolower($loginname) || strtolower($loginname_check_admin['loginname']) == strtolower($loginname)) {
|
||||
if (($loginname_check && strtolower($loginname_check['loginname']) == strtolower($loginname)) || ($loginname_check_admin && strtolower($loginname_check_admin['loginname']) == strtolower($loginname))) {
|
||||
\Froxlor\UI\Response::standard_error('loginnameexists', $loginname, true);
|
||||
} elseif (! \Froxlor\Validate\Validate::validateUsername($loginname, Settings::Get('panel.unix_names'), $mysql_maxlen)) {
|
||||
if (strlen($loginname) > $mysql_maxlen) {
|
||||
|
||||
@@ -96,7 +96,7 @@ class DirOptions extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resourc
|
||||
), true, true);
|
||||
|
||||
// duplicate check
|
||||
if ($path_dupe_check['path'] == $path) {
|
||||
if ($path_dupe_check && $path_dupe_check['path'] == $path) {
|
||||
\Froxlor\UI\Response::standard_error('errordocpathdupe', $userpath, true);
|
||||
}
|
||||
|
||||
@@ -309,8 +309,7 @@ class DirOptions extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resourc
|
||||
$query_fields = array();
|
||||
$result_stmt = Database::prepare("
|
||||
SELECT * FROM `" . TABLE_PANEL_HTACCESS . "`
|
||||
WHERE `customerid` IN (" . implode(', ', $customer_ids) . ")" . $this->getSearchWhere($query_fields, true) . $this->getOrderBy() . $this->getLimit()
|
||||
);
|
||||
WHERE `customerid` IN (" . implode(', ', $customer_ids) . ")" . $this->getSearchWhere($query_fields, true) . $this->getOrderBy() . $this->getLimit());
|
||||
Database::pexecute($result_stmt, $query_fields, true, true);
|
||||
while ($row = $result_stmt->fetch(\PDO::FETCH_ASSOC)) {
|
||||
$result[] = $row;
|
||||
|
||||
@@ -81,7 +81,7 @@ class DirProtections extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Res
|
||||
$password_enc = \Froxlor\System\Crypt::makeCryptPassword($password, true);
|
||||
|
||||
// duplicate check
|
||||
if ($username_path_check['username'] == $username && $username_path_check['path'] == $path) {
|
||||
if ($username_path_check && $username_path_check['username'] == $username && $username_path_check['path'] == $path) {
|
||||
\Froxlor\UI\Response::standard_error('userpathcombinationdupe', '', true);
|
||||
} elseif ($password == $username) {
|
||||
\Froxlor\UI\Response::standard_error('passwordshouldnotbeusername', '', true);
|
||||
|
||||
@@ -674,9 +674,9 @@ class Domains extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\ResourceEn
|
||||
), '', true);
|
||||
} elseif ($customerid == 0) {
|
||||
\Froxlor\UI\Response::standard_error('adduserfirst', '', true);
|
||||
} elseif (strtolower($domain_check['domain']) == strtolower($domain)) {
|
||||
} elseif ($domain_check && strtolower($domain_check['domain']) == strtolower($domain)) {
|
||||
\Froxlor\UI\Response::standard_error('domainalreadyexists', $idna_convert->decode($domain), true);
|
||||
} elseif ($aliasdomain_check['id'] != $aliasdomain) {
|
||||
} elseif ($aliasdomain_check && $aliasdomain_check['id'] != $aliasdomain) {
|
||||
\Froxlor\UI\Response::standard_error('domainisaliasorothercustomer', '', true);
|
||||
} else {
|
||||
$wwwserveralias = ($serveraliasoption == '1') ? '1' : '0';
|
||||
@@ -1223,7 +1223,7 @@ class Domains extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\ResourceEn
|
||||
$writeaccesslog = $result['writeaccesslog'];
|
||||
$writeerrorlog = $result['writeerrorlog'];
|
||||
$documentroot = $result['documentroot'];
|
||||
|
||||
$ssl_protocols = $p_ssl_protocols;
|
||||
$override_tls = $result['override_tls'];
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ class FpmDaemons extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resourc
|
||||
* optional specify offset for resultset
|
||||
* @param array $sql_orderby
|
||||
* optional array with index = fieldname and value = ASC|DESC to order the resultset by one or more fields
|
||||
*
|
||||
*
|
||||
* @access admin
|
||||
* @throws \Exception
|
||||
* @return string json-encoded array count|list
|
||||
@@ -135,19 +135,19 @@ class FpmDaemons extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resourc
|
||||
* @param string $reload_cmd
|
||||
* @param string $config_dir
|
||||
* @param string $pm
|
||||
* optional, process-manager, one of 'static', 'dynamic' or 'ondemand', default 'static'
|
||||
* optional, process-manager, one of 'static', 'dynamic' or 'ondemand', default 'dynamic'
|
||||
* @param int $max_children
|
||||
* optional, default 0
|
||||
* optional, default 5
|
||||
* @param int $start_servers
|
||||
* optional, default 0
|
||||
* optional, default 2
|
||||
* @param int $min_spare_servers
|
||||
* optional, default 0
|
||||
* optional, default 1
|
||||
* @param int $max_spare_servers
|
||||
* optional, default 0
|
||||
* optional, default 3
|
||||
* @param int $max_requests
|
||||
* optional, default 0
|
||||
* @param int $idle_timeout
|
||||
* optional, default 0
|
||||
* optional, default 10
|
||||
* @param string $limit_extensions
|
||||
* optional, limit execution to the following extensions, default '.php'
|
||||
* @param string $custom_config
|
||||
@@ -167,13 +167,13 @@ class FpmDaemons extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resourc
|
||||
$config_dir = $this->getParam('config_dir');
|
||||
|
||||
// parameters
|
||||
$pmanager = $this->getParam('pm', true, 'static');
|
||||
$max_children = $this->getParam('max_children', true, 0);
|
||||
$start_servers = $this->getParam('start_servers', true, 0);
|
||||
$min_spare_servers = $this->getParam('min_spare_servers', true, 0);
|
||||
$max_spare_servers = $this->getParam('max_spare_servers', true, 0);
|
||||
$pmanager = $this->getParam('pm', true, 'dynamic');
|
||||
$max_children = $this->getParam('max_children', true, 5);
|
||||
$start_servers = $this->getParam('start_servers', true, 2);
|
||||
$min_spare_servers = $this->getParam('min_spare_servers', true, 1);
|
||||
$max_spare_servers = $this->getParam('max_spare_servers', true, 3);
|
||||
$max_requests = $this->getParam('max_requests', true, 0);
|
||||
$idle_timeout = $this->getParam('idle_timeout', true, 0);
|
||||
$idle_timeout = $this->getParam('idle_timeout', true, 10);
|
||||
$limit_extensions = $this->getParam('limit_extensions', true, '.php');
|
||||
$custom_config = $this->getParam('custom_config', true, '');
|
||||
|
||||
@@ -251,19 +251,19 @@ class FpmDaemons extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resourc
|
||||
* @param string $config_dir
|
||||
* optional
|
||||
* @param string $pm
|
||||
* optional, process-manager, one of 'static', 'dynamic' or 'ondemand', default 'static'
|
||||
* optional, process-manager, one of 'static', 'dynamic' or 'ondemand', default 'dynamic'
|
||||
* @param int $max_children
|
||||
* optional, default 0
|
||||
* optional, default 5
|
||||
* @param int $start_servers
|
||||
* optional, default 0
|
||||
* optional, default 2
|
||||
* @param int $min_spare_servers
|
||||
* optional, default 0
|
||||
* optional, default 1
|
||||
* @param int $max_spare_servers
|
||||
* optional, default 0
|
||||
* optional, default 3
|
||||
* @param int $max_requests
|
||||
* optional, default 0
|
||||
* @param int $idle_timeout
|
||||
* optional, default 0
|
||||
* optional, default 10
|
||||
* @param string $limit_extensions
|
||||
* optional, limit execution to the following extensions, default '.php'
|
||||
* @param string $custom_config
|
||||
|
||||
@@ -255,7 +255,7 @@ class IpsAndPorts extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resour
|
||||
'port' => $port
|
||||
));
|
||||
|
||||
if ($result_checkfordouble['id'] != '') {
|
||||
if ($result_checkfordouble && $result_checkfordouble['id'] != '') {
|
||||
\Froxlor\UI\Response::standard_error('myipnotdouble', '', true);
|
||||
}
|
||||
|
||||
@@ -462,9 +462,9 @@ class IpsAndPorts extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resour
|
||||
$docroot = '';
|
||||
}
|
||||
|
||||
if ($result['ip'] != $ip && $result['ip'] == Settings::Get('system.ipaddress') && $result_sameipotherport['id'] == '') {
|
||||
if ($result['ip'] != $ip && $result['ip'] == Settings::Get('system.ipaddress') && $result_sameipotherport == false) {
|
||||
\Froxlor\UI\Response::standard_error('cantchangesystemip', '', true);
|
||||
} elseif ($result_checkfordouble['id'] != '' && $result_checkfordouble['id'] != $id) {
|
||||
} elseif ($result_checkfordouble && $result_checkfordouble['id'] != '' && $result_checkfordouble['id'] != $id) {
|
||||
\Froxlor\UI\Response::standard_error('myipnotdouble', '', true);
|
||||
} else {
|
||||
|
||||
@@ -560,7 +560,7 @@ class IpsAndPorts extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resour
|
||||
'ip' => $result['ip']
|
||||
));
|
||||
|
||||
if (($result['ip'] != Settings::Get('system.ipaddress')) || ($result['ip'] == Settings::Get('system.ipaddress') && $result_sameipotherport['id'] != '')) {
|
||||
if (($result['ip'] != Settings::Get('system.ipaddress')) || ($result['ip'] == Settings::Get('system.ipaddress') && $result_sameipotherport == false)) {
|
||||
|
||||
$del_stmt = Database::prepare("
|
||||
DELETE FROM `" . TABLE_PANEL_IPSANDPORTS . "`
|
||||
|
||||
@@ -252,7 +252,7 @@ class Mysqls extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\ResourceEnt
|
||||
), true, true);
|
||||
$mbdata = $mbdata_stmt->fetch(\PDO::FETCH_ASSOC);
|
||||
Database::needRoot(false);
|
||||
$result['size'] = $mbdata['MB'];
|
||||
$result['size'] = $mbdata['MB'] ?? 0;
|
||||
$this->logger()->logAction($this->isAdmin() ? \Froxlor\FroxlorLogger::ADM_ACTION : \Froxlor\FroxlorLogger::USR_ACTION, LOG_NOTICE, "[API] get database '" . $result['databasename'] . "'");
|
||||
return $this->response(200, "successfull", $result);
|
||||
}
|
||||
@@ -411,7 +411,7 @@ class Mysqls extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\ResourceEnt
|
||||
"table_schema" => $row['databasename']
|
||||
), true, true);
|
||||
$mbdata = $mbdata_stmt->fetch(\PDO::FETCH_ASSOC);
|
||||
$row['size'] = $mbdata['MB'];
|
||||
$row['size'] = $mbdata['MB'] ?? 0;
|
||||
$result[] = $row;
|
||||
}
|
||||
Database::needRoot(false);
|
||||
|
||||
@@ -50,8 +50,7 @@ class PhpSettings extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resour
|
||||
$result_stmt = Database::prepare("
|
||||
SELECT c.*, fd.description as fpmdesc
|
||||
FROM `" . TABLE_PANEL_PHPCONFIGS . "` c
|
||||
LEFT JOIN `" . TABLE_PANEL_FPMDAEMONS . "` fd ON fd.id = c.fpmsettingid" . $this->getSearchWhere($query_fields) . $this->getOrderBy() . $this->getLimit()
|
||||
);
|
||||
LEFT JOIN `" . TABLE_PANEL_FPMDAEMONS . "` fd ON fd.id = c.fpmsettingid" . $this->getSearchWhere($query_fields) . $this->getOrderBy() . $this->getLimit());
|
||||
Database::pexecute($result_stmt, $query_fields, true, true);
|
||||
$phpconfigs = array();
|
||||
while ($row = $result_stmt->fetch(\PDO::FETCH_ASSOC)) {
|
||||
|
||||
@@ -195,7 +195,7 @@ class SubDomains extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resourc
|
||||
} elseif ($subdomain == 'www' && $domain_check['wwwserveralias'] == '1') {
|
||||
// you cannot add 'www' as subdomain when the maindomain generates a www-alias
|
||||
\Froxlor\UI\Response::standard_error('wwwnotallowed', '', true);
|
||||
} elseif (strtolower($completedomain_check['domain']) == strtolower($completedomain)) {
|
||||
} elseif ($completedomain_check && strtolower($completedomain_check['domain']) == strtolower($completedomain)) {
|
||||
// the domain does already exist as main-domain
|
||||
\Froxlor\UI\Response::standard_error('domainexistalready', $completedomain, true);
|
||||
}
|
||||
|
||||
@@ -112,7 +112,10 @@ class Bind extends DnsBase
|
||||
if (count($this->ns) > 0) {
|
||||
foreach ($this->ns as $ns) {
|
||||
foreach ($ns["ips"] as $ip) {
|
||||
$bindconf_file .= ' ' . $ip . ";\n";
|
||||
$ip = \Froxlor\Validate\Validate::validate_ip2($ip, true, 'invalidip', true, true, true);
|
||||
if ($ip) {
|
||||
$bindconf_file .= ' ' . $ip . ";\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -160,7 +160,7 @@ class Dns
|
||||
// unset special CAA required-entry
|
||||
unset($required_entries[$entry['type']][md5("@CAA@")]);
|
||||
}
|
||||
if (Settings::Get('spf.use_spf') == '1' && $entry['type'] == 'TXT' && $entry['record'] == '@' && strtolower(substr($entry['content'], 0, 7)) == '"v=spf1') {
|
||||
if (Settings::Get('spf.use_spf') == '1' && $entry['type'] == 'TXT' && $entry['record'] == '@' && (strtolower(substr($entry['content'], 0, 7)) == '"v=spf1' || strtolower(substr($entry['content'], 0, 6)) == 'v=spf1') ) {
|
||||
// unset special spf required-entry
|
||||
unset($required_entries[$entry['type']][md5("@SPF@")]);
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ final class Froxlor
|
||||
{
|
||||
|
||||
// Main version variable
|
||||
const VERSION = '0.10.12';
|
||||
const VERSION = '0.10.13';
|
||||
|
||||
// Database version (YYYYMMDDC where C is a daily counter)
|
||||
const DBVERSION = '201912313';
|
||||
|
||||
@@ -12,5 +12,4 @@ class FroxlorVhostSettings
|
||||
$result = Database::pexecute_first($sel_stmt);
|
||||
return $result['vcentries'] > 0 ? true : false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -79,8 +79,8 @@ class User
|
||||
/**
|
||||
* Function which updates all counters of used ressources in panel_admins and panel_customers
|
||||
*
|
||||
* @param
|
||||
* bool Set to true to get an array with debug information
|
||||
* @param bool $returndebuginfo
|
||||
* Set to true to get an array with debug information
|
||||
* @return array Contains debug information if parameter 'returndebuginfo' is set to true
|
||||
*
|
||||
* @author Florian Lippert <flo@syscp.org> (2003-2009)
|
||||
@@ -100,17 +100,17 @@ class User
|
||||
// Customers
|
||||
$customers_stmt = Database::prepare('SELECT * FROM `' . TABLE_PANEL_CUSTOMERS . '` ORDER BY `customerid`');
|
||||
Database::pexecute($customers_stmt);
|
||||
|
||||
// array to store currently used resources per admin
|
||||
$admin_resources = array();
|
||||
while ($customer = $customers_stmt->fetch(\PDO::FETCH_ASSOC)) {
|
||||
|
||||
// set current admin
|
||||
$cur_adm = $customer['adminid'];
|
||||
|
||||
// initialize admin-resources array for admin $customer['adminid']
|
||||
if (! isset($admin_resources[$cur_adm])) {
|
||||
$admin_resources[$cur_adm] = array();
|
||||
}
|
||||
|
||||
// fill admin resource usage array with customer data
|
||||
self::addResourceCountEx($admin_resources[$cur_adm], $customer, 'diskspace_used', 'diskspace');
|
||||
self::addResourceCountEx($admin_resources[$cur_adm], $customer, 'traffic_used', 'traffic_used'); // !!! yes, USED and USED
|
||||
|
||||
@@ -126,6 +126,7 @@ class User
|
||||
self::addResourceCount($admin_resources[$cur_adm], $customer, $field . '_used', $field);
|
||||
}
|
||||
|
||||
// calculate real usage
|
||||
$customer_mysqls_stmt = Database::prepare('SELECT COUNT(*) AS `number_mysqls` FROM `' . TABLE_PANEL_DATABASES . '`
|
||||
WHERE `customerid` = :cid');
|
||||
$customer_mysqls = Database::pexecute_first($customer_mysqls_stmt, array(
|
||||
@@ -181,6 +182,7 @@ class User
|
||||
));
|
||||
$customer['email_quota_used_new'] = (int) $customer_email_quota['email_quota'];
|
||||
|
||||
// update database accordingly
|
||||
$stmt = Database::prepare('UPDATE `' . TABLE_PANEL_CUSTOMERS . '`
|
||||
SET `mysqls_used` = :mysqls_used,
|
||||
`emails_used` = :emails_used,
|
||||
@@ -211,63 +213,56 @@ class User
|
||||
$admins_stmt = Database::prepare('SELECT * FROM `' . TABLE_PANEL_ADMINS . '` ORDER BY `adminid`');
|
||||
Database::pexecute($admins_stmt, array());
|
||||
|
||||
$resource_fields = array(
|
||||
'diskspace_used',
|
||||
'traffic_used',
|
||||
'mysqls_used',
|
||||
'ftps_used',
|
||||
'emails_used',
|
||||
'email_accounts_used',
|
||||
'email_forwarders_used',
|
||||
'email_quota_used',
|
||||
'subdomains_used'
|
||||
);
|
||||
|
||||
$admin_customers_stmt = Database::prepare('SELECT * FROM `' . TABLE_PANEL_CUSTOMERS . '` WHERE `adminid` = :aid');
|
||||
while ($admin = $admins_stmt->fetch(\PDO::FETCH_ASSOC)) {
|
||||
$admin_customers_stmt = Database::prepare('SELECT * FROM `' . TABLE_PANEL_CUSTOMERS . '` WHERE `adminid` = :aid');
|
||||
Database::pexecute($admin_customers_stmt, array(
|
||||
"aid" => $admin['adminid']
|
||||
));
|
||||
$admin_customers = $admin_customers_stmt->fetchAll(\PDO::FETCH_ASSOC);
|
||||
$admin['customers_used_new'] = count($admin_customers);
|
||||
|
||||
$admin_domains_stmt = Database::prepare('SELECT COUNT(*) AS `number_domains` FROM `' . TABLE_PANEL_DOMAINS . '` WHERE `adminid` = :aid');
|
||||
$admin_domains_stmt = Database::prepare('SELECT COUNT(*) AS `number_domains` FROM `' . TABLE_PANEL_DOMAINS . '` WHERE `adminid` = :aid AND `parentdomainid` = "0"');
|
||||
$admin_domains = Database::pexecute_first($admin_domains_stmt, array(
|
||||
"aid" => $admin['adminid']
|
||||
));
|
||||
// substract the amount of domains that are std-subdomains later when we iterated through all customers and now for sure
|
||||
// substract the amount of domains that are std-subdomains later when we iterated through all customers and know for sure
|
||||
$admin['domains_used_new'] = $admin_domains['number_domains'];
|
||||
|
||||
// set current admin
|
||||
$cur_adm = $admin['adminid'];
|
||||
|
||||
// if there's an admin without any customers it might be possible that the id is not yet known in $admin_resources
|
||||
if (! isset($admin_resources[$cur_adm])) {
|
||||
$admin_resources[$cur_adm] = array();
|
||||
}
|
||||
|
||||
foreach (array(
|
||||
'diskspace_used',
|
||||
'traffic_used',
|
||||
'mysqls_used',
|
||||
'ftps_used',
|
||||
'emails_used',
|
||||
'email_accounts_used',
|
||||
'email_forwarders_used',
|
||||
'email_quota_used',
|
||||
'subdomains_used'
|
||||
) as $field) {
|
||||
// be sure that all fields are set in the array
|
||||
foreach ($resource_fields as $field) {
|
||||
self::initArrField($field, $admin_resources[$cur_adm], 0);
|
||||
$admin[$field . '_new'] = $admin_resources[$cur_adm][$field];
|
||||
// initialize new values
|
||||
$admin[$field . '_new'] = 0;
|
||||
}
|
||||
|
||||
// now get the customer resource usage which we have re-calculated previously
|
||||
foreach ($admin_customers as $acustomer) {
|
||||
foreach (array(
|
||||
'diskspace_used',
|
||||
'traffic_used',
|
||||
'mysqls_used',
|
||||
'ftps_used',
|
||||
'emails_used',
|
||||
'email_accounts_used',
|
||||
'email_forwarders_used',
|
||||
'email_quota_used',
|
||||
'subdomains_used'
|
||||
) as $field) {
|
||||
foreach ($resource_fields as $field) {
|
||||
$admin[$field . '_new'] += $acustomer[$field];
|
||||
}
|
||||
// check for std-subdomain
|
||||
if ($acustomer['standardsubdomain'] > 0) {
|
||||
// std-subdomain does not count to assign resource
|
||||
$admin['domains_used_new']--;
|
||||
// std-subdomain does not count as assigned resource
|
||||
$admin['domains_used_new'] --;
|
||||
}
|
||||
}
|
||||
|
||||
// update database entry accordingly
|
||||
$stmt = Database::prepare('UPDATE `' . TABLE_PANEL_ADMINS . '`
|
||||
SET `customers_used` = :customers_used,
|
||||
`domains_used` = :domains_used,
|
||||
|
||||
@@ -4625,7 +4625,7 @@ aliases: files
|
||||
<command><![CDATA[useradd -s /bin/false -g {{settings.system.mod_fcgid_httpgroup}} {{settings.system.mod_fcgid_httpuser}}]]></command>
|
||||
<command><![CDATA[mkdir -p {{settings.system.mod_fcgid_configdir}}]]></command>
|
||||
<command><![CDATA[mkdir -p {{settings.system.mod_fcgid_tmpdir}}]]></command>
|
||||
<command><![CDATA[a2dismod php7.0]]></command>
|
||||
<command><![CDATA[a2dismod php7.2]]></command>
|
||||
</commands>
|
||||
<!-- instead of just restarting apache, we let the cronjob do all the
|
||||
dirty work -->
|
||||
|
||||
@@ -4827,7 +4827,7 @@ aliases: files
|
||||
<command><![CDATA[useradd -s /bin/false -g {{settings.system.mod_fcgid_httpgroup}} {{settings.system.mod_fcgid_httpuser}}]]></command>
|
||||
<command><![CDATA[mkdir -p {{settings.system.mod_fcgid_configdir}}]]></command>
|
||||
<command><![CDATA[mkdir -p {{settings.system.mod_fcgid_tmpdir}}]]></command>
|
||||
<command><![CDATA[a2dismod php7.0]]></command>
|
||||
<command><![CDATA[a2dismod php7.3]]></command>
|
||||
</commands>
|
||||
<!-- instead of just restarting apache, we let the cronjob do all the
|
||||
dirty work -->
|
||||
|
||||
@@ -32,13 +32,13 @@ return array(
|
||||
'label' => $lng['serversettings']['phpfpm_settings']['reload'],
|
||||
'type' => 'text',
|
||||
'maxlength' => 255,
|
||||
'value' => 'service php7.0-fpm restart'
|
||||
'value' => 'service php7.3-fpm restart'
|
||||
),
|
||||
'config_dir' => array(
|
||||
'label' => $lng['serversettings']['phpfpm_settings']['configdir'],
|
||||
'type' => 'text',
|
||||
'maxlength' => 255,
|
||||
'value' => '/etc/php/7.0/fpm/pool.d/'
|
||||
'value' => '/etc/php/7.3/fpm/pool.d/'
|
||||
),
|
||||
'pm' => array(
|
||||
'label' => $lng['serversettings']['phpfpm_settings']['pm'],
|
||||
@@ -49,25 +49,25 @@ return array(
|
||||
'label' => $lng['serversettings']['phpfpm_settings']['max_children']['title'],
|
||||
'desc' => $lng['serversettings']['phpfpm_settings']['max_children']['description'],
|
||||
'type' => 'int',
|
||||
'value' => 1
|
||||
'value' => 5
|
||||
),
|
||||
'start_servers' => array(
|
||||
'label' => $lng['serversettings']['phpfpm_settings']['start_servers']['title'],
|
||||
'desc' => $lng['serversettings']['phpfpm_settings']['start_servers']['description'],
|
||||
'type' => 'int',
|
||||
'value' => 20
|
||||
'value' => 2
|
||||
),
|
||||
'min_spare_servers' => array(
|
||||
'label' => $lng['serversettings']['phpfpm_settings']['min_spare_servers']['title'],
|
||||
'desc' => $lng['serversettings']['phpfpm_settings']['min_spare_servers']['description'],
|
||||
'type' => 'int',
|
||||
'value' => 5
|
||||
'value' => 1
|
||||
),
|
||||
'max_spare_servers' => array(
|
||||
'label' => $lng['serversettings']['phpfpm_settings']['max_spare_servers']['title'],
|
||||
'desc' => $lng['serversettings']['phpfpm_settings']['max_spare_servers']['description'],
|
||||
'type' => 'int',
|
||||
'value' => 35
|
||||
'value' => 3
|
||||
),
|
||||
'max_requests' => array(
|
||||
'label' => $lng['serversettings']['phpfpm_settings']['max_requests']['title'],
|
||||
@@ -79,7 +79,7 @@ return array(
|
||||
'label' => $lng['serversettings']['phpfpm_settings']['idle_timeout']['title'],
|
||||
'desc' => $lng['serversettings']['phpfpm_settings']['idle_timeout']['description'],
|
||||
'type' => 'int',
|
||||
'value' => 30
|
||||
'value' => 10
|
||||
),
|
||||
'limit_extensions' => array(
|
||||
'label' => $lng['serversettings']['phpfpm_settings']['limit_extensions']['title'],
|
||||
|
||||
@@ -163,7 +163,7 @@ return array(
|
||||
'label' => $lng['serversettings']['phpfpm_settings']['idle_timeout']['title'],
|
||||
'desc' => $lng['serversettings']['phpfpm_settings']['idle_timeout']['description'] . $lng['serversettings']['phpfpm_settings']['override_fpmconfig_addinfo'],
|
||||
'type' => 'int',
|
||||
'value' => 30
|
||||
'value' => 10
|
||||
),
|
||||
'limit_extensions' => array(
|
||||
'visible' => (\Froxlor\Settings::Get('phpfpm.enabled') == 1 ? true : false),
|
||||
|
||||
Reference in New Issue
Block a user