From b6531026ea7bc102ac7a487bf6d534f3080fbe23 Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 8 Feb 2006 07:18:13 +0000 Subject: [PATCH] Added lowercase check for all record types git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2638 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/systems/class_termDNS.inc | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/plugins/admin/systems/class_termDNS.inc b/plugins/admin/systems/class_termDNS.inc index 1d1ea145c..2a2e7df25 100644 --- a/plugins/admin/systems/class_termDNS.inc +++ b/plugins/admin/systems/class_termDNS.inc @@ -256,10 +256,19 @@ class termDNS extends plugin $message[]=(_("The given macaddress is invalid. There must be 6 1byte segments seperated by ':'.")); } + /* only perfrom this checks if this is a valid DNS account */ if($this->DNS_is_account){ foreach($this->types as $name => $values){ + + /* Check if there is an aRecord defined which uses the same IP as used in IPhostAddress */ if(($values['type'] == "aRecord")&&($values['value'] == $this->ipHostNumber)&&($values['status']!="deleted")){ - $message[]=sprintf(_("The device IP '%s' is added as 'A Record', this will be done automatically, please remove the record."),$this->ipHostNumber); + $message[]=sprintf(_("The device IP '%s' is added as 'A Record', this will be done automatically, please remove the record."), + $this->ipHostNumber); + } + + /* only lower-case is allowed in record entries ... */ + if($values['value'] != strtolower($values['value'])){ + $message[] = sprintf(_("Only lowercase is allowed, please check your '%ss'."),$values['type']); } } } @@ -342,7 +351,8 @@ class termDNS extends plugin } - + /* Create html table with all used record types + */ function generateRecordsList($changeStateForRecords) { $changeStateForRecords = ""; @@ -376,6 +386,7 @@ class termDNS extends plugin return($str); } + /* Create a html select box which allows us to select different types of records */ function generateRecordListBox($selected,$name) { $str = "