From 9a30ecdaed450020a055c06a59b9859f0a4928a3 Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Sun, 16 Feb 2014 08:25:03 +0100
Subject: [PATCH] Fixed: FS#2737 - Check xfer regex on dns slave zones and add
 the one of the primary zones Changed cron_daily.php to avoid some php
 notices.

---
 interface/web/dns/form/dns_slave.tform.php | 5 +++++
 server/cron_daily.php                      | 8 ++++----
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/interface/web/dns/form/dns_slave.tform.php b/interface/web/dns/form/dns_slave.tform.php
index 0e4eedd587..a416aed8b4 100644
--- a/interface/web/dns/form/dns_slave.tform.php
+++ b/interface/web/dns/form/dns_slave.tform.php
@@ -121,6 +121,11 @@ $form["tabs"]['dns_slave'] = array (
 		'xfer' => array (
 			'datatype'      => 'VARCHAR',
 			'formtype'      => 'TEXT',
+			'validators' => array (  0 => array ( 'type' => 'ISIP',
+					'allowempty' => 'y',
+					'separator' => ',',
+					'errmsg'=> 'xfer_error_regex'),
+			),
 			'default'       => '',
 			'value'         => '',
 			'width'         => '30',
diff --git a/server/cron_daily.php b/server/cron_daily.php
index f497e17dc2..9ffd390d1d 100644
--- a/server/cron_daily.php
+++ b/server/cron_daily.php
@@ -808,10 +808,10 @@ if ($app->dbmaster == $app->db) {
 			$domain = $rec['domain'];
 
 			$username = $rec['system_user'];
-			$rec['used'] = $monitor_data['user'][$username]['used'];
-			$rec['soft'] = $monitor_data['user'][$username]['soft'];
-			$rec['hard'] = $monitor_data['user'][$username]['hard'];
-			$rec['files'] = $monitor_data['user'][$username]['files'];
+			$rec['used'] = @$monitor_data['user'][$username]['used'];
+			$rec['soft'] = @$monitor_data['user'][$username]['soft'];
+			$rec['hard'] = @$monitor_data['user'][$username]['hard'];
+			$rec['files'] = @$monitor_data['user'][$username]['files'];
 
 			if (!is_numeric($rec['used'])){
 				if ($rec['used'][0] > $rec['used'][1]){
-- 
GitLab