Code

Updated netatalk plugin closes #1105
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 19 Nov 2010 09:36:29 +0000 (09:36 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 19 Nov 2010 09:36:29 +0000 (09:36 +0000)
-Thanks to 'cs'

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20282 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/netatalk/personal/netatalk/class_netatalk.inc

index 762c68fdbfd23d467b83c4df7dc388ec8b7cd9ce..8620a262f1424e874672e28fe8bebfb002b620cf 100644 (file)
@@ -114,14 +114,7 @@ class netatalk extends plugin {
     /* Get netatalk shares */
     $this->shares = array();
     $ldap = $this->config->get_ldap_link();
-
-    if($this->dn === "new" || $this->dn === NULL) {
-      $base  = session::get('CurrentMainBase');
-    } else {
-      $base = preg_replace("/^[^,]+,".preg_quote(get_people_ou(), '/')."/i","",$this->dn);
-    }
-
-    $ldap->cd($base);
+    $ldap->cd($this->config->current['BASE']);
     $ldap->search ("(&(objectClass=mount)(|(mountType=url)(mountType=nfs))(cn=*))");
 
     while ($attrs = $ldap->fetch()){
@@ -250,7 +243,7 @@ class netatalk extends plugin {
       if($mountType=="url") {
         $this->apple_user_homeurl_xml = '<home_dir><url>afp://'.$host.$dir . '</url><path>'.
           $this->apple_user_homepath_raw.'</path></home_dir>';
-        $this->apple_user_homeurl = base64_encode($this->apple_user_homeurl_xml);
+        $this->apple_user_homeurl = $this->apple_user_homeurl_xml;
       } else {
         $this->apple_user_homeurl = "";
       }