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
61e08e76
Commit
61e08e76
authored
Oct 20, 2015
by
Florian Schaal
Browse files
openvz: free all ip-addresses if the vm was deleted
parent
1dbd0e35
Changes
1
Hide whitespace changes
Inline
Side-by-side
interface/lib/plugins/vm_openvz_plugin.inc.php
View file @
61e08e76
...
...
@@ -130,10 +130,12 @@ class vm_openvz_plugin {
global
$app
,
$conf
;
//* Free the IP address
$tmp
=
$app
->
db
->
queryOneRecord
(
"SELECT ip_address_id FROM openvz_ip WHERE vm_id = ?"
,
$page_form
->
id
);
$app
->
db
->
datalogUpdate
(
'openvz_ip'
,
array
(
'vm_id'
=>
0
),
'ip_address_id'
,
$tmp
[
'ip_address_id'
]);
$tmp_rec
=
$app
->
db
->
queryAllRecords
(
"SELECT ip_address_id FROM openvz_ip WHERE vm_id = ?"
,
$page_form
->
id
);
foreach
(
$tmp_rec
as
$tmp
)
{
$app
->
db
->
datalogUpdate
(
'openvz_ip'
,
array
(
'vm_id'
=>
0
),
'ip_address_id'
,
$tmp
[
'ip_address_id'
]);
}
unset
(
$tmp
);
unset
(
$tmp_rec
);
}
private
function
applyTemplate
()
{
...
...
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