From 8cac6468c111cca9c3e43b93661057feb015c91a Mon Sep 17 00:00:00 2001 From: cajus Date: Wed, 28 Oct 2009 15:30:50 +0000 Subject: [PATCH] Added getType() git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14673 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/class_listing.inc | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/gosa-core/include/class_listing.inc b/gosa-core/include/class_listing.inc index d1436fce5..1fcc94ece 100644 --- a/gosa-core/include/class_listing.inc +++ b/gosa-core/include/class_listing.inc @@ -45,6 +45,7 @@ class listing { var $pid; var $objectTypes= array(); var $objectTypeCount= array(); + var $objectDnMapping= array(); var $copyPasteHandler= null; var $snapshotHandler= null; var $exporter= array(); @@ -438,8 +439,9 @@ class listing { global $config; $ui= get_userinfo(); - // Reset object counter + // Reset object counter / DN mapping $this->objectTypeCount= array(); + $this->objectDnMapping= array(); // Do not do anything if this is not our PID if(isset($_REQUEST['PID']) && $_REQUEST['PID'] != $this->pid) { @@ -751,12 +753,14 @@ class listing { $objectType= $this->getObjectType($this->objectTypes, $classes); if ($objectType) { + $this->objectDnMapping[$dn]= $objectType["objectClass"]; $result= ""; if (!isset($this->objectTypeCount[$objectType['label']])) { $this->objectTypeCount[$objectType['label']]= 0; } $this->objectTypeCount[$objectType['label']]++; } + return $result; } @@ -1448,6 +1452,15 @@ class listing { return $result; } + + function getType($dn) + { + if (isset($this->objectDnMapping[$dn])) { + return $this->objectDnMapping[$dn]; + } + return null; + } + } ?> -- 2.30.2