Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
adb5c6734a | ||
|
|
7dff46b63e | ||
|
|
12883bafd6 | ||
|
|
c2b88200f0 | ||
|
|
634199780b | ||
|
|
e0275840ab | ||
|
|
bae8c86901 | ||
|
|
e8be3ee643 | ||
|
|
35ecdfa2f5 | ||
|
|
3e4a3ef4b0 |
@@ -150,10 +150,10 @@ return array(
|
|||||||
'settinggroup' => 'system',
|
'settinggroup' => 'system',
|
||||||
'varname' => 'letsencryptca',
|
'varname' => 'letsencryptca',
|
||||||
'type' => 'option',
|
'type' => 'option',
|
||||||
'default' => 'testing',
|
'default' => 'production',
|
||||||
'option_mode' => 'one',
|
'option_mode' => 'one',
|
||||||
'option_options' => array(
|
'option_options' => array(
|
||||||
'testing' => 'https://acme-staging' . (\Froxlor\Settings::Get('system.leapiversion') == '2' ? '-v02' : '') . '.api.letsencrypt.org (Test)',
|
'testing' => 'https://acme-staging-v0' . \Froxlor\Settings::Get('system.leapiversion') . '.api.letsencrypt.org (Test)',
|
||||||
'production' => 'https://acme-v0' . \Froxlor\Settings::Get('system.leapiversion') . '.api.letsencrypt.org (Live)'
|
'production' => 'https://acme-v0' . \Froxlor\Settings::Get('system.leapiversion') . '.api.letsencrypt.org (Live)'
|
||||||
),
|
),
|
||||||
'save_method' => 'storeSettingField'
|
'save_method' => 'storeSettingField'
|
||||||
|
|||||||
@@ -382,7 +382,7 @@ if ($page == 'domains' || $page == 'overview') {
|
|||||||
if (isset($_POST['send']) && $_POST['send'] == 'send') {
|
if (isset($_POST['send']) && $_POST['send'] == 'send') {
|
||||||
try {
|
try {
|
||||||
// remove ssl ip/ports if set is empty
|
// remove ssl ip/ports if set is empty
|
||||||
if (isset($_POST['ssl_ipandport']) && empty($_POST['ssl_ipandport'])) {
|
if (!isset($_POST['ssl_ipandport']) || empty($_POST['ssl_ipandport'])) {
|
||||||
$_POST['remove_ssl_ipandport'] = true;
|
$_POST['remove_ssl_ipandport'] = true;
|
||||||
}
|
}
|
||||||
Domains::getLocal($userinfo, $_POST)->update();
|
Domains::getLocal($userinfo, $_POST)->update();
|
||||||
|
|||||||
@@ -42,7 +42,8 @@ if ($page == 'overview') {
|
|||||||
if ($action == '') {
|
if ($action == '') {
|
||||||
$log->logAction(\Froxlor\FroxlorLogger::USR_ACTION, LOG_NOTICE, "viewed customer_domains::domains");
|
$log->logAction(\Froxlor\FroxlorLogger::USR_ACTION, LOG_NOTICE, "viewed customer_domains::domains");
|
||||||
$fields = array(
|
$fields = array(
|
||||||
'd.domain' => $lng['domains']['domainname']
|
'd.domain' => $lng['domains']['domainname'],
|
||||||
|
'd.aliasdomain' => $lng['domains']['aliasdomain']
|
||||||
);
|
);
|
||||||
try {
|
try {
|
||||||
// get total count
|
// get total count
|
||||||
|
|||||||
@@ -696,7 +696,7 @@ opcache.interned_strings_buffer'),
|
|||||||
('panel', 'password_special_char', '!?<>§$%+#=@'),
|
('panel', 'password_special_char', '!?<>§$%+#=@'),
|
||||||
('panel', 'customer_hide_options', ''),
|
('panel', 'customer_hide_options', ''),
|
||||||
('panel', 'is_configured', '0'),
|
('panel', 'is_configured', '0'),
|
||||||
('panel', 'version', '0.10.7'),
|
('panel', 'version', '0.10.9'),
|
||||||
('panel', 'db_version', '201911220');
|
('panel', 'db_version', '201911220');
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -495,3 +495,13 @@ if (\Froxlor\Froxlor::isFroxlorVersion('0.10.6')) {
|
|||||||
showUpdateStep("Updating from 0.10.6 to 0.10.7", false);
|
showUpdateStep("Updating from 0.10.6 to 0.10.7", false);
|
||||||
\Froxlor\Froxlor::updateToVersion('0.10.7');
|
\Froxlor\Froxlor::updateToVersion('0.10.7');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (\Froxlor\Froxlor::isFroxlorVersion('0.10.7')) {
|
||||||
|
showUpdateStep("Updating from 0.10.7 to 0.10.8", false);
|
||||||
|
\Froxlor\Froxlor::updateToVersion('0.10.8');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (\Froxlor\Froxlor::isFroxlorVersion('0.10.8')) {
|
||||||
|
showUpdateStep("Updating from 0.10.8 to 0.10.9", false);
|
||||||
|
\Froxlor\Froxlor::updateToVersion('0.10.9');
|
||||||
|
}
|
||||||
|
|||||||
@@ -346,6 +346,15 @@ abstract class ApiCommand extends ApiParameter
|
|||||||
} else {
|
} else {
|
||||||
$order .= " ORDER BY ";
|
$order .= " ORDER BY ";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$nat_fields = [
|
||||||
|
'`c`.`loginname`',
|
||||||
|
'`a`.`loginname`',
|
||||||
|
'`adminname`',
|
||||||
|
'`databasename`',
|
||||||
|
'`username`'
|
||||||
|
];
|
||||||
|
|
||||||
foreach ($orderby as $field => $by) {
|
foreach ($orderby as $field => $by) {
|
||||||
$sortfield = explode('.', $field);
|
$sortfield = explode('.', $field);
|
||||||
foreach ($sortfield as $id => $sfield) {
|
foreach ($sortfield as $id => $sfield) {
|
||||||
@@ -365,7 +374,7 @@ abstract class ApiCommand extends ApiParameter
|
|||||||
])) {
|
])) {
|
||||||
$by = 'ASC';
|
$by = 'ASC';
|
||||||
}
|
}
|
||||||
if (\Froxlor\Settings::Get('panel.natsorting') == 1) {
|
if (\Froxlor\Settings::Get('panel.natsorting') == 1 && in_array($field, $nat_fields)) {
|
||||||
// Acts similar to php's natsort(), found in one comment at http://my.opera.com/cpr/blog/show.dml/160556
|
// Acts similar to php's natsort(), found in one comment at http://my.opera.com/cpr/blog/show.dml/160556
|
||||||
$order .= "CONCAT( IF( ASCII( LEFT( " . $field . ", 5 ) ) > 57,
|
$order .= "CONCAT( IF( ASCII( LEFT( " . $field . ", 5 ) ) > 57,
|
||||||
LEFT( " . $field . ", 1 ), 0 ),
|
LEFT( " . $field . ", 1 ), 0 ),
|
||||||
|
|||||||
@@ -209,7 +209,7 @@ class Certificates extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resou
|
|||||||
} else {
|
} else {
|
||||||
$certs_stmt_query .= "1 ";
|
$certs_stmt_query .= "1 ";
|
||||||
}
|
}
|
||||||
$certs_stmt = Database::prepare($certs_stmt_query . $this->getSearchWhere($query_fields) . $this->getOrderBy() . $this->getLimit());
|
$certs_stmt = Database::prepare($certs_stmt_query . $this->getSearchWhere($query_fields, true) . $this->getOrderBy() . $this->getLimit());
|
||||||
$qry_params = array_merge($qry_params, $query_fields);
|
$qry_params = array_merge($qry_params, $query_fields);
|
||||||
Database::pexecute($certs_stmt, $qry_params, true, true);
|
Database::pexecute($certs_stmt, $qry_params, true, true);
|
||||||
$result = array();
|
$result = array();
|
||||||
|
|||||||
@@ -774,7 +774,7 @@ class SubDomains extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resourc
|
|||||||
LEFT JOIN `" . TABLE_PANEL_DOMAINS . "` `pd` ON `pd`.`id`=`d`.`parentdomainid`
|
LEFT JOIN `" . TABLE_PANEL_DOMAINS . "` `pd` ON `pd`.`id`=`d`.`parentdomainid`
|
||||||
WHERE `d`.`customerid` IN (" . implode(', ', $customer_ids) . ")
|
WHERE `d`.`customerid` IN (" . implode(', ', $customer_ids) . ")
|
||||||
AND `d`.`email_only` = '0'
|
AND `d`.`email_only` = '0'
|
||||||
AND `d`.`id` NOT IN (" . implode(', ', $customer_stdsubs) . ")" . $this->getSearchWhere($query_fields, true) . " ORDER BY `parentdomainname` " . $this->getOrderBy(true) . $this->getLimit());
|
AND `d`.`id` NOT IN (" . implode(', ', $customer_stdsubs) . ")" . $this->getSearchWhere($query_fields, true) . " GROUP BY `d`.`id` ORDER BY `parentdomainname` " . $this->getOrderBy(true) . $this->getLimit());
|
||||||
|
|
||||||
$result = array();
|
$result = array();
|
||||||
Database::pexecute($domains_stmt, $query_fields, true, true);
|
Database::pexecute($domains_stmt, $query_fields, true, true);
|
||||||
@@ -840,8 +840,6 @@ class SubDomains extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Resourc
|
|||||||
$domains_stmt = Database::prepare("
|
$domains_stmt = Database::prepare("
|
||||||
SELECT COUNT(*) as num_subdom
|
SELECT COUNT(*) as num_subdom
|
||||||
FROM `" . TABLE_PANEL_DOMAINS . "` `d`
|
FROM `" . TABLE_PANEL_DOMAINS . "` `d`
|
||||||
LEFT JOIN `" . TABLE_PANEL_DOMAINS . "` `ad` ON `d`.`aliasdomain`=`ad`.`id`
|
|
||||||
LEFT JOIN `" . TABLE_PANEL_DOMAINS . "` `da` ON `da`.`aliasdomain`=`d`.`id`
|
|
||||||
WHERE `d`.`customerid` IN (" . implode(', ', $customer_ids) . ")
|
WHERE `d`.`customerid` IN (" . implode(', ', $customer_ids) . ")
|
||||||
AND `d`.`email_only` = '0'
|
AND `d`.`email_only` = '0'
|
||||||
AND `d`.`id` NOT IN (" . implode(', ', $customer_stdsubs) . ")
|
AND `d`.`id` NOT IN (" . implode(', ', $customer_stdsubs) . ")
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ class AcmeSh extends \Froxlor\Cron\FroxlorCron
|
|||||||
|
|
||||||
self::checkInstall();
|
self::checkInstall();
|
||||||
|
|
||||||
self::$apiserver = 'https://acme-v0' . \Froxlor\Settings::Get('system.leapiversion') . '.api.letsencrypt.org/directory';
|
self::$apiserver = 'https://acme-'.(Settings::Get('system.letsencryptca') == 'testing' ? 'staging-' : '').'v0' . \Froxlor\Settings::Get('system.leapiversion') . '.api.letsencrypt.org/directory';
|
||||||
|
|
||||||
FroxlorLogger::getInstanceOf()->logAction(FroxlorLogger::CRON_ACTION, LOG_INFO, "Requesting/renewing Let's Encrypt certificates");
|
FroxlorLogger::getInstanceOf()->logAction(FroxlorLogger::CRON_ACTION, LOG_INFO, "Requesting/renewing Let's Encrypt certificates");
|
||||||
|
|
||||||
@@ -339,6 +339,9 @@ class AcmeSh extends \Froxlor\Cron\FroxlorCron
|
|||||||
if ($force) {
|
if ($force) {
|
||||||
$acmesh_cmd .= " --force";
|
$acmesh_cmd .= " --force";
|
||||||
}
|
}
|
||||||
|
if (defined('CRON_DEBUG_FLAG')) {
|
||||||
|
$acmesh_cmd .= " --debug";
|
||||||
|
}
|
||||||
|
|
||||||
$acme_result = \Froxlor\FileDir::safe_exec($acmesh_cmd);
|
$acme_result = \Froxlor\FileDir::safe_exec($acmesh_cmd);
|
||||||
// debug output of acme.sh run
|
// debug output of acme.sh run
|
||||||
|
|||||||
@@ -137,7 +137,11 @@ class TrafficCron extends \Froxlor\Cron\FroxlorCron
|
|||||||
$mysqlusage_all[$row_database['customerid']] = 0;
|
$mysqlusage_all[$row_database['customerid']] = 0;
|
||||||
}
|
}
|
||||||
// sum up result
|
// sum up result
|
||||||
|
if ($mysql_usage_row) {
|
||||||
$mysqlusage_all[$row_database['customerid']] += floatval($mysql_usage_row['customerusage']);
|
$mysqlusage_all[$row_database['customerid']] += floatval($mysql_usage_row['customerusage']);
|
||||||
|
} else {
|
||||||
|
\Froxlor\FroxlorLogger::getInstanceOf()->logAction(\Froxlor\FroxlorLogger::CRON_ACTION, LOG_WARNING, "Cannot get usage for database " . $row_database['databasename'] . ".");
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
\Froxlor\FroxlorLogger::getInstanceOf()->logAction(\Froxlor\FroxlorLogger::CRON_ACTION, LOG_WARNING, "Seems like the database " . $row_database['databasename'] . " had been removed manually.");
|
\Froxlor\FroxlorLogger::getInstanceOf()->logAction(\Froxlor\FroxlorLogger::CRON_ACTION, LOG_WARNING, "Seems like the database " . $row_database['databasename'] . " had been removed manually.");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ final class Froxlor
|
|||||||
{
|
{
|
||||||
|
|
||||||
// Main version variable
|
// Main version variable
|
||||||
const VERSION = '0.10.7';
|
const VERSION = '0.10.9';
|
||||||
|
|
||||||
// Database version (YYYYMMDDC where C is a daily counter)
|
// Database version (YYYYMMDDC where C is a daily counter)
|
||||||
const DBVERSION = '201911220';
|
const DBVERSION = '201911220';
|
||||||
|
|||||||
Reference in New Issue
Block a user