Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISPConfig
ISPConfig 3
Commits
bf34076c
Commit
bf34076c
authored
Aug 05, 2016
by
Till Brehm
Browse files
Merge branch 'stable-3.1' of git.ispconfig.org:ispconfig/ispconfig3 into stable-3.1
parents
23af232f
db7208d3
Changes
2
Hide whitespace changes
Inline
Side-by-side
interface/web/dns/dns_wizard.php
View file @
bf34076c
...
...
@@ -167,13 +167,22 @@ if($_SESSION["s"]["user"]["typ"] != 'admin')
}
//* TODO: store dnssec-keys in the database - see below for non-admin-users
//* hide dnssec if we found dns-mirror-servers
$sql
=
"SELECT count(*) AS count FROM server WHERE mirror_server_id > 0 and dns_server = 1"
;
$rec
=
$app
->
db
->
queryOneRecord
(
$sql
);
$template_record
=
$app
->
db
->
queryOneRecord
(
"SELECT * FROM dns_template WHERE template_id = ?"
,
$template_id
);
$fields
=
explode
(
','
,
$template_record
[
'fields'
]);
if
(
is_array
(
$fields
))
{
foreach
(
$fields
as
$field
)
{
$app
->
tpl
->
setVar
(
$field
.
"_VISIBLE"
,
1
);
$field
=
strtolower
(
$field
);
$app
->
tpl
->
setVar
(
$field
,
$_POST
[
$field
]);
if
(
$field
==
'DNSSEC'
&&
$rec
[
'count'
]
>
0
)
{
//hide dnssec
}
else
{
$app
->
tpl
->
setVar
(
$field
.
"_VISIBLE"
,
1
);
$field
=
strtolower
(
$field
);
$app
->
tpl
->
setVar
(
$field
,
$_POST
[
$field
]);
}
}
}
...
...
interface/web/dns/form/dns_template.tform.php
View file @
bf34076c
...
...
@@ -50,6 +50,16 @@ $form["auth_preset"]["perm_user"] = 'riud'; //r = read, i = insert, u = update,
$form
[
"auth_preset"
][
"perm_group"
]
=
'riud'
;
//r = read, i = insert, u = update, d = delete
$form
[
"auth_preset"
][
"perm_other"
]
=
''
;
//r = read, i = insert, u = update, d = delete
//* TODO: store dnssec-keys in the database - see below for non-admin-users
//* hide dnssec if we found dns-mirror-servers
$sql
=
"SELECT count(*) AS count FROM server WHERE mirror_server_id > 0 and dns_server = 1"
;
$rec
=
$app
->
db
->
queryOneRecord
(
$sql
);
if
(
$rec
[
'count'
]
>
0
)
{
$field_values
=
array
(
'DOMAIN'
=>
'Domain'
,
'IP'
=>
'IP Address'
,
'IPV6'
=>
'IPv6 Address'
,
'NS1'
=>
'NS 1'
,
'NS2'
=>
'NS 2'
,
'EMAIL'
=>
'Email'
,
'DKIM'
=>
'DKIM'
);
}
else
{
$field_values
=
array
(
'DOMAIN'
=>
'Domain'
,
'IP'
=>
'IP Address'
,
'IPV6'
=>
'IPv6 Address'
,
'NS1'
=>
'NS 1'
,
'NS2'
=>
'NS 2'
,
'EMAIL'
=>
'Email'
,
'DKIM'
=>
'DKIM'
,
'DNSSEC'
=>
'DNSSEC'
);
}
$form
[
"tabs"
][
'template'
]
=
array
(
'title'
=>
"DNS Template"
,
'width'
=>
100
,
...
...
@@ -74,7 +84,7 @@ $form["tabs"]['template'] = array (
'formtype'
=>
'CHECKBOXARRAY'
,
'default'
=>
''
,
'separator'
=>
','
,
'value'
=>
array
(
'DOMAIN'
=>
'Domain'
,
'IP'
=>
'IP Address'
,
'IPV6'
=>
'IPv6 Address'
,
'NS1'
=>
'NS 1'
,
'NS2'
=>
'NS 2'
,
'EMAIL'
=>
'Email'
,
'DKIM'
=>
'DKIM'
,
'DNSSEC'
=>
'DNSSEC'
)
,
'value'
=>
$field_values
,
'validators'
=>
array
(
0
=>
array
(
'type'
=>
'CUSTOM'
,
'class'
=>
'validate_dkim'
,
'function'
=>
'check_template'
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment