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
ISPConfig
ISPConfig 3
Commits
6a596ea1
Commit
6a596ea1
authored
Aug 10, 2017
by
Marius Burkard
Browse files
- fixed parent domain not reset on databases when it is deleted, fixes
#4760
parent
1083ffcd
Changes
2
Hide whitespace changes
Inline
Side-by-side
install/sql/incremental/upd_dev_collection.sql
View file @
6a596ea1
...
...
@@ -17,4 +17,5 @@ CHANGE `warnbadhrecip` `warnbadhrecip` ENUM('N','Y') CHARACTER SET utf8 COLLATE
ALTER
TABLE
`dns_rr`
CHANGE
`data`
`data`
TEXT
NOT
NULL
;
ALTER
TABLE
`web_database`
CHANGE
`database_quota`
`database_quota`
INT
(
11
)
NULL
DEFAULT
NULL
;
ALTER
TABLE
`web_domain`
ADD
`log_retention`
INT
NOT
NULL
DEFAULT
'30'
;
ALTER
TABLE
spamfilter_policy
CHANGE
spam_tag_level
spam_tag_level
DECIMAL
(
5
,
2
)
NULL
DEFAULT
NULL
,
CHANGE
spam_tag2_level
spam_tag2_level
DECIMAL
(
5
,
2
)
NULL
DEFAULT
NULL
,
CHANGE
spam_kill_level
spam_kill_level
DECIMAL
(
5
,
2
)
NULL
DEFAULT
NULL
,
CHANGE
spam_dsn_cutoff_level
spam_dsn_cutoff_level
DECIMAL
(
5
,
2
)
NULL
DEFAULT
NULL
,
CHANGE
spam_quarantine_cutoff_level
spam_quarantine_cutoff_level
DECIMAL
(
5
,
2
)
NULL
DEFAULT
NULL
;
\ No newline at end of file
ALTER
TABLE
spamfilter_policy
CHANGE
spam_tag_level
spam_tag_level
DECIMAL
(
5
,
2
)
NULL
DEFAULT
NULL
,
CHANGE
spam_tag2_level
spam_tag2_level
DECIMAL
(
5
,
2
)
NULL
DEFAULT
NULL
,
CHANGE
spam_kill_level
spam_kill_level
DECIMAL
(
5
,
2
)
NULL
DEFAULT
NULL
,
CHANGE
spam_dsn_cutoff_level
spam_dsn_cutoff_level
DECIMAL
(
5
,
2
)
NULL
DEFAULT
NULL
,
CHANGE
spam_quarantine_cutoff_level
spam_quarantine_cutoff_level
DECIMAL
(
5
,
2
)
NULL
DEFAULT
NULL
;
UPDATE
`web_database`
as
d
LEFT
JOIN
`web_domain`
as
w
ON
(
w
.
domain_id
=
d
.
parent_domain_id
)
SET
d
.
parent_domain_id
=
0
WHERE
w
.
domain_id
IS
NULL
AND
d
.
parent_domain_id
!=
0
;
\ No newline at end of file
interface/web/sites/web_vhost_domain_del.php
View file @
6a596ea1
...
...
@@ -120,8 +120,14 @@ class page_action extends tform_actions {
}
}
}
//* Remove parent_domain_id from databases
$records
=
$app
->
db
->
queryAllRecords
(
"SELECT database_id FROM web_database WHERE parent_domain_id = ?"
,
$this
->
id
);
foreach
(
$records
as
$rec
)
{
$app
->
db
->
datalogUpdate
(
'web_database'
,
array
(
'parent_domain_id'
=>
0
),
'database_id'
,
$rec
[
'database_id'
]);
}
}
//* Delete all web folders
$records
=
$app
->
db
->
queryAllRecords
(
"SELECT web_folder_id FROM web_folder WHERE parent_domain_id = ?"
,
$this
->
id
);
foreach
(
$records
as
$rec
)
{
...
...
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