From d4587a764a1ccaad0cdc6e60171a3fa277cb08af Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 17 Mar 2006 11:12:26 +0000 Subject: [PATCH] iFixed group copy git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2859 594d385d-05f5-0310-b6e9-bd551577e9d8 --- include/class_CopyPasteHandler.inc | 8 ++++++-- plugins/personal/environment/class_environment.inc | 7 +++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/include/class_CopyPasteHandler.inc b/include/class_CopyPasteHandler.inc index 660c351cc..a6d1a8a30 100644 --- a/include/class_CopyPasteHandler.inc +++ b/include/class_CopyPasteHandler.inc @@ -61,9 +61,12 @@ class CopyPasteHandler { foreach($obj->attributes as $attr){ $this->current->by_object[$name]->$attr = $obj->$attr; } - foreach(array('is_account') as $attr){ - $this->current->by_object[$name]->$attr = $obj->$attr; + foreach(array('is_account','gotoHotplugDevices','gotoLogonScripts','gotoProfileServers','gotoProfileFlag_C','gotoProfileFlag_L','gotoPrinter','useProfile','OrigCn','Categories') as $attr){ + if(isset($obj->$attr)){ + $this->current->by_object[$name]->$attr = $obj->$attr; + } } + } if($this->isCurrentObjectPastAble()){ return(true); @@ -202,6 +205,7 @@ class CopyPasteHandler { foreach($this-> current->by_object as $obj){ $ret = array_merge($ret , $obj->check()); } + return($ret); } diff --git a/plugins/personal/environment/class_environment.inc b/plugins/personal/environment/class_environment.inc index 3b6bea7e8..86447ea18 100644 --- a/plugins/personal/environment/class_environment.inc +++ b/plugins/personal/environment/class_environment.inc @@ -53,7 +53,7 @@ class environment extends plugin VAR $newKioskProfiles = array(); /* Hotplug Devices */ - var $gotoHotplugDevice = ""; // Selected hotplug + var $gotoHotplugDevice = array(); // Selected hotplug var $gotoHotplugDevices = array();// Already configured hotplug devices @@ -68,6 +68,7 @@ class environment extends plugin "gotoHotplugDevice"); var $objectclasses = array("gotoEnvironment"); // Specifies the objectClass which contains the attributes edited here var $cn; + var $OrigCn; function environment ($config, $dn= NULL) { @@ -79,6 +80,7 @@ class environment extends plugin $suffix="Group"; $this->uid = $this->attrs['cn'][0]; $this->attrs['uid'] = $this->attrs['cn'][0]; + $this->OrigCn = $this->attrs['cn'][0]; }else{ $suffix="User"; } @@ -768,7 +770,8 @@ class environment extends plugin /* Save to LDAP */ function save() { - + /* If group was renamed, all printer settings get lost + */ /* only save changed variables ....*/ if ($this->gotoKioskProfile =="none") $this->gotoKioskProfile =""; if((!empty($this->gotoKioskProfile))&&($this->gotoKioskProfile != "none")){ -- 2.30.2