From 28cd07d1a75c4e9dcaecac49efee0091f2fc62fa Mon Sep 17 00:00:00 2001
From: A. Täffner <darkalex@firesplash.de>
Date: Thu, 07 Apr 2016 05:30:49 -0400
Subject: [PATCH] Implemented a checkbox "enable DNSSEC" in DNS-Wizard. This Checkbox can be enabled or disabled by template.
---
server/plugins-available/network_settings_plugin.inc.php | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/server/plugins-available/network_settings_plugin.inc.php b/server/plugins-available/network_settings_plugin.inc.php
index 46242d9..5ce6f93 100644
--- a/server/plugins-available/network_settings_plugin.inc.php
+++ b/server/plugins-available/network_settings_plugin.inc.php
@@ -101,7 +101,7 @@
$network_tpl->setVar('broadcast', $this->broadcast($server_config['ip_address'], $server_config['netmask']));
$network_tpl->setVar('network', $this->network($server_config['ip_address'], $server_config['netmask']));
- $records = $app->db->queryAllRecords("SELECT ip_address FROM server_ip WHERE server_id = ".intval($conf['server_id']) . ' ORDER BY server_ip_id ASC');
+ $records = $app->db->queryAllRecords("SELECT ip_address FROM server_ip WHERE server_id = ? ORDER BY server_ip_id ASC", $conf['server_id']);
$ip_records = array();
$additionl_ip_records = 0;
$n = 0;
@@ -110,7 +110,7 @@
/*
* don't insert the main-ip again!
*/
- if ($rec['ip_address'] != $server_config['ip_address'])
+ if ($rec['ip_address'] != $server_config['ip_address'] && filter_var($rec['ip_address'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV4))
{
$ip_records[$n] = array(
'id' => $n,
@@ -179,7 +179,7 @@
$network_tpl->setVar('gateway', $server_config['gateway']);
$network_tpl->setVar('broadcast', $this->broadcast($server_config['ip_address'], $server_config['netmask']));
- $records = $app->db->queryAllRecords("SELECT ip_address FROM server_ip WHERE server_id = ".intval($conf['server_id']) . " order by ip_address");
+ $records = $app->db->queryAllRecords("SELECT ip_address FROM server_ip WHERE server_id = ? order by ip_address", $conf['server_id']);
$ip_records = array();
$additionl_ip_records = 0;
$n = 0;
@@ -188,7 +188,7 @@
/*
* don't insert the main-ip again!
*/
- if ($rec['ip_address'] != $server_config['ip_address'])
+ if ($rec['ip_address'] != $server_config['ip_address'] && filter_var($rec['ip_address'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV4))
{
$ip_records[$n] = array(
'id' => $n,
--
Gitblit v1.9.1