From: hickert Date: Wed, 5 Dec 2007 12:16:47 +0000 (+0000) Subject: Added CSN check. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=07a2b1f6279b75bed9009e7bd9f8db534d0b6b4d;p=gosa.git Added CSN check. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8012 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/include/class_plugin.inc b/include/class_plugin.inc index c7b2346e5..67c572baf 100644 --- a/include/class_plugin.inc +++ b/include/class_plugin.inc @@ -154,11 +154,6 @@ class plugin $ldap= $this->config->get_ldap_link(); if ($dn !== NULL){ - /* Get entry CSN */ - if($this->CSN_check_active){ - $this->entryCSN = getEntryCSN($dn); - } - /* Load data to 'attrs' and save 'dn' */ if ($parent !== NULL){ $this->attrs= $parent->attrs; @@ -1690,6 +1685,7 @@ class plugin function enable_CSN_check() { $this->CSN_check_active =TRUE; + $this->entryCSN = getEntryCSN($this->dn); } diff --git a/include/class_tabs.inc b/include/class_tabs.inc index 219c9d15c..2127a6cda 100644 --- a/include/class_tabs.inc +++ b/include/class_tabs.inc @@ -33,8 +33,6 @@ class tabs var $by_object= array(); var $SubDialog = false; - var $entryCSN = ""; - function tabs(&$config, $data, $dn, $acl_category= "") { /* Save dn */ @@ -43,13 +41,12 @@ class tabs $baseobject= NULL; - $this->entryCSN = getEntryCSN($dn); - foreach ($data as &$tab){ $this->by_name[$tab['CLASS']]= $tab['NAME']; if ($baseobject === NULL){ $baseobject= new $tab['CLASS']($this->config, $this->dn); + $baseobject->enable_CSN_check(); $this->by_object[$tab['CLASS']]= $baseobject; } else { $this->by_object[$tab['CLASS']]= new $tab['CLASS']($this->config, $this->dn, $baseobject); @@ -131,11 +128,6 @@ class tabs function save_object($save_current= FALSE) { - /* Update entry CSN if it is empty. */ - if(empty($this->entryCSN)){ - $this->entryCSN = getEntryCSN($this->dn); - } - /* Save last tab */ if ($this->last != ""){ @DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__, @@ -256,13 +248,6 @@ class tabs $current_set = FALSE; - /* Check entryCSN */ - $current_csn = getEntryCSN($this->dn); - if($current_csn != $this->entryCSN && !empty($this->entryCSN) && !empty($current_csn)){ - $this->entryCSN = $current_csn; - $messages[] = _("The object has changed since opened in GOsa. Please ensure that nobody has done serious changes that may get lost if you save this entry."); - } - /* Check all plugins */ foreach ($this->by_object as $key => &$obj){ if ($obj->is_account || $ignore_account || $obj->ignore_account){ @@ -290,7 +275,6 @@ class tabs function save($ignore_account= FALSE) { /* Save all plugins */ - $this->entryCSN = ""; foreach ($this->by_object as $key => &$obj){ @DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__, $key, "Saving");