summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2c88ef8)
raw | patch | inline | side by side (parent: 2c88ef8)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 13 Jun 2006 07:43:01 +0000 (07:43 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 13 Jun 2006 07:43:01 +0000 (07:43 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3793 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/systems/class_divListSystem.inc | patch | blob | history | |
plugins/admin/systems/class_systemManagement.inc | patch | blob | history |
diff --git a/plugins/admin/systems/class_divListSystem.inc b/plugins/admin/systems/class_divListSystem.inc
index fd43f1cb3b1d6fef00148c0c8d67208c468c99ec..7b0097267bcc4bb8fda4cfb153c77909a50ad70b 100644 (file)
MultiSelectWindow :: save_object();
- /* check for posts */
- $once = true;
- foreach($_POST as $name => $value){
-
- /* Create a new snapshot, display a dialog */
- if(preg_match("/^CreateSnapShot_/",$name) && $once){
- $once = false;
- $entry = preg_replace("/^CreateSnapShot_/","",$name);
- $entry = base64_decode(preg_replace("/_[xy]$/","",$entry));
- $this->parent->systab = new SnapShotDialog($this->config,$entry,$this->parent);
- }
-
- /* Restore a snapshot, display a dialog with all snapshots of the current object */
- if(preg_match("/^RestoreSnapShot_/",$name) && $once){
- $once = false;
- $entry = preg_replace("/^RestoreSnapShot_/","",$name);
- $entry = base64_decode(preg_replace("/_[xy]$/","",$entry));
- $this->parent->systab = new SnapShotDialog($this->config,$entry,$this->parent);
- $this->parent->systab->Restore = true;
- }
-
- /* Restore one of the already deleted objects */
- if(preg_match("/^RestoreDeletedSnapShot_/",$name) && $once){
- $once = false;
- $entry = "ou=systems,".$this->selectedBase;
- $this->parent->systab = new SnapShotDialog($this->config,$entry,$this->parent);
- $this->parent->systab->Restore = true;
- $this->parent->systab->DeletedOnes = true;
- }
- }
-
- /* Create a new snapshot requested, check
- the given attributes and create the snapshot*/
- if(isset($_POST['CreateSnapshot'])){
- $this->parent->systab->save_object();
- $msgs = $this->parent->systab->check();
- if(count($msgs)){
- foreach($msgs as $msg){
- print_red($msg);
- }
- }else{
- $this->parent->dn = $this->parent->systab->dn;
- $this->parent->create_snapshot("snapshot",$this->parent->systab->CurrentDescription);
- $this->parent->systab = NULL;
- }
- }
-
- /* Restore is requested, restore the object with the posted dn .*/
- if((isset($_POST['RestoreSnapshot'])) && (isset($_POST['SnapShot']))){
- $entry =trim($_POST['SnapShot']);
- if(!empty($entry)){
- $entry = base64_decode($entry);
- $this->parent->restore_snapshot($entry);
- $this->parent->systab = NULL;
- }
- }
}
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
diff --git a/plugins/admin/systems/class_systemManagement.inc b/plugins/admin/systems/class_systemManagement.inc
index 697ec135c4cd400774d972ea7f4176d571ee9596..b5cb920631d070859799237f6b500b4f08f58cf8 100644 (file)
function save_object()
{
$this->DivListSystem->save_object();
+ /* check for posts */
+ $once = true;
+ foreach($_POST as $name => $value){
+
+ /* Create a new snapshot, display a dialog */
+ if(preg_match("/^CreateSnapShot_/",$name) && $once){
+ $once = false;
+ $entry = preg_replace("/^CreateSnapShot_/","",$name);
+ $entry = base64_decode(preg_replace("/_[xy]$/","",$entry));
+ $this->systab = new SnapShotDialog($this->config,$entry,$this);
+ }
+
+ /* Restore a snapshot, display a dialog with all snapshots of the current object */
+ if(preg_match("/^RestoreSnapShot_/",$name) && $once){
+ $once = false;
+ $entry = preg_replace("/^RestoreSnapShot_/","",$name);
+ $entry = base64_decode(preg_replace("/_[xy]$/","",$entry));
+ $this->systab = new SnapShotDialog($this->config,$entry,$this);
+ $this->systab->Restore = true;
+ }
+
+ /* Restore one of the already deleted objects */
+ if(preg_match("/^RestoreDeletedSnapShot_/",$name) && $once){
+ $once = false;
+ $entry = "ou=systems,".$this->selectedBase;
+ $this->systab = new SnapShotDialog($this->config,$entry,$this);
+ $this->systab->Restore = true;
+ $this->systab->DeletedOnes = true;
+ }
+ }
+
+ /* Create a new snapshot requested, check
+ the given attributes and create the snapshot*/
+ if(isset($_POST['CreateSnapshot'])){
+ $this->systab->save_object();
+ $msgs = $this->systab->check();
+ if(count($msgs)){
+ foreach($msgs as $msg){
+ print_red($msg);
+ }
+ }else{
+ $this->dn = $this->parent->systab->dn;
+ $this->create_snapshot("snapshot",$this->parent->systab->CurrentDescription);
+ $this->systab = NULL;
+ }
+ }
+
+ /* Restore is requested, restore the object with the posted dn .*/
+ if((isset($_POST['RestoreSnapshot'])) && (isset($_POST['SnapShot']))){
+ $entry =trim($_POST['SnapShot']);
+ if(!empty($entry)){
+ $entry = base64_decode($entry);
+ $this->parent->restore_snapshot($entry);
+ $this->parent->systab = NULL;
+ }
+ }
}