Code

Updated filtering for device item dialog
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 28 Sep 2010 11:37:46 +0000 (11:37 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 28 Sep 2010 11:37:46 +0000 (11:37 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19829 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/goto/admin/systems/goto/Config/DeviceConfig-list.tpl
gosa-plugins/goto/admin/systems/goto/Config/class_filterDeviceItems.inc

index 8823cdfa7dc81f3b3ce92ff5a33455a314ff55d0..ed5a3266aad753d014b92e309662cc34f5e6c80f 100644 (file)
@@ -5,9 +5,6 @@
    <div class="mainlist-nav">
     <table summary="{$HEADLINE}">
      <tr>
-      <td>{$ROOT}</td>
-      <td>{$BACK}</td>
-      <td>{$HOME}</td>
       <td>{$RELOAD}</td>
       <td class="left-border">{t}Base{/t} {$RELEASE}</td>
       <td class="left-border">{$ACTIONS}</td>
index 17c62fd0c9a006f0284245b8e59fd7e445fa29dd..44aded3a360ef520220cc054f4e7ebd264d65bcc 100644 (file)
@@ -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);
         }