diff --git a/plugins/admin/groups/class_groupManagement.inc b/plugins/admin/groups/class_groupManagement.inc
index 305fd6a9c82657f959ec9aabbd9b922856d9f7bc..2d2bc5248012c18dd0ae9282a4e354ab381505c7 100644 (file)
return ($display);
}
+
+ /* Check if there is a snapshot dialog open */
+ $base = $this->DivListGroup->selectedBase;
+ if($str = $this->showSnapshotDialog($base,$this->get_used_snapshot_bases())){
+ return($str);
+ }
+
/* Display dialog with group list */
$this->DivListGroup->parent = $this;
$this->DivListGroup->execute();
return($this->DivListGroup->Draw());
}
+
+ /* Return departments, that will be included within snapshot detection */
+ function get_used_snapshot_bases()
+ {
+ return(array(get_groups_ou().$this->DivListGroup->selectedBase));
+ }
+
+
+
function reload($CreatePosixsList=false)
{
$this->grouplist = array();
function save_object()
{
$this->DivListGroup->save_object();
- $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->grouptab = 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->grouptab = new SnapShotDialog($this->config,$entry,$this);
- $this->grouptab->Restore = true;
- }
-
- /* Restore one of the already deleted objects */
- if(preg_match("/^RestoreDeletedSnapShot_/",$name) && $once){
- $once = false;
- $entry = get_groups_ou().$this->DivListGroup->selectedBase;
- $this->grouptab = new SnapShotDialog($this->config,$entry,$this);
- $this->grouptab->Restore = true;
- $this->grouptab->DeletedOnes = true;
- }
- }
-
- /* Create a new snapshot requested, check
- the given attributes and create the snapshot*/
- if(isset($_POST['CreateSnapshot'])){
- $this->grouptab->save_object();
- $msgs = $this->grouptab->check();
- if(count($msgs)){
- foreach($msgs as $msg){
- print_red($msg);
- }
- }else{
- $this->dn = $this->grouptab->dn;
- $this->create_snapshot("snapshot",$this->grouptab->CurrentDescription);
- $this->grouptab = 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->restore_snapshot($entry);
- $this->grouptab = NULL;
- }
- }
}