Code

Updated copy & paste
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 25 Apr 2006 12:08:16 +0000 (12:08 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 25 Apr 2006 12:08:16 +0000 (12:08 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3110 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/applications/class_applicationManagement.inc
plugins/admin/groups/class_groupApplication.inc
plugins/admin/groups/class_groupManagement.inc

index e1a4dd820079df0e2cf30344eb15b6ea8d021db6..2eaa67e2164a5f6e906e5efd81d892148ab12257 100644 (file)
@@ -246,7 +246,9 @@ class applicationManagement extends plugin
         $this->CopyPasteHandler->save_object();
         $this->CopyPasteHandler->SetVar("base", $_SESSION['CurrentMainBase']);
 
-        return($this->CopyPasteHandler->execute());
+        if($str = $this->CopyPasteHandler->execute()) {
+          return($str);
+        }
       }
 
 
index d45a62638e6bf6b26de1d91c19e214ea2cc076e0..d95e2801df74fcce92d9bc801a9020edd4255a58 100644 (file)
@@ -35,6 +35,9 @@ class appgroup extends plugin
   var $AllAppsForRelease        = array();
   var $AllAppsForReleaseParameter = array();
 
+  var $CopyPasteVars            = array("Categories");
+
+
   function appgroup ($config, $dn= NULL)
   {
     plugin::plugin ($config, $dn);
index 4eedcbacbd07cc7cbfa96028ca4ff0cef6d49400..70bb5499a921cc48af95917a893655b7c6ff29f9 100644 (file)
@@ -211,7 +211,11 @@ class groupManagement extends plugin
       if(($s_action == "editPaste") || ($this->CopyPasteHandler->stillOpen())){
         $this->CopyPasteHandler->save_object();
         $this->CopyPasteHandler->SetVar("base",$_SESSION['CurrentMainBase']);
-        return($this->CopyPasteHandler->execute());
+        if($str = $this->CopyPasteHandler->execute()){
+          return( $str);
+        };
+        /* Ensure that the new object is shown in the list now */
+        $this->relaod();
       }
 
 
@@ -228,16 +232,6 @@ class groupManagement extends plugin
         $obj->set_acl($acl);
         $objNew->set_acl($acl);
         $this->CopyPasteHandler->Copy($obj,$objNew);
-  
-        foreach($this->CopyPasteHandler->current->by_object as $name => $obj){
-          foreach(array('is_account','gotoHotplugDevices','gotoLogonScripts',
-                'gotoProfileServers','gotoProfileFlag_C','gotoProfileFlag_L',
-                'gotoPrinter','useProfile','OrigCn','Categories') as $attr){
-            if(isset($obj->$attr)){
-              $this->CopyPasteHandler->current->by_object[$name]->$attr = $obj->$attr;
-            }
-          }
-        }
       }