VM module: IP was not freed when VM is deleted.
VM module: Error in SQL query to select a template.
| | |
| | | $app->load('tform_actions'); |
| | | |
| | | class page_action extends tform_actions { |
| | | |
| | | function onAfterDelete() { |
| | | global $app, $conf; |
| | | |
| | | //* Release all IP addresses which are assigned to this VM |
| | | $app->db->query("UPDATE openvz_ip SET vm_id = 0 WHERE vm_id = '".$this->id."'"); |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | |
| | | } |
| | | |
| | | function onAfterDelete() { |
| | | global $app, $conf; |
| | | |
| | | //* Release all IP addresses which are assigned to this VM |
| | | $app->db->query("UPDATE openvz_ip SET vm_id = 0 WHERE vm_id = '".$this->id."'"); |
| | | |
| | | } |
| | | |
| | | function applyTemplate() { |
| | | global $app, $conf; |
| | | |
| | |
| | | return; |
| | | } |
| | | |
| | | $tmp = $app->db->queryOneRecord("SELECT template_file FROM openvz_ostemplate WHERE ostemplate_id = ".$vm['ostemplate_id']); |
| | | $tmp = $app->db->queryOneRecord("SELECT template_file FROM openvz_ostemplate WHERE ostemplate_id = ".$data['new']['ostemplate_id']); |
| | | $ostemplate = escapeshellcmd($tmp['template_file']); |
| | | unset($tmp); |
| | | |