summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d13a538)
raw | patch | inline | side by side (parent: d13a538)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 9 Oct 2008 05:50:27 +0000 (05:50 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 9 Oct 2008 05:50:27 +0000 (05:50 +0000) |
-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
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12635 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/goto/admin/systems/goto/class_gotoLpdEnabled.inc | patch | blob | history |
diff --git a/gosa-plugins/goto/admin/systems/goto/class_gotoLpdEnabled.inc b/gosa-plugins/goto/admin/systems/goto/class_gotoLpdEnabled.inc
index f3848c291d06652ec6f90619d683a946d55f9d35..62c18810659359defe319b1e02541c5e1c1ba80a 100644 (file)
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);
}