Code

Fixed NFS server array
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 7 Jun 2006 14:23:01 +0000 (14:23 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 7 Jun 2006 14:23:01 +0000 (14:23 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3673 594d385d-05f5-0310-b6e9-bd551577e9d8

include/class_config.inc

index 88754e06908d1a0b259313bce8b353295fc34571..d1f47b457c6b9b33492561ea79a0fe81de9b7d09 100644 (file)
@@ -391,13 +391,15 @@ class config  {
     $ldap->search ("(&(objectClass=goShareServer)(goExportEntry=*))");
     while ($attrs= $ldap->fetch()){
       for ($i= 0; $i<$attrs["goExportEntry"]["count"]; $i++){
-        $path= preg_replace ("/\s.*$/", "", $attrs["goExportEntry"][$i]);
+        if(!preg_match('/^[^|]+\|[^|]+\|NFS\|.*$/', $attrs["goExportEntry"][$i])){
+          continue;
+        }
+        $path= preg_replace ("/^[^|]+\|[^|]+\|[^|]+\|[^|]+\|([^|]+).*$/", '\1', $attrs["goExportEntry"][$i]);
         $tmp[]= $attrs["cn"][0].":$path";
       }
     }
     $this->data['SERVERS']['NFS']= $tmp;
 
-
     /* Load Terminalservers */
     $ldap->cd ($this->current['BASE']);
     $ldap->search ("(objectClass=goTerminalServer)");