From 305d80845ec719c4e4f7acc8059f26c6c1db61a2 Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 16 Apr 2008 07:04:54 +0000 Subject: [PATCH] Updated Copy & Paste git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10485 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/class_CopyPasteHandler.inc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gosa-core/include/class_CopyPasteHandler.inc b/gosa-core/include/class_CopyPasteHandler.inc index de292dd8c..ad94b984d 100644 --- a/gosa-core/include/class_CopyPasteHandler.inc +++ b/gosa-core/include/class_CopyPasteHandler.inc @@ -298,6 +298,7 @@ class CopyPasteHandler { $entry = $this->load_entry_from_queue($entry); $this->queue[$key] = $entry; } + $entry= $this->_update_vars($entry); $msgs = $entry['object']->check(); $acl = $ui->get_category_permissions($entry['dn'], $entry['tab_acl_category']); @@ -342,7 +343,6 @@ class CopyPasteHandler { /* Load next queue entry */ if(!count($msgs)){ $this->lastdn = $this->current['object']->dn; - $this->current= $this->_update_vars($this->current); $this->current['object']->save(); $this->current = FALSE; }else{ @@ -378,6 +378,7 @@ class CopyPasteHandler { $key = key($this->objects_to_fix); if(isset($this->objects_to_fix[$key])){ $this->current = $this->objects_to_fix[$key]; + $this->current= $this->_update_vars($this->current); unset($this->objects_to_fix[$key]); unset($this->queue[$key]); } @@ -452,6 +453,10 @@ class CopyPasteHandler { /* Update all attributes specified with SetVar */ foreach($this->setvar_array as $name => $value){ + + /* Do not update parent for plugins, this may break things */ + if($name == "parent") continue; + if(isset($entry['object']->by_object[$key]->$name)){ $entry['object']->by_object[$key]->$name = $value; } -- 2.30.2