Code

Works with php4 now
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 13 Jun 2006 07:51:56 +0000 (07:51 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 13 Jun 2006 07:51:56 +0000 (07:51 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3794 594d385d-05f5-0310-b6e9-bd551577e9d8

include/class_plugin.inc
plugins/admin/systems/class_systemManagement.inc

index b30cdcb1d67c5303fb3a6ed6b4dd3ece7e049f52..b87216703eba5c8f9dda884ff5f1290ad266f139 100644 (file)
@@ -1038,13 +1038,14 @@ class plugin
           an unused value. */ 
       $new_dn                           = "gosaSnapshotTimestamp=".$newName.",".$new_base;
       $ldap_to->cat($new_dn);
-      while($ldap->count()){
+      while($ldap_to->count()){
         $ldap_to->cat($new_dn);
         $newName = preg_replace("/\./", "", $sec."-".($usec++));
         $new_dn                           = "gosaSnapshotTimestamp=".$newName.",".$new_base;
         $target['gosaSnapshotTimestamp']  = $newName;
       } 
 
+
       /* Inset this new snapshot */
       $ldap_to->create_missing_trees($new_base);
       $ldap_to->cd($new_dn);
index b5cb920631d070859799237f6b500b4f08f58cf8..8b945d5519dc045325ee8a57bb7b7b1fc996eaa8 100644 (file)
@@ -537,7 +537,7 @@ class systems extends plugin
       /* Restore one of the already deleted objects */
       if(preg_match("/^RestoreDeletedSnapShot_/",$name) && $once){
         $once = false;
-        $entry = "ou=systems,".$this->selectedBase;  
+        $entry = "ou=systems,".$this->DivListSystem->selectedBase;  
         $this->systab = new SnapShotDialog($this->config,$entry,$this); 
         $this->systab->Restore      = true;
         $this->systab->DeletedOnes  = true;
@@ -554,8 +554,8 @@ class systems extends plugin
           print_red($msg);
         }
       }else{
-        $this->dn =  $this->parent->systab->dn;
-        $this->create_snapshot("snapshot",$this->parent->systab->CurrentDescription);
+        $this->dn =  $this->systab->dn;
+        $this->create_snapshot("snapshot",$this->systab->CurrentDescription);
         $this->systab = NULL;
       }
     }
@@ -565,8 +565,8 @@ class systems extends plugin
       $entry =trim($_POST['SnapShot']);
       if(!empty($entry)){
         $entry = base64_decode($entry);
-        $this->parent->restore_snapshot($entry);
-        $this->parent->systab = NULL;
+        $this->restore_snapshot($entry);
+        $this->systab = NULL;
       }
     }
   }