From f7cd7b1547c01309218461e18cc6839f682e8a39 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 4 Sep 2007 12:07:35 +0000 Subject: [PATCH] Updated zone editor git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7210 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../systems/class_servDNSeditZoneEntries.inc | 41 +++++++++---------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/plugins/admin/systems/class_servDNSeditZoneEntries.inc b/plugins/admin/systems/class_servDNSeditZoneEntries.inc index bcfa78c87..a485f8b11 100644 --- a/plugins/admin/systems/class_servDNSeditZoneEntries.inc +++ b/plugins/admin/systems/class_servDNSeditZoneEntries.inc @@ -64,6 +64,25 @@ class servDNSeditZoneEntries extends plugin plugin::execute(); + + /* Fill templating stuff */ + $smarty= get_smarty(); + $display= ""; + + $table = ""; + foreach($this->Devices as $key => $dev){ + $table .= $this->generateRecordConfigurationRow($key); + } + + $smarty->assign("disableDialog",$this->disableDialog); + $smarty->assign("table",$table);; + $display.= $smarty->fetch(get_template_path('servDNSeditZoneEntries.tpl', TRUE)); + return($display); + } + + + function save_object() + { /* Check posts for operations ... */ $once = true; @@ -122,28 +141,8 @@ class servDNSeditZoneEntries extends plugin $this->Devices[$Name]['RECORDS'][] = $tmp; } } - - - } - - /* Fill templating stuff */ - $smarty= get_smarty(); - $display= ""; - - $table = ""; - foreach($this->Devices as $key => $dev){ - $table .= $this->generateRecordConfigurationRow($key); } - $smarty->assign("disableDialog",$this->disableDialog); - $smarty->assign("table",$table);; - $display.= $smarty->fetch(get_template_path('servDNSeditZoneEntries.tpl', TRUE)); - return($display); - } - - - function save_object() - { /* Possible attributes posted */ foreach($_POST as $name => $value){ @@ -224,7 +223,7 @@ class servDNSeditZoneEntries extends plugin /* Checking entry name */ - if((!is_uid($DevName)) | (empty($DevName))){ + if(!preg_match("/^[a-z0-9_\.-]+$/i", $DevName) || (empty($DevName))){ $message[] = sprintf(_("Entry name '%s' contains invalid characters."), $DevName); } -- 2.30.2