Code

Use get_list to fetch all gotoShare objects, else gosaUnitTag will be ignored
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 18 Jul 2006 11:51:30 +0000 (11:51 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 18 Jul 2006 11:51:30 +0000 (11:51 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4205 594d385d-05f5-0310-b6e9-bd551577e9d8

include/class_config.inc

index 09024297c925fc72e4067c924fd6821d33f0a755..473319751d283abd023c7546e5177cd5228864a6 100644 (file)
@@ -666,10 +666,12 @@ class config  {
   /* This function returns all available ShareServer */
   function getShareServerList()
   {
-    $ldap= $this->get_ldap_link();
-    $a_res = $ldap->search("(&(objectClass=goShareServer)(goExportEntry=*))",array("goExportEntry","cn"));
-    $return= array();
-    while($entry = $ldap->fetch($a_res)){
+    global $config;
+    $return = array();
+    $ui = get_userinfo();
+    $base = $config->current['BASE'];
+    $res = get_list("(&(objectClass=goShareServer)(goExportEntry=*))",$ui->subtreeACL,$base,array("goExportEntry","cn"),GL_SUBSEARCH);
+    foreach($res as $entry){
       if(isset($entry['goExportEntry']['count'])){
         unset($entry['goExportEntry']['count']);
       }
@@ -678,6 +680,7 @@ class config  {
         $sharename = $a_share[0];
         $return[$entry['cn'][0]."|".$sharename] = $entry['cn'][0]." [".$sharename."]";
       }
+
     }
     return($return);
   }