summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1c7288f)
raw | patch | inline | side by side (parent: 1c7288f)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 9 Oct 2008 11:40:10 +0000 (11:40 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 9 Oct 2008 11:40:10 +0000 (11:40 +0000) |
-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
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12656 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/opsi/admin/opsi/class_opsi.inc | patch | blob | history |
diff --git a/gosa-plugins/opsi/admin/opsi/class_opsi.inc b/gosa-plugins/opsi/admin/opsi/class_opsi.inc
index d3d781175509422d92dac1eda95faf1abef41e14..d837fe34b8eabd1d6539bfa44d74713b405c0947 100644 (file)
$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);
}