summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e19e94a)
raw | patch | inline | side by side (parent: e19e94a)
author | psc <psc@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 1 Mar 2010 08:32:26 +0000 (08:32 +0000) | ||
committer | psc <psc@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 1 Mar 2010 08:32:26 +0000 (08:32 +0000) |
- Move check for used workstations so that the check
is executed after adding a workstation instead of complaining
on save.
- Fix check for used workstations. It was missing a index indication
and therefore not properly determining the 'gosaGroupObjects''
attribute.
- Fix a typo in the german error message
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@15778 594d385d-05f5-0310-b6e9-bd551577e9d8
is executed after adding a workstation instead of complaining
on save.
- Fix check for used workstations. It was missing a index indication
and therefore not properly determining the 'gosaGroupObjects''
attribute.
- Fix a typo in the german error message
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@15778 594d385d-05f5-0310-b6e9-bd551577e9d8
trunk/gosa-core/locale/core/de/LC_MESSAGES/messages.po | patch | blob | history | |
trunk/gosa-core/plugins/admin/ogroups/class_ogroup.inc | patch | blob | history |
diff --git a/trunk/gosa-core/locale/core/de/LC_MESSAGES/messages.po b/trunk/gosa-core/locale/core/de/LC_MESSAGES/messages.po
index 3d8d3703dda713d6693dc37fe5dda7e7c1b8f316..eae310d51ae165b7aafb2d6f6bab60cbff23e691 100644 (file)
"added:"
msgstr ""
"Die folgenden Systeme sind bereits für die Konfiguration über eine "
-"Objektgruppe vorgeseheb und können nicht hinzugefügt werden:"
+"Objektgruppe vorgesehen und können nicht hinzugefügt werden:"
#: plugins/admin/ogroups/class_ogroup.inc:937
msgid "You can combine two different object types at maximum, only!"
diff --git a/trunk/gosa-core/plugins/admin/ogroups/class_ogroup.inc b/trunk/gosa-core/plugins/admin/ogroups/class_ogroup.inc
index d36a32fd5370ed5b9f7d62ceda7a1548853cff79..3c26c693af05d1bd11eb338bf17c3405c52091e6 100644 (file)
foreach($res as $og){
if($og['dn'] == $this->dn) continue;
$test = array_intersect($ws_dns,$og['member']);
- if(($og['gosaGroupObjects'] == "[W]" || $og['gosaGroupObjects'] == "[T]") && count($test)){
+ if(($og['gosaGroupObjects'][0] == "[W]" || $og['gosaGroupObjects'][0] == "[T]") && count($test)){
$this->used_workstations = array_merge($this->used_workstations,$test);
}
}
/* Add objects to group */
if (isset($_POST['add_object_finish']) && isset($_POST['objects'])){
-
+ $test = array_unique(array_intersect($this->used_workstations, $_POST['objects']));
+ if(count($test)) {
+ $str = "";
+ foreach($test as $dn) {
+ $str .= "<li>".$dn."</li>";
+ }
+ msg_dialog::display(_("Error"), sprintf(_("These systems are already configured by other object groups and cannot be added:")."<br><ul>%s</ul>", $str), ERROR_DIALOG);
+ }
$tmp = "";
foreach($this->memberList as $obj){
$tmp .= $obj['type'];
$skipped =TRUE;
}elseif(preg_match("/W/",$tmp) && $this->objects[$value]['type'] == "T"){
$skipped =TRUE;
+ }elseif(in_array($value, $this->used_workstations)) {
+ continue;
}else{
$this->memberList["$value"]= $this->objects[$value];
$this->member["$value"]= $value;
$new_dn= $this->dn;
}
- /* Check if we have workstations assigned, that are already assigned to
- another object group. */
- if ($this->gosaGroupObjects == "[W]" || $this->gosaGroupObjects == "[T]" ) {
- $test =array_intersect($this->used_workstations,$this->member);
- if(count($test)){
- $str = "";
- foreach($test as $dn){
- $str .= "<li>".$dn."</li>";
- }
- $message[] = sprintf(_("These systems are already configured by other object groups and cannot be added:")."<br><ul>%s</ul>",$str);
- }
- }
-
$ldap = $this->config->get_ldap_link();
if(LDAP::fix($this->dn) != LDAP::fix($new_dn)){
$ldap->cat ($new_dn, array('dn'));