summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 35a3f3b)
raw | patch | inline | side by side (parent: 35a3f3b)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 28 Jan 2010 10:00:28 +0000 (10:00 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 28 Jan 2010 10:00:28 +0000 (10:00 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15398 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/plugins/admin/ogroups/class_ogroup.inc | patch | blob | history |
diff --git a/gosa-core/plugins/admin/ogroups/class_ogroup.inc b/gosa-core/plugins/admin/ogroups/class_ogroup.inc
index 32bbecd3763d9d8089bd31519eeff5addda4a859..75e952c1438bc97882310b5f72bf8a48cb070630 100644 (file)
session::set("sysfilter", $sysfilter);
}
- /* Load member data */
$this->reload();
}
}
/* Add objects to group */
- if (isset($_POST['objectSelect_save'])){
-
+ if (isset($_POST['objectSelect_save']) && $this->objectSelect instanceOf objectSelect){
$objects = $this->objectSelect->save();
- print_a($objects);
- $this->objectSelect= FALSE;
- $this->dialog= FALSE;
- return;
- $tmp = "";
- foreach($this->memberList as $obj){
- $tmp .= $obj['type'];
- }
$skipped = FALSE;
- foreach ($_POST['objects'] as $value){
- if(preg_match("/T/",$tmp) && $this->objects[$value]['type'] == "W"){
+ foreach($objects as $object){
+
+ $tmp = "";
+ foreach($this->memberList as $obj){
+ $tmp .= $obj['type'];
+ }
+
+ $type = $this->getObjectType($object);
+ $name= $this->getObjectName($object);
+ $dn = $object['dn'];
+
+ /* Fill array */
+ if (isset($object["description"][0])){
+ $object= array("text" => "$name [".$object["description"][0]."]", "type" => "$type");
+ } elseif (isset($object["uid"][0])) {
+ $object= array("text" => "$name [".$object["uid"][0]."]", "type" => "$type");
+ } else {
+ $object= array("text" => "$name", "type" => "$type");
+ }
+
+ if(preg_match("/T/",$tmp) && $type == "W"){
$skipped =TRUE;
- }elseif(preg_match("/W/",$tmp) && $this->objects[$value]['type'] == "T"){
+ }elseif(preg_match("/W/",$tmp) && $type == "T"){
$skipped =TRUE;
}else{
- $this->memberList["$value"]= $this->objects[$value];
- $this->member["$value"]= $value;
- unset ($this->objects[$value]);
+
+ $this->memberList["$dn"]= $object;
+ $this->member["$dn"]= $dn;
uasort ($this->memberList, 'sort_list');
reset ($this->memberList);
}
if($skipped){
msg_dialog::display(_("Information"), _("You cannot combine terminals and workstations in one object group!"), INFO_DIALOG);
}
- $this->reload();
+ $this->objectSelect= FALSE;
+ $this->dialog= FALSE;
}
}
}