From d32eb66f55eb71cf131e7204c8142b74f8c1632d Mon Sep 17 00:00:00 2001
From: ftimme <ft@falkotimme.com>
Date: Sat, 08 Jun 2013 18:10:58 -0400
Subject: [PATCH] - Fixed FS#2950 - DNS: Empty TTL leads to zero TTL (should be empty to use the default instead).
---
server/plugins-available/bind_plugin.inc.php | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/server/plugins-available/bind_plugin.inc.php b/server/plugins-available/bind_plugin.inc.php
index e4f6e6c..fd7f516 100644
--- a/server/plugins-available/bind_plugin.inc.php
+++ b/server/plugins-available/bind_plugin.inc.php
@@ -103,6 +103,11 @@
$tpl->setVar($zone);
$records = $app->db->queryAllRecords("SELECT * FROM dns_rr WHERE zone = ".$zone['id']." AND active = 'Y'");
+ if(is_array($records) && !empty($records)){
+ for($i=0;$i<sizeof($records);$i++){
+ if($records[$i]['ttl'] == 0) $records[$i]['ttl'] = '';
+ }
+ }
$tpl->setLoop('zones',$records);
//TODO : change this when distribution information has been integrated into server record
--
Gitblit v1.9.1