Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
ISPConfig 3
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lolo888
ISPConfig 3
Commits
f601d97d
Commit
f601d97d
authored
Sep 12, 2012
by
mcramer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bugfix: Domain module check can only be applied if tab is "domain"
parent
180f2b99
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
15 deletions
+17
-15
interface/web/sites/web_domain_edit.php
interface/web/sites/web_domain_edit.php
+17
-15
No files found.
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
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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