Code

Updated creation of ldif entries
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 29 Jul 2010 07:51:51 +0000 (07:51 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 29 Jul 2010 07:51:51 +0000 (07:51 +0000)
-Use new method export method which is based on shell execution

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

gosa-core/include/class_SnapshotHandler.inc
gosa-core/include/class_ldapMultiplexer.inc
gosa-core/include/class_plugin.inc

index d371db5fcdd3d0b142a28ac27612722598b8abf1..e38a9d1d9bac2164726825c9424c6a214e3ce8e7 100644 (file)
@@ -296,8 +296,9 @@ class SnapshotHandler {
       $new_base       = preg_replace("/".preg_quote($base, '/')."$/","",$base_of_object).$snap_base;
 
       /* Create object */
-#$data             = preg_replace('/^dn:.*\n/', '', $ldap->gen_ldif($dn,"(!(objectClass=gosaDepartment))"));
-      $data             = $ldap->gen_ldif($dn,"(&(!(objectClass=gosaDepartment))(!(objectClass=FAIclass)))");
+      $data             = $ldap->generateLdif(LDAP::fix($dn),
+              "(&(!(objectClass=gosaDepartment))(!(objectClass=FAIclass)))",array(),'base');
+
       $newName          = str_replace(".", "", $sec."-".$usec);
       $target= array();
       $target['objectClass']            = array("top", "gosaSnapshotObject");
index f201cae291be46a27efae382574c772d46a6f3dc..fbd6d91b47d47168cfb579ecd57596f8ebde0b66 100644 (file)
@@ -39,7 +39,7 @@ class ldapMultiplexer {
  
   public function __call($methodName, $parameters) {
     /* Add resource pointer if the mentioned methods are used */
-    if (preg_match('/^(search|ls|cat|fetch|clearResult|resetResult|count|getDN|recursive_remove|rmdir_recursive|gen_xls|gen_ldif|create_missing_trees|import_single_entry|import_complete_ldif)$/', $methodName)){
+    if (preg_match('/^(search|ls|cat|fetch|clearResult|resetResult|count|getDN|recursive_remove|rmdir_recursive|gen_xls|create_missing_trees|import_single_entry|import_complete_ldif)$/', $methodName)){
       array_unshift($parameters, $this->sr);
     }
 
index a728b97f008cdead207c52cb6df57c764f10cd76..f089bc5279bc0df09bd97ca52d4ea1fd144b20ec 100644 (file)
@@ -1457,8 +1457,9 @@ class plugin
       $new_base       = preg_replace("/".preg_quote($base, '/')."$/","",$base_of_object).$snap_base;
 
       /* Create object */
-#$data             = preg_replace('/^dn:.*\n/', '', $ldap->gen_ldif($this->dn,"(!(objectClass=gosaDepartment))"));
-      $data             = $ldap->gen_ldif($this->dn,"(&(!(objectClass=gosaDepartment))(!(objectClass=FAIclass)))");
+      $data             = $ldap->generateLdif(LDAP::fix($dn),
+              "(&(!(objectClass=gosaDepartment))(!(objectClass=FAIclass)))",array(),'base');
+
       $newName          = str_replace(".", "", $sec."-".$usec);
       $target= array();
       $target['objectClass']            = array("top", "gosaSnapshotObject");