From 77fec97b6c404fb2e233516713abe8a071d5a7b4 Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 9 Oct 2008 05:50:27 +0000 Subject: [PATCH] Updated gotoLpdEnable -Do not write Serial attributes when type is non serial git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12635 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../goto/admin/systems/goto/class_gotoLpdEnabled.inc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gosa-plugins/goto/admin/systems/goto/class_gotoLpdEnabled.inc b/gosa-plugins/goto/admin/systems/goto/class_gotoLpdEnabled.inc index f3848c291..62c188106 100644 --- a/gosa-plugins/goto/admin/systems/goto/class_gotoLpdEnabled.inc +++ b/gosa-plugins/goto/admin/systems/goto/class_gotoLpdEnabled.inc @@ -273,11 +273,16 @@ class gotoLpdEnable extends plugin public function save() { $ret = array(); + $serial_only = array("s_Speed","s_FlowControl","s_Parity","i_Bit"); $attrs = array("s_Type","s_Device","i_Port","s_Speed","s_FlowControl","s_Parity","i_Bit","s_WriteOnly","s_Options"); foreach($this->data as $entry){ $str = ""; foreach($attrs as $attr){ - $str .= $entry[$attr].":"; + if(in_array($attr,$serial_only) && $entry['s_Type'] != "Serial"){ + $str .= ":"; + }else{ + $str .= $entry[$attr].":"; + } } $ret[] = preg_replace("/:$/","",$str); } -- 2.30.2