From e1cb3b7030920c9cc131b2a86545200425e77ebd Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 16 Mar 2010 06:36:29 +0000 Subject: [PATCH] Updated opsi filter. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@16548 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-plugins/systems/admin/systems/class_filterOPSIHOSTS.inc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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)); -- 2.30.2