From: hickert Date: Tue, 16 Mar 2010 06:36:29 +0000 (+0000) Subject: Updated opsi filter. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=e1cb3b7030920c9cc131b2a86545200425e77ebd;p=gosa.git Updated opsi filter. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@16548 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/systems/admin/systems/class_filterOPSIHOSTS.inc b/gosa-plugins/systems/admin/systems/class_filterOPSIHOSTS.inc index d3f44631e..48f718659 100644 --- a/gosa-plugins/systems/admin/systems/class_filterOPSIHOSTS.inc +++ b/gosa-plugins/systems/admin/systems/class_filterOPSIHOSTS.inc @@ -11,11 +11,13 @@ class filterOPSIHOSTS { if(class_available('opsi') && $base == $config->current['BASE']){ + // Explode filter into attribute and value to search for. $attr = $value = ""; + $filter = preg_replace("/\*/",".*",$filter); if(preg_match("/=/", $filter)) { list($fAttr,$fValue) = preg_split("/=/", $filter); } - + // Check ACLs and opsi handle $opsi_acl = $ui->get_permissions($base,"opsi/opsiProperties"); $opsi = new opsi($config); @@ -28,7 +30,6 @@ class filterOPSIHOSTS { msg_dialog::display(_("Error"),msgPool::siError($opsi->get_error()),ERROR_DIALOG); }else{ foreach($opsi_clients as $entry){ - if(empty($fAttr) || preg_match("/{$fValue}/i",$entry[$fAttr][0])){ $entry['objectClass'] = array("FAKE_OC_OpsiHost"); $item = array('count' => count($entry));