Code

Added filter for applcications
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 31 Mar 2010 08:53:53 +0000 (08:53 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 31 Mar 2010 08:53:53 +0000 (08:53 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17427 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/goto/admin/applications/class_filterAPPLICATIONS.inc [new file with mode: 0644]

diff --git a/gosa-plugins/goto/admin/applications/class_filterAPPLICATIONS.inc b/gosa-plugins/goto/admin/applications/class_filterAPPLICATIONS.inc
new file mode 100644 (file)
index 0000000..0f6c75b
--- /dev/null
@@ -0,0 +1,20 @@
+<?php
+
+class filterAPPLICATIONS extends filterLDAP{
+
+  static function query($base, $scope, $filter, $attributes, $category, $objectStorage= "")
+  {
+    $res = filterLDAP::query($base, $scope, $filter, $attributes, $category, $objectStorage);
+
+    foreach($res as $id => $entry){
+      if(isset($entry['FAIstate']) && preg_match("/freeze/i", $entry['FAIstate'][0])){
+        $res[$id]['objectClass'][] = 'FAKE_OC_freeze';
+      }else{
+        $res[$id]['objectClass'][] = 'FAKE_OC_branch';
+      }
+    }
+    return($res);
+  }
+}
+
+?>