From 81e9c151d84c9a8325dd61caa96f8fa0e4df6521 Mon Sep 17 00:00:00 2001 From: cajus Date: Fri, 12 May 2006 09:53:55 +0000 Subject: [PATCH] Added robustness for wrong imported schema files git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3313 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../admin/systems/class_systemManagement.inc | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/plugins/admin/systems/class_systemManagement.inc b/plugins/admin/systems/class_systemManagement.inc index 5a6ba6fce..3bde9f10e 100644 --- a/plugins/admin/systems/class_systemManagement.inc +++ b/plugins/admin/systems/class_systemManagement.inc @@ -611,11 +611,11 @@ class systems extends plugin /* check if current object is a new one */ if (preg_match ("/,ou=incoming,/i", $tmp)){ - if (in_array('gotoTerminal', $value['objectClass'])){ + if (in_array_ics('gotoTerminal', $value['objectClass'])){ $add= "- "._("New terminal"); - }elseif (in_array('gotoWorkstation', $value['objectClass'])){ + }elseif (in_array_ics('gotoWorkstation', $value['objectClass'])){ $add= "- "._("New workstation"); - }elseif (in_array('GOhard', $value['objectClass'])){ + }elseif (in_array_ics('GOhard', $value['objectClass'])){ $add= "- "._("New Device"); } } @@ -623,7 +623,7 @@ class systems extends plugin /* Detect type of object and create an entry for $this->terminals */ $terminal = array(); if ((in_array ($tmp, $responsible)) || ($add != "")){ - if (in_array('gotoTerminal', $value["objectClass"])){ + if (in_array_ics('gotoTerminal', $value["objectClass"])){ if (isset($value["macAddress"][0]) && $value["macAddress"][0] != "-"){ $terminal = $value; $terminal['type'] = "T"; @@ -634,7 +634,7 @@ class systems extends plugin $terminal['message'] = _("Terminal template for"); $terminal['location'] = array_search($tmp, $this->config->departments); } - } elseif (in_array('gotoWorkstation', $value["objectClass"])){ + } elseif (in_array_ics('gotoWorkstation', $value["objectClass"])){ if (isset($value["macAddress"][0]) && $value["macAddress"][0] != "-"){ $terminal = $value; $terminal['type'] = "L"; @@ -648,23 +648,23 @@ class systems extends plugin if (isset($value["FAIstate"][0])){ $terminal['type']= $this->getState($terminal['type'], $value["FAIstate"][0]); } - } elseif (in_array('gotoPrinter', $value["objectClass"])){ + } elseif (in_array_ics('gotoPrinter', $value["objectClass"])){ $terminal = $value; $terminal['type'] = "P"; - } elseif (in_array('goServer', $value["objectClass"])){ + } elseif (in_array_ics('goServer', $value["objectClass"])){ $terminal = $value; $terminal['type'] = "S"; if (isset($value["FAIstate"][0])){ $terminal['type']= $this->getState($terminal['type'], $value["FAIstate"][0]); } - } elseif (in_array('goFonHardware', $value["objectClass"])){ + } elseif (in_array_ics('goFonHardware', $value["objectClass"])){ $terminal = $value; $terminal['type'] = "F"; - }elseif (in_array("GOhard",$value['objectClass'])){ + }elseif (in_array_ics("GOhard",$value['objectClass'])){ $terminal = $value; $terminal['type'] = "Q"; $terminal['is_new'] = $add; - } elseif (in_array('ieee802Device', $value["objectClass"])){ + } elseif (in_array_ics('ieee802Device', $value["objectClass"])){ $terminal = $value; $terminal['type'] = "C"; } else{ -- 2.30.2