From: hickert Date: Tue, 12 Jun 2007 06:21:50 +0000 (+0000) Subject: Updated Copy & Paste X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=c002fa50ab9e19fae8cfe07c63c636440910d2ef;p=gosa.git Updated Copy & Paste git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6565 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/include/class_CopyPasteHandler.inc b/include/class_CopyPasteHandler.inc index 0c4738b4b..669eecbdb 100644 --- a/include/class_CopyPasteHandler.inc +++ b/include/class_CopyPasteHandler.inc @@ -172,7 +172,7 @@ class CopyPasteHandler { if($entry['method'] == "copy"){ $entry['object'] = new $tab_c($this->config,$this->config->data['TABS'][$tab_o],"new"); }else{ - $entry['object'] = new $tab_c($this->config,$this->config->data['TABS'][$tab_o],$entry['dn'],"users"); + $entry['object'] = new $tab_c($this->config,$this->config->data['TABS'][$tab_o],$entry['dn']); } $entry['source_data'] = $this->load_attributes_from_hdd($entry['file_name']); diff --git a/include/class_plugin.inc b/include/class_plugin.inc index b467f354a..631a2d153 100644 --- a/include/class_plugin.inc +++ b/include/class_plugin.inc @@ -913,7 +913,16 @@ class plugin if(isset($this->CopyPasteVars)){ $todo = array_merge($todo,$this->CopyPasteVars); } - $todo[] = "is_account"; + + if(count($this->objectclasses)){ + $this->is_account = TRUE; + foreach($this->objectclasses as $class){ + if(!in_array($class,$source['objectClass'])){ + $this->is_account = FALSE; + } + } + } + foreach($todo as $var){ if (isset($source[$var])){ if(isset($source[$var]['count'])){ @@ -924,11 +933,14 @@ class plugin $tmp = $source[$var][$i]; } $this->$var = $tmp; +# echo $var."=".$tmp."
"; }else{ $this->$var = $source[$var][0]; +# echo $var."=".$source[$var][0]."
"; } }else{ $this->$var= $source[$var]; +# echo $var."=".$source[$var]."
"; } } }