Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Register
Sign in
Toggle navigation
Menu
Open sidebar
Zvonimir
ISPConfig 3
Commits
f601d97d
Commit
f601d97d
authored
Sep 12, 2012
by
mcramer
Browse files
Bugfix: Domain module check can only be applied if tab is "domain"
parent
180f2b99
Changes
1
Hide whitespace changes
Inline
Side-by-side
interface/web/sites/web_domain_edit.php
View file @
f601d97d
...
...
@@ -459,21 +459,23 @@ class page_action extends tform_actions {
global
$app
,
$conf
;
/* check if the domain module is used - and check if the selected domain can be used! */
$app
->
uses
(
'ini_parser,getconf'
);
$settings
=
$app
->
getconf
->
get_global_config
(
'domains'
);
if
(
$settings
[
'use_domain_module'
]
==
'y'
)
{
$client_group_id
=
intval
(
$_SESSION
[
"s"
][
"user"
][
"default_group"
]);
$sql
=
"SELECT domain_id, domain FROM domain WHERE domain_id = "
.
intval
(
$this
->
dataRecord
[
'domain'
]);
if
(
$_SESSION
[
"s"
][
"user"
][
"typ"
]
!=
'admin'
)
{
$sql
.
=
"AND sys_groupid ="
.
$client_group_id
;
}
$domain_check
=
$app
->
db
->
queryOneRecord
(
$sql
);
if
(
!
$domain_check
)
{
// invalid domain selected
$app
->
tform
->
errorMessage
.
=
$app
->
tform
->
lng
(
"domain_error_empty"
)
.
"<br />"
;
}
else
{
$this
->
dataRecord
[
'domain'
]
=
$domain_check
[
'domain'
];
if
(
$app
->
tform
->
getCurrentTab
()
==
'domain'
)
{
$app
->
uses
(
'ini_parser,getconf'
);
$settings
=
$app
->
getconf
->
get_global_config
(
'domains'
);
if
(
$settings
[
'use_domain_module'
]
==
'y'
)
{
$client_group_id
=
intval
(
$_SESSION
[
"s"
][
"user"
][
"default_group"
]);
$sql
=
"SELECT domain_id, domain FROM domain WHERE domain_id = "
.
intval
(
$this
->
dataRecord
[
'domain'
]);
if
(
$_SESSION
[
"s"
][
"user"
][
"typ"
]
!=
'admin'
)
{
$sql
.
=
"AND sys_groupid ="
.
$client_group_id
;
}
$domain_check
=
$app
->
db
->
queryOneRecord
(
$sql
);
if
(
!
$domain_check
)
{
// invalid domain selected
$app
->
tform
->
errorMessage
.
=
$app
->
tform
->
lng
(
"domain_error_empty"
)
.
"<br />"
;
}
else
{
$this
->
dataRecord
[
'domain'
]
=
$domain_check
[
'domain'
];
}
}
}
...
...
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