From d8faa4e7e3fb74e554f6c9339f6fe4e2883c3bf1 Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Fri, 18 Sep 2015 13:43:03 -0400
Subject: [PATCH] Fix by dirkd: Since file() doesn't remove "\n" from the lines read the condition $lines[$l] == '' never evaluated to true. So $mailHeaders would always contain every line from the template while $mailBody contained none of them.
---
interface/web/vm/openvz_vm_edit.php | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/interface/web/vm/openvz_vm_edit.php b/interface/web/vm/openvz_vm_edit.php
index 07f6aaa..0db2053 100644
--- a/interface/web/vm/openvz_vm_edit.php
+++ b/interface/web/vm/openvz_vm_edit.php
@@ -178,6 +178,19 @@
$app->tpl->setVar("ip_address", $ip_select);
unset($tmp);
unset($ips);
+
+ //* Additional IPs
+ $sql="SELECT * FROM openvz_ip WHERE reserved = 'n' AND ((vm_id = ? AND additional='y') OR vm_id = 0) AND server_id = ?";
+ $additional_ips = $app->db->queryAllRecords($sql, $this->id, $vm_server_id);
+ foreach ($additional_ips as $idx => $rec) {
+ $temp .= "<input type='hidden' id='id".$idx."' name='additional_ip[".$idx."]' name='additional_ip[".$idx."]' value='0'>";
+ $used = @($rec['additional']=='y')?'CHECKED':'';
+ $temp .= "<input type='checkbox' value='".$rec['ip_address']."' id='id".$idx."' name='additional_ip[".$idx."]' ".$used."> ".$rec['ip_address']."<br>";
+ }
+ $app->tpl->setVar("additional_ip", $temp);
+ unset($used);
+ unset($temp);
+ unset($additional_ips);
if($this->id > 0) {
//* we are editing a existing record
--
Gitblit v1.9.1