From: hickert Date: Tue, 13 Jun 2006 07:51:56 +0000 (+0000) Subject: Works with php4 now X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=b8c7c7952cebe1c34199935d99064b2377508d48;p=gosa.git Works with php4 now git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3794 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/include/class_plugin.inc b/include/class_plugin.inc index b30cdcb1d..b87216703 100644 --- a/include/class_plugin.inc +++ b/include/class_plugin.inc @@ -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); diff --git a/plugins/admin/systems/class_systemManagement.inc b/plugins/admin/systems/class_systemManagement.inc index b5cb92063..8b945d551 100644 --- a/plugins/admin/systems/class_systemManagement.inc +++ b/plugins/admin/systems/class_systemManagement.inc @@ -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; } } }