Code

Updated faiSummary tab
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 10 Jul 2006 07:08:55 +0000 (07:08 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 10 Jul 2006 07:08:55 +0000 (07:08 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4057 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/fai/class_faiSummaryTab.inc

index 42783ab3662382fb50359698ed31fe324baa4cc3..12eaacdbaaf4ded28e2f1596ff967173afa08db9 100644 (file)
@@ -145,18 +145,10 @@ class faiSummaryTab extends plugin{
   /* returns an array with all possibly release types */
   function getBranches($base = false,$prefix = "")
   {
-    $ret = array("main"=>"/");
-    $ldap = $this->config->get_ldap_link();
-    $ldap->cd($this->config->current['BASE']);
-    $ldap->search("(objectClass=FAIbranch)",array("dn","cn","ou"));
-    while($attrs = $ldap->fetch()){
-      if((isset($attrs['ou']))&&($attrs['dn']!=$base)){
-        $name = convert_department_dn(preg_replace("/,ou=fai,.*$/","",$attrs['dn']));
-        $ret[$attrs['dn']] = $name;
-        $ret = array_merge($ret,$this->getBranches($attrs['dn'],$prefix.$attrs['ou'][0]."/"));
-      }
+    if(!$base){
+      $base = $this->config->current['BASE'];
     }
-    return($ret);
+    return(get_all_releases_from_base($base));
   }