From 4f1e6a27ed7712eceade6f17f66c54dc87db5ea9 Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Thu, 14 Aug 2014 02:39:50 -0400
Subject: [PATCH] FS#3601 - Stop creating .htaccess files for NginX sites

---
 server/plugins-available/bind_plugin.inc.php |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/server/plugins-available/bind_plugin.inc.php b/server/plugins-available/bind_plugin.inc.php
index 4823cf3..2f7f932 100644
--- a/server/plugins-available/bind_plugin.inc.php
+++ b/server/plugins-available/bind_plugin.inc.php
@@ -106,6 +106,11 @@
 			if(is_array($records) && !empty($records)){
 				for($i=0;$i<sizeof($records);$i++){
 					if($records[$i]['ttl'] == 0) $records[$i]['ttl'] = '';
+					if($records[$i]['name'] == '') $records[$i]['name'] = '@';
+					//* Split TXT records, if nescessary
+					if($records[$i]['type'] == 'TXT' && strlen($records[$i]['data']) > 255) {
+						$records[$i]['data'] = implode('" "',str_split( $records[$i]['data'], 255));
+					}
 				}
 			}
 			$tpl->setLoop('zones', $records);
@@ -156,8 +161,12 @@
 			if(is_file($filename.'.err')) unlink($filename.'.err');
 		}
 
-		//* Reload bind nameserver
-		$app->services->restartServiceDelayed('bind', 'reload');
+		//* Restart bind nameserver if update_acl is not empty, otherwise reload it
+		if($data['new']['update_acl'] != '') {
+			$app->services->restartServiceDelayed('bind', 'restart');
+		} else {
+			$app->services->restartServiceDelayed('bind', 'reload');
+		}
 
 	}
 

--
Gitblit v1.9.1