diff --git a/admin_customers.php b/admin_customers.php index ac393f73..a6555709 100644 --- a/admin_customers.php +++ b/admin_customers.php @@ -298,6 +298,7 @@ if ($page == 'customers' && $userinfo['customers'] != '0') { $email_quota_ul = \Froxlor\UI\HTML::makecheckbox('email_quota_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true); $ftps_ul = \Froxlor\UI\HTML::makecheckbox('ftps_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true); $mysqls_ul = \Froxlor\UI\HTML::makecheckbox('mysqls_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true); + $nextcloud_quota_ul = \Froxlor\UI\HTML::makecheckbox('nextcloud_quota_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true); $gender_options = \Froxlor\UI\HTML::makeoption($lng['gender']['undef'], 0, true, true, true); $gender_options .= \Froxlor\UI\HTML::makeoption($lng['gender']['male'], 1, null, true, true); @@ -397,11 +398,16 @@ if ($page == 'customers' && $userinfo['customers'] != '0') { $result['diskspace'] = round($result['diskspace'] / 1024, $dec_places); $result['email'] = $idna_convert->decode($result['email']); + $nextcloud_quota_ul = \Froxlor\UI\HTML::makecheckbox('nextcloud_quota_ul', $lng['customer']['unlimited'], '-1', false, $result['nextcloud_quota'], true, true); + if ($result['nextcloud_quota'] == '-1') { + $result['nextcloud_quota'] = ''; + } + $diskspace_ul = \Froxlor\UI\HTML::makecheckbox('diskspace_ul', $lng['customer']['unlimited'], '-1', false, $result['diskspace'], true, true); if ($result['diskspace'] == '-1') { $result['diskspace'] = ''; } - + $traffic_ul = \Froxlor\UI\HTML::makecheckbox('traffic_ul', $lng['customer']['unlimited'], '-1', false, $result['traffic'], true, true); if ($result['traffic'] == '-1') { $result['traffic'] = ''; diff --git a/lib/Froxlor/Api/Commands/Customers.php b/lib/Froxlor/Api/Commands/Customers.php index b1dd1034..038f7bdd 100644 --- a/lib/Froxlor/Api/Commands/Customers.php +++ b/lib/Froxlor/Api/Commands/Customers.php @@ -368,6 +368,7 @@ class Customers extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resource foreach ($hp_result['value'] as $index => $value) { $hp_result[$index] = $value; } + $nextcloud_quota = $hp_result['nextcloud_quota'] ?? 0; $diskspace = $hp_result['diskspace'] ?? 0; $traffic = $hp_result['traffic'] ?? 0; $subdomains = $hp_result['subdomains'] ?? 0; @@ -385,6 +386,7 @@ class Customers extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resource $dnsenabled = $hp_result['dnsenabled'] ?? 0; $logviewenabled = $hp_result['logviewenabled'] ?? 0; } else { + $nextcloud_quota = $this->getUlParam('nextcloud_quota', 'nextcloud_quota_ul', true, 0); $diskspace = $this->getUlParam('diskspace', 'diskspace_ul', true, 0); $traffic = $this->getUlParam('traffic', 'traffic_ul', true, 0); $subdomains = $this->getUlParam('subdomains', 'subdomains_ul', true, 0); @@ -533,6 +535,7 @@ class Customers extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resource 'api_allowed' => $api_allowed, 'docroot' => $documentroot, 'guid' => $guid, + 'nextcloud_quota' => $nextcloud_quota, 'diskspace' => $diskspace, 'traffic' => $traffic, 'subdomains' => $subdomains, @@ -574,6 +577,7 @@ class Customers extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resource `api_allowed` = :api_allowed, `documentroot` = :docroot, `guid` = :guid, + `nextcloud_quota` = :nextcloud_quota, `diskspace` = :diskspace, `traffic` = :traffic, `subdomains` = :subdomains, @@ -968,6 +972,7 @@ class Customers extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resource $custom_notes_show = $this->getBoolParam('custom_notes_show', true, $result['custom_notes_show']); $dec_places = Settings::Get('panel.decimal_places'); + $nextcloud_quota = $this->getUlParam('nextcloud_quota', 'nextcloud_quota_ul', true, round($result['nextcloud_quota'], $dec_places)); $diskspace = $this->getUlParam('diskspace', 'diskspace_ul', true, round($result['diskspace'] / 1024, $dec_places)); $traffic = $this->getUlParam('traffic', 'traffic_ul', true, round($result['traffic'] / (1024 * 1024), $dec_places)); $subdomains = $this->getUlParam('subdomains', 'subdomains_ul', true, $result['subdomains']); @@ -1234,6 +1239,7 @@ class Customers extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resource 'fax' => $fax, 'email' => $email, 'customerno' => $customernumber, + 'nextcloud_quota' => $nextcloud_quota, 'diskspace' => $diskspace, 'traffic' => $traffic, 'subdomains' => $subdomains, @@ -1276,6 +1282,7 @@ class Customers extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resource `fax` = :fax, `email` = :email, `customernumber` = :customerno, + `nextcloud_quota` = :nextcloud_quota, `diskspace` = :diskspace, `traffic` = :traffic, `subdomains` = :subdomains, diff --git a/lib/Froxlor/Cron/Http/Nginx.php b/lib/Froxlor/Cron/Http/Nginx.php index e7fcc416..b78286ba 100644 --- a/lib/Froxlor/Cron/Http/Nginx.php +++ b/lib/Froxlor/Cron/Http/Nginx.php @@ -1035,8 +1035,10 @@ class Nginx extends HttpConfigBase protected function getStats($domain, $single) { - $stats_text = ''; + + $stats_text = ''; + return $stats_text; // define basic path to the stats if (Settings::Get('system.awstats_enabled') == '1') { $alias_dir = \Froxlor\FileDir::makeCorrectFile($domain['customerroot'] . '/awstats/'); diff --git a/lib/formfields/admin/customer/formfield.customer_add.php b/lib/formfields/admin/customer/formfield.customer_add.php index 3fe58af5..b12680ca 100644 --- a/lib/formfields/admin/customer/formfield.customer_add.php +++ b/lib/formfields/admin/customer/formfield.customer_add.php @@ -189,6 +189,14 @@ return array( 'title' => $lng['admin']['servicedata'], 'image' => 'icons/user_add.png', 'fields' => array( + 'nextcloud_quota' => array( + 'label' => $lng['customer']['nextcloud_quota'] . ' (' . $lng['customer']['gib'] . ')', + 'type' => 'textul', + 'value' => 0, + 'maxlength' => 16, + 'mandatory' => true, + 'ul_field' => $nextcloud_quota_ul + ), 'diskspace' => array( 'label' => $lng['customer']['diskspace'] . ' (' . $lng['customer']['mib'] . ')', 'type' => 'textul', diff --git a/lib/formfields/admin/customer/formfield.customer_edit.php b/lib/formfields/admin/customer/formfield.customer_edit.php index 82d009bf..ac6bc360 100644 --- a/lib/formfields/admin/customer/formfield.customer_edit.php +++ b/lib/formfields/admin/customer/formfield.customer_edit.php @@ -195,6 +195,14 @@ return array( 'title' => $lng['admin']['servicedata'], 'image' => 'icons/user_edit.png', 'fields' => array( + 'nextcloud_quota' => array( + 'label' => $lng['customer']['nextcloud_quota'] . ' (' . $lng['customer']['gib'] . ')', + 'type' => 'textul', + 'value' => $result['nextcloud_quota'], + 'maxlength' => 16, + 'mandatory' => true, + 'ul_field' => $nextcloud_quota_ul + ), 'diskspace' => array( 'label' => $lng['customer']['diskspace'] . ' (' . $lng['customer']['mib'] . ')', 'type' => 'textul', diff --git a/lng/english.lng.php b/lng/english.lng.php index 4e070d84..60e2aeeb 100644 --- a/lng/english.lng.php +++ b/lng/english.lng.php @@ -72,6 +72,7 @@ $lng['customer']['domains'] = 'Domains'; $lng['customer']['unlimited'] = '∞'; $lng['customer']['mib'] = 'MiB'; $lng['customer']['gib'] = 'GiB'; +$lng['customer']['nextcloud_quota'] = 'Nextcloud Quota'; /** * Customermenue