Code

Updated Copy & Paste
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 16 Apr 2008 07:04:54 +0000 (07:04 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 16 Apr 2008 07:04:54 +0000 (07:04 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10485 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/class_CopyPasteHandler.inc

index de292dd8c5900f974c48c7426f75a59b1af9963f..ad94b984d1566d1b6c0d99ad1c4673884062aef2 100644 (file)
@@ -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;
         }