From: hickert Date: Tue, 28 Sep 2010 11:37:46 +0000 (+0000) Subject: Updated filtering for device item dialog X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=5eee3c19adca35c713624bf74c5e13a6c9fc6d28;p=gosa.git Updated filtering for device item dialog git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19829 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/goto/admin/systems/goto/Config/DeviceConfig-list.tpl b/gosa-plugins/goto/admin/systems/goto/Config/DeviceConfig-list.tpl index 8823cdfa7..ed5a3266a 100644 --- a/gosa-plugins/goto/admin/systems/goto/Config/DeviceConfig-list.tpl +++ b/gosa-plugins/goto/admin/systems/goto/Config/DeviceConfig-list.tpl @@ -5,9 +5,6 @@
- - - diff --git a/gosa-plugins/goto/admin/systems/goto/Config/class_filterDeviceItems.inc b/gosa-plugins/goto/admin/systems/goto/Config/class_filterDeviceItems.inc index 17c62fd0c..44aded3a3 100644 --- a/gosa-plugins/goto/admin/systems/goto/Config/class_filterDeviceItems.inc +++ b/gosa-plugins/goto/admin/systems/goto/Config/class_filterDeviceItems.inc @@ -11,9 +11,13 @@ class filterDeviceItems { $data = $data[$name]['children']; } + // Prepare filter, strip out regex regex related chars, except for * + $filter = preg_replace('/\*/','____STAR____', $filter); + $filter = preg_quote($filter,'/'); + $filter = preg_replace('/____STAR____/','.*', $filter); + // Add entries $ret = array(); - $filter = preg_replace("/\*/",'.*', $filter); foreach($data as $item){ filterDeviceItems::addEntry($ret, $item, $scope == 'sub', $filter); }
{$ROOT}{$BACK}{$HOME} {$RELOAD} {t}Base{/t} {$RELEASE} {$ACTIONS}