From a86d1288cd4d1ffd5128fb3f85fe1d1e263fd8ac Mon Sep 17 00:00:00 2001 From: cajus Date: Wed, 7 May 2008 11:32:57 +0000 Subject: [PATCH] Added description git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10818 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../goto/admin/devices/class_deviceManagement.inc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gosa-plugins/goto/admin/devices/class_deviceManagement.inc b/gosa-plugins/goto/admin/devices/class_deviceManagement.inc index 6972caefa..01e68e74e 100644 --- a/gosa-plugins/goto/admin/devices/class_deviceManagement.inc +++ b/gosa-plugins/goto/admin/devices/class_deviceManagement.inc @@ -506,9 +506,15 @@ class deviceManagement extends plugin } /* Get results and create index */ - $res= get_sub_list($Filter,"devices",get_ou('deviceou'), $base, array("cn","description","dn","objectClass"), $Flags); + $res= get_sub_list($Filter,"devices",get_ou('deviceou'), $base, array("cn","gotoHotplugDevice","description","dn","objectClass"), $Flags); $tmp2 = array(); foreach ($res as $val){ + if (!isset($val['description']) && isset($val['gotoHotplugDevice'][0])) { + $dsc= preg_replace("/\|.*$/", "", $val['gotoHotplugDevice'][0]); + if ($dsc != ""){ + $val['description']= array("count" => 1, 0 => $dsc); + } + } $tmp2[strtolower($val['cn'][0]).$val['cn'][0].$val['dn']] = strtolower($val['cn'][0]).$val['cn'][0].$val['dn']; $tmp[strtolower($val['cn'][0]).$val['cn'][0].$val['dn']]=$val; } -- 2.30.2