Skip to content
Commits on Source (47)
......@@ -547,16 +547,15 @@ function remove_blank_lines($input, $file = 1){
$content = $input;
}
$lines = explode("\n", $content);
$new_lines = array();
if(!empty($lines)){
foreach($lines as $line){
if(trim($line) != '') $new_lines[] = $line;
}
}
if(is_array($new_lines)){
$content = implode("\n", $new_lines);
} else {
$content = '';
}
$content = implode("\n", $new_lines);
if($file){
wf($input, $content);
}else{
......
......@@ -3145,11 +3145,11 @@ class installer_base {
$out = null;
$ret = null;
if($conf['nginx']['installed'] == true || $conf['apache']['installed'] == true) {
exec("$acme --issue --log $acme_log -w /usr/local/ispconfig/interface/acme -d " . escapeshellarg($hostname) . " $renew_hook", $out, $ret);
exec("$acme --issue --keylength 4096 --log $acme_log -w /usr/local/ispconfig/interface/acme -d " . escapeshellarg($hostname) . " $renew_hook", $out, $ret);
}
// Else, it is not webserver, so we use standalone
else {
exec("$acme --issue --log $acme_log --standalone -d " . escapeshellarg($hostname) . " $hook", $out, $ret);
exec("$acme --issue --keylength 4096 --log $acme_log --standalone -d " . escapeshellarg($hostname) . " $hook", $out, $ret);
}
if($ret == 0 || ($ret == 2 && file_exists($check_acme_file))) {
......
ALTER TABLE `mail_user` CHANGE `quota` `quota` BIGINT(20) NOT NULL DEFAULT '0';
-- 5918 add imap_prefix column to mail_user table
ALTER TABLE `mail_user` ADD COLUMN `imap_prefix` varchar(255) NULL default NULL AFTER `backup_copies`;
......@@ -1070,7 +1070,7 @@ CREATE TABLE `mail_user` (
`gid` int(11) NOT NULL default '5000',
`maildir` varchar(255) NOT NULL default '',
`maildir_format` varchar(255) NOT NULL default 'maildir',
`quota` bigint(20) NOT NULL default '-1',
`quota` bigint(20) NOT NULL default '0',
`cc` text,
`forward_in_lda` enum('n','y') NOT NULL default 'n',
`sender_cc` varchar(255) NOT NULL default '',
......
......@@ -226,7 +226,7 @@ class listform_actions {
}
$sql_where = $app->listform->getSearchSQL($sql_where);
if(isset($app->listform->listDef['join_sql'])) $sql_where .= ' AND '.$app->listform->listDef['join_sql'];
if(isset($app->listform->listDef['join_sql']) && $app->listform->listDef['join_sql'] != '') $sql_where .= ' AND '.$app->listform->listDef['join_sql'];
$app->tpl->setVar($app->listform->searchValues);
$order_by_sql = $this->SQLOrderBy;
......
......@@ -326,7 +326,7 @@ class quota_lib {
if($used_ratio >= 0.8) $databases[$i]['display_colour'] = '#fd934f';
if($used_ratio >= 1) $databases[$i]['display_colour'] = '#cc0000';
if($databases[$i]['database_quota'] == 0){
if($databases[$i]['database_quota'] == -1) {
$databases[$i]['database_quota'] = $app->lng('unlimited_txt');
} else {
$databases[$i]['database_quota'] = $databases[$i]['database_quota'] . ' MB';
......
......@@ -560,8 +560,12 @@ class tform_base {
foreach($vals as $tvl) {
if(trim($tvl) == trim($k)) $checked = ' CHECKED';
}
$datacheckfields = '';
if (isset($field['data-check-fields'])) {
$datacheckfields = " data-check-fields=\"{$field['data-check-fields']}\"";
}
// $out .= "<label for=\"".$key."[]\" class=\"inlineLabel\"><input name=\"".$key."[]\" id=\"".$key."[]\" value=\"$k\" type=\"checkbox\" $checked /> $v</label>\r\n";
$out .= "<label for=\"".$key.$elementNo."\" class=\"inlineLabel\"><input name=\"".$key."[]\" id=\"".$key.$elementNo."\" value=\"$k\" type=\"checkbox\" $checked /> $v</label>";
$out .= "<label for=\"".$key.$elementNo."\" class=\"inlineLabel\"$datacheckfields><input name=\"".$key."[]\" id=\"".$key.$elementNo."\" value=\"$k\" type=\"checkbox\" $checked /> $v</label>";
if (isset($field['render_inline']) && $field['render_inline'] == 'n') {
$out .= "<br/>\r\n";
}
......
......@@ -39,6 +39,9 @@ $liste['paging_tpl'] = 'templates/paging.tpl.htm';
//* Enable auth
$liste['auth'] = 'no';
// mark columns for php sorting (no real mySQL columns)
$liste["phpsort"] = array('usage');
/*****************************************************
* Suchfelder
......
......@@ -125,7 +125,7 @@ class page_action extends tform_actions {
function onShowEnd() {
global $app;
$tmp = $app->db->queryOneRecord("SELECT server_name FROM server WHERE server_id = ? AND ((SELECT COUNT(*) FROM server) > 1)", $this->id);
$tmp = $app->db->queryOneRecord("SELECT server_name FROM server WHERE server_id = ? AND ((SELECT COUNT(*) FROM server) >= 1)", $this->id);
$app->tpl->setVar('server_name', $app->functions->htmlentities($tmp['server_name']));
unset($tmp);
......
......@@ -14,7 +14,7 @@
<td>{tmpl_var name='database_name'}</td>
<td>{tmpl_var name='used'}</td>
<td>{tmpl_var name='database_quota'}</td>
{tmpl_if name="quota_raw" op="!=" value="0"}<td>
{tmpl_if name="quota_raw" op="!=" value="-1"}<td>
<div class='progress'>
<div class='progress-bar-striped progress-bar progress-bar-{tmpl_if name="used_percentage" op="<" value="50"}success{tmpl_elseif name="used_percentage" op="<" value="75"}warning{tmpl_else}danger{/tmpl_if}' role='progressbar' aria-valuemin='0' aria-valuemax='100' aria-valuenow='{tmpl_var name="used_percentage"}' style='width: {tmpl_var name="used_percentage"}%'><span>{tmpl_var name="used_percentage"}%</span>
<span class='sr-only'>{tmpl_var name='used'} {tmpl_var name='of_txt'} {tmpl_var name='database_quota'}</span>
......
......@@ -622,7 +622,11 @@ if(isset($_FILES['file']['name']) && is_uploaded_file($_FILES['file']['tmp_name'
$error[] = $wb['zone_file_soa_parser'];
$error[] = print_r( $soa, true );
}
if ($settings['use_domain_module'] == 'y' && ! $app->tools_sites->checkDomainModuleDomain($soa['name']) ) {
$tmp_soa_name = trim($soa['name'], ".");
$tmp_domain_id = $app->db->queryOneRecord('SELECT domain_id FROM domain where domain = ?', $tmp_soa_name);
if ($settings['use_domain_module'] == 'y' && ! $app->tools_sites->checkDomainModuleDomain($tmp_domain_id['domain_id']) ) {
$valid_zone_file = false;
$error[] = $wb['zone_not_allowed'];
}
......
......@@ -302,6 +302,7 @@ $form["tabs"]['dns_soa'] = array (
'separator' => ',',
'default' => 'ECDSAP256SHA256',
'value' => array('NSEC3RSASHA1' => '7 (NSEC3RSASHA1)','ECDSAP256SHA256' => '13 (ECDSAP256SHA256)'),
'data-check-fields' => 'dnssec_wanted',
'width' => '30',
'maxlength' => '255'
),
......
......@@ -61,6 +61,16 @@ $liste["item"][] = array( 'field' => "active",
'width' => "",
'value' => array('Y' => $app->lng('yes_txt'), 'N' => $app->lng('no_txt')));
$liste["item"][] = array( 'field' => "dnssec_initialized",
'datatype' => "VARCHAR",
'formtype' => "TEXT",
'op' => "=",
'prefix' => "",
'suffix' => "",
'width' => "",
'value' => '',
);
$liste["item"][] = array( 'field' => "server_id",
'datatype' => "VARCHAR",
......
......@@ -57,7 +57,7 @@
<tbody>
<tmpl_loop name="records">
<tr>
<td><a href="#" data-load-content="dns/dns_soa_edit.php?id={tmpl_var name='id'}&next_tab=dns_records">{tmpl_var name="active"}</td>
<td><a href="#" data-load-content="dns/dns_soa_edit.php?id={tmpl_var name='id'}&next_tab=dns_records">{tmpl_var name="active"}<tmpl_if name="dnssec_initialized" op="==" value="Y"> <i class="fa fa-key" aria-hidden="true"></i></tmpl_if></td>
<td><a href="#" data-load-content="dns/dns_soa_edit.php?id={tmpl_var name='id'}&next_tab=dns_records">{tmpl_var name="sys_groupid"}</a></td>
<td><a href="#" data-load-content="dns/dns_soa_edit.php?id={tmpl_var name='id'}&next_tab=dns_records" data-toggle="tooltip" data-placement="bottom" title="{tmpl_var name='server_id'}">{tmpl_var name="server_id"}</a></td>
<td><a href="#" data-load-content="dns/dns_soa_edit.php?id={tmpl_var name='id'}&next_tab=dns_records" data-toggle="tooltip" data-placement="bottom" title="{tmpl_var name='origin'}">{tmpl_var name="origin"}</a></td>
......
......@@ -55,7 +55,7 @@
<tbody>
<tmpl_loop name="records">
<tr>
<td><a href="#" data-load-content="dns/dns_soa_edit.php?id={tmpl_var name='id'}&next_tab=dns_records">{tmpl_var name="active"}</td>
<td><a href="#" data-load-content="dns/dns_soa_edit.php?id={tmpl_var name='id'}&next_tab=dns_records">{tmpl_var name="active"}<tmpl_if name="dnssec_initialized" op="==" value="Y"> <i class="fa fa-key" aria-hidden="true"></i></tmpl_if></td>
<td><a href="#" data-load-content="dns/dns_soa_edit.php?id={tmpl_var name='id'}&next_tab=dns_records" data-toggle="tooltip" data-placement="bottom" title="{tmpl_var name='server_id'}">{tmpl_var name="server_id"}</a></td>
<td><a href="#" data-load-content="dns/dns_soa_edit.php?id={tmpl_var name='id'}&next_tab=dns_records" data-toggle="tooltip" data-placement="bottom" title="{tmpl_var name='origin'}">{tmpl_var name="origin"}</a></td>
<td><a href="#" data-load-content="dns/dns_soa_edit.php?id={tmpl_var name='id'}&next_tab=dns_records" data-toggle="tooltip" data-placement="bottom" title="{tmpl_var name='ns'}">{tmpl_var name="ns"}</a></td>
......
......@@ -132,7 +132,7 @@ $form["tabs"]['domain'] = array (
'width' => '20',
'maxlength' => '63',
'validators' => array ( 0 => array ( 'type' => 'REGEX',
'regex' => '/^[a-z0-9]{0,63}$/',
'regex' => '/^(?=.*[a-z])[a-z0-9]{1,63}$/',
'errmsg'=> 'dkim_selector_error'),
),
),
......
......@@ -166,7 +166,7 @@ $form["tabs"]['mailuser'] = array(
'regex' => '/^([0-9]{1,})$/',
'errmsg'=> 'quota_error_value'),
),
'default' => '-1',
'default' => '0',
'value' => '',
'width' => '30',
'maxlength' => '255'
......
......@@ -47,4 +47,5 @@ $wb['Relay Recipients'] = 'Relay Recipients';
$wb['Mailbox quota'] = 'Mailbox quota';
$wb['add_header_txt'] = 'Header (adds \"X-Spam: Yes\")';
$wb['rewrite_subject_txt'] = 'Subject (adds \"***SPAM***\" at the beginning)';
$wb['inactive'] = 'inactive';
?>
......@@ -47,4 +47,5 @@ $wb['Relay Recipients'] = 'Relay Recipients';
$wb['Mailbox quota'] = 'Mailbox quota';
$wb['add_header_txt'] = 'Header (adds \"X-Spam: Yes\")';
$wb['rewrite_subject_txt'] = 'Subject (adds \"***SPAM***\" at the beginning)';
$wb['inactive'] = 'inactive';
?>
......@@ -51,3 +51,4 @@ $wb['Relay Recipients'] = 'Destinatários de retransmissão';
$wb['Mailbox quota'] = 'Cotas das contas de email';
$wb['add_header_txt'] = 'Cabeçalho (adicionar "X-Spam: Yes")';
$wb['rewrite_subject_txt'] = 'Assunto (adicionar "***SPAM***" no início)';
$wb['inactive'] = 'inactive';