From 1db651a1fb584db04b5dd580c3854c0e29890ca6 Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 9 Oct 2008 11:40:10 +0000 Subject: [PATCH] Updated opsi -Do not display [] in system mangement if description is empty. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12656 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-plugins/opsi/admin/opsi/class_opsi.inc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gosa-plugins/opsi/admin/opsi/class_opsi.inc b/gosa-plugins/opsi/admin/opsi/class_opsi.inc index d3d781175..d837fe34b 100644 --- a/gosa-plugins/opsi/admin/opsi/class_opsi.inc +++ b/gosa-plugins/opsi/admin/opsi/class_opsi.inc @@ -91,13 +91,17 @@ class opsi extends gosaSupportDaemon $data = array(); foreach($res as $entry){ if(!isset($entry['MAC'][0]['VALUE'])) $entry['MAC'][0]['VALUE'] = ""; - $data[] = array( + $obj = array( "dn" => "opsi:=".$entry['NAME'][0]['VALUE'].",".get_ou("sambaMachineAccountRDN").$this->config->current['BASE'], "objectClass" => array("gosa_opsi_client"), "cn" => array(0 => $entry['NAME'][0]['VALUE']), - "description" => array(0 => $entry['DESCRIPTION'][0]['VALUE']), "macAddress" => array(0 => $entry['MAC'][0]['VALUE']), "opsi_notes" => array(0 => $entry['NOTES'][0]['VALUE'])); + + if(!empty($entry['DESCRIPTION'][0]['VALUE'])){ + $obj["description"] =$entry['DESCRIPTION'][0]['VALUE']; + } + $data[] = $obj; } return($data); } -- 2.30.2