summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: bf732be)
raw | patch | inline | side by side (parent: bf732be)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 22 Oct 2007 05:07:23 +0000 (05:07 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 22 Oct 2007 05:07:23 +0000 (05:07 +0000) |
Check for gotoMode as attribute.
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7609 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7609 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/systems/class_divListSystem.inc | patch | blob | history | |
plugins/admin/systems/class_systemManagement.inc | patch | blob | history |
diff --git a/plugins/admin/systems/class_divListSystem.inc b/plugins/admin/systems/class_divListSystem.inc
index 32c68d3b3cd41e07e40a4c1db5b14963f67aa5ee..b78b0bfbd17e0b373bb0823905975072c1b5abe9 100644 (file)
$action.= "<input class='center' type='image' src='images/edittrash.png' alt='"._("delete")."' name='user_del_%KEY%' title='"._("Delete system")."'>";
}
- $type = $this->parent->get_system_type($val['objectClass']);
+ $type = $this->parent->get_system_type($val);
$cnts[$type] ++;
/* Generate picture list, which is currently disabled */
diff --git a/plugins/admin/systems/class_systemManagement.inc b/plugins/admin/systems/class_systemManagement.inc
index c9974d227dcae1b44877d38665252ac5e692d55b..4ca3ab71ae585b3ca0faea85314b06daa45c6916 100644 (file)
/* Find out more about the object type */
$ldap= $this->config->get_ldap_link();
- $ldap->cat($this->dn, array('objectClass'));
+ $ldap->cat($this->dn, array('objectClass','gotoMode'));
$attrs= $ldap->fetch();
- $type= $this->get_system_type($attrs['objectClass']);
+ $type= $this->get_system_type($attrs);
/* Lock the current entry, so everyone will get the
above dialog */
/* Find out more about the object type */
$ldap= $this->config->get_ldap_link();
- $ldap->cat($this->dn, array('objectClass'));
+ $ldap->cat($this->dn, array('objectClass','gotoMode'));
$attrs= $ldap->fetch();
- $type= $this->get_system_type($attrs['objectClass']);
+ $type= $this->get_system_type($attrs);
$tabs = array(
"terminal" => array("CLASS"=>"TERMTABS", "TABCLASS" =>"termtabs"),
if($oc['CLASS'] != ""){
$filter = "(&".$userregex."(objectClass=".$oc['CLASS'].")(cn=".$this->DivListSystem->Regex."))";
$res = array_merge($res,get_list($filter,$this->ui->subtreeACL, $base,
- array("cn", "description", "macAddress", "objectClass", "sambaDomainName", "FAIstate"), GL_NONE | GL_SUBSEARCH | GL_SIZELIMIT));
+ array("cn", "description", "macAddress", "objectClass", "sambaDomainName", "FAIstate","gotoMode"), GL_NONE | GL_SUBSEARCH | GL_SIZELIMIT));
}
}else{
/* User filter? */
if($oc['CLASS'] != ""){
$filter = "(&".$userregex."(objectClass=".$oc['CLASS'].")(cn=".$this->DivListSystem->Regex."))";
$res = array_merge($res,get_list($filter,$this->ui->subtreeACL, $oc['TREE'].$base,
- array("cn", "description", "macAddress", "objectClass", "sambaDomainName", "FAIstate"), GL_NONE | GL_SIZELIMIT));
+ array("cn", "description", "macAddress", "objectClass", "sambaDomainName", "FAIstate", "gotoMode"), GL_NONE | GL_SIZELIMIT));
}
}
}
/* Search for incoming objects */
$filter = "(|(&".$userregex."(objectClass=goHard)(cn=".$this->DivListSystem->Regex.")))";
$res = array_merge($res,get_list($filter,$this->ui->subtreeACL, "ou=incoming,".$base,
- array("cn", "description", "macAddress", "objectClass", "sambaDomainName"), GL_NONE | GL_SIZELIMIT));
+ array("cn", "description", "macAddress", "objectClass", "sambaDomainName","gotoMode"), GL_NONE | GL_SIZELIMIT));
/* Get all gotoTerminal's */
foreach ($res as $value){
$add= "- "._("New terminal");
}elseif (in_array_ics('gotoWorkstation', $value['objectClass'])){
$add= "- "._("New workstation");
- }elseif (in_array_ics('GOhard', $value['objectClass']) && !in_array_ics("gotoMode",$value['objectClass'])){
+ }elseif (in_array_ics('GOhard', $value['objectClass']) && !isset($value['gotoMode'])){
$add= "- "._("Unknown device");
}elseif (in_array_ics('GOhard', $value['objectClass'])){
$add= "- "._("New Device");
}
- function get_system_type($classes)
+ function get_system_type($attrs)
{
$enable_arp_device_handling = preg_match("/ArpNewDevice/i",search_config($this->config->data['TABS'], "ArpNewDevice", "CLASS"));
+ $classes = $attrs['objectClass'];
$type= "";
if (in_array_ics('ieee802Device', $classes)){
$type= "phone";
}elseif (in_array_ics('goServer', $classes)){
$type= "server";
- }elseif (in_array_ics('GOhard', $classes)&& !in_array('gotoMode', $classes) && $enable_arp_device_handling){
+ }elseif (in_array_ics('GOhard', $classes) && !isset($attrs['gotoMode']) && $enable_arp_device_handling){
$type= "ArpNewDevice";
}elseif (in_array_ics('GOhard', $classes)){
$type= "NewDevice";