Code

updated snapshot methods
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 14 Jun 2006 05:27:15 +0000 (05:27 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 14 Jun 2006 05:27:15 +0000 (05:27 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3803 594d385d-05f5-0310-b6e9-bd551577e9d8

include/class_plugin.inc

index dda58a731aba9b18f6921aae455172fdeb7c8187..42cb0a8ae3aac99c16a7391d6a5791c686facf4a 100644 (file)
@@ -1165,10 +1165,10 @@ class plugin
     $ui = get_userinfo();
     $tmp = array();
     $ldap_to->cd($new_base);
-    $ldap_to->ls("(&(objectClass=gosaSnapshotObject))",$new_base,array("gosaSnapshotType","gosaSnapshotTimestamp","gosaSnapshotDN","description"));
+    $ldap_to->ls("(objectClass=gosaSnapshotObject)",$new_base,array("gosaSnapshotType","gosaSnapshotTimestamp","gosaSnapshotDN","description"));
     while($entry = $ldap_to->fetch()){
 
-      $chk =  str_replace($base,"",$entry['gosaSnapshotDN'][0]);
+      $chk =  str_replace($new_base,"",$entry['dn']);
       if(preg_match("/,ou=/",$chk)) continue;
 
       if(!isset($entry['description'][0])){
@@ -1236,7 +1236,7 @@ class plugin
   }
 
 
-  function showSnapshotDialog($base,$baseSuffix)
+  function showSnapshotDialog($base,$baseSuffixe)
   {
     $once = true;
     foreach($_POST as $name => $value){
@@ -1261,8 +1261,7 @@ class plugin
       /* Restore one of the already deleted objects */
       if(preg_match("/^RestoreDeletedSnapShot_/",$name) && $once){
         $once = false;
-        $entry = $baseSuffix.$base;
-        $this->snapDialog = new SnapShotDialog($this->config,$entry,$this);
+        $this->snapDialog = new SnapShotDialog($this->config,$baseSuffixe,$this);
         $this->snapDialog->Restore      = true;
         $this->snapDialog->DeletedOnes  = true;
       }