From 402a95a272290c036a41d37ef61f792df419c344 Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 6 Nov 2009 07:25:57 +0000 Subject: [PATCH] Updated management class -Set parent in newly created tab and dialog objects. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14768 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/class_management.inc | 6 ++++++ gosa-core/include/class_tabs.inc | 2 ++ 2 files changed, 8 insertions(+) diff --git a/gosa-core/include/class_management.inc b/gosa-core/include/class_management.inc index 7e906d211..6a4675e50 100644 --- a/gosa-core/include/class_management.inc +++ b/gosa-core/include/class_management.inc @@ -312,6 +312,7 @@ class management $this->tabObject= new $tabClass($this->config,$this->config->data['TABS'][$tabType], $this->dn, $aclCategory); $this->tabObject->set_acl_base($this->dn); $this->tabObject->delete (); + $this->tabObject->parent = &$this; // Remove the lock for the current object. del_lock($this->dn); @@ -383,6 +384,7 @@ class management if(!empty($entry) && $this->ui->allow_snapshot_create($entry,$this->aclCategory)){ $this->dialogObject = new SnapShotDialog($this->config,$entry,$this); $this->dialogObject->aclCategories = array($this->aclCategory); + $this->dialogObject->parent = &$this; }else{ msg_dialog::display(_("Permission"),sprintf(_("You are not allowed to create a snapshot for %s."),$entry), @@ -463,6 +465,7 @@ class management $this->dialogObject->set_snapshot_bases($bases); $this->dialogObject->display_all_removed_objects = true; $this->dialogObject->display_restore_dialog = true; + $this->dialogObject->parent = &$this; }else{ msg_dialog::display(_("Permission"),sprintf(_("You are not allowed to restore a snapshot for %s."),$entry), ERROR_DIALOG); @@ -476,6 +479,7 @@ class management $this->dialogObject = new SnapShotDialog($this->config,$entry,$this); $this->dialogObject->set_snapshot_bases($bases); $this->dialogObject->display_restore_dialog = true; + $this->dialogObject->parent = &$this; }else{ msg_dialog::display(_("Permission"),sprintf(_("You are not allowed to restore a snapshot for %s."),$entry), ERROR_DIALOG); @@ -532,6 +536,7 @@ class management }else{ $this->tabObject= new $tabClass($this->config,$this->config->data['TABS'][$tabType], $this->dn, $aclCategory); $this->tabObject->set_acl_base($this->headpage->getBase()); + $this->tabObject->parent = &$this; @DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__,$this->dn,"Create new entry initiated!"); } } @@ -595,6 +600,7 @@ class management $this->tabObject= new $tab($this->config,$this->config->data['TABS'][$tabType], $this->dn,$aclCategory); @DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__,$this->dn,"Edit entry initiated!"); $this->tabObject->set_acl_base($this->dn); + $this->tabObject->parent = &$this; } }else{ diff --git a/gosa-core/include/class_tabs.inc b/gosa-core/include/class_tabs.inc index 71499f098..ef670569c 100644 --- a/gosa-core/include/class_tabs.inc +++ b/gosa-core/include/class_tabs.inc @@ -37,6 +37,8 @@ class tabs var $acl_category; var $multiple_support_active = FALSE; + var $parent = null; // A parent object if available, e.g. a management class. + var $read_only = FALSE; // Used when the entry is opened as "readonly" due to locks. var $hide_refs = FALSE; var $hide_acls = FALSE; -- 2.30.2