summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d100dec)
raw | patch | inline | side by side (parent: d100dec)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 5 Jan 2010 10:10:55 +0000 (10:10 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 5 Jan 2010 10:10:55 +0000 (10:10 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15046 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/opsi/admin/opsiLicenses/class_filterOpsiLicense.inc | patch | blob | history | |
gosa-plugins/opsi/admin/opsiLicenses/opsiLicense-filter.xml | patch | blob | history |
diff --git a/gosa-plugins/opsi/admin/opsiLicenses/class_filterOpsiLicense.inc b/gosa-plugins/opsi/admin/opsiLicenses/class_filterOpsiLicense.inc
index 368aeafb61ac6582b54a2b552272df1a65aaa817..e2998f61a782c635dc9c192ab0ee98dfa401f7b9 100644 (file)
class filterOpsiLicense {
static function query($base, $scope, $filter, $attributes, $category, $objectStorage= "")
+ {
+ $config= session::global_get('config');
+ $ldap= $config->get_ldap_link(TRUE);
+ $flag= ($scope == "sub")?GL_SUBSEARCH:0;
+ $result= filterOpsiLicense::get_list($base, $filter, $attributes, $category, $objectStorage, $flag);
+
+ // Simple filtering
+ if(!empty($filter)){
+ foreach($result as $key => $entry){
+ if(!preg_match($filter, $entry['cn'][0])){
+ unset($result[$key]);
+ }
+ }
+ }
+
+ return(filterACL::unifyResult($result));
+ }
+
+ static function get_list($base, $filter, $attributes, $category, $objectStorage, $flags= GL_SUBSEARCH)
{
$config= session::global_get('config');
$si = new opsiLicenceHandler($config);
$result[] = $entry;
}
}
- return(filterACL::unifyResult($result));
+ return($result);
}
static function unifyResult($result)
diff --git a/gosa-plugins/opsi/admin/opsiLicenses/opsiLicense-filter.xml b/gosa-plugins/opsi/admin/opsiLicenses/opsiLicense-filter.xml
index 220ee4025747300d80030e9df34821d9da9915be..7abcde7e664bfb39733c04fd73e0a6a3204f25eb 100644 (file)
<search>
<query>
<backend>OpsiLicense</backend>
- <filter>(&(objectClass=fake_opsiLicense)$NAME)</filter>
+ <filter>$NAME</filter>
<attribute>dn</attribute>
<attribute>objectClass</attribute>
<attribute>cn</attribute>
<maxlength>60</maxlength>
<default></default>
<unset></unset>
- <set>(cn=*$*)</set>
+ <set>/$/i</set>
<alphabet>false</alphabet>
<autocomplete>
<backend>OpsiLicense</backend>
- <filter>(&(objectClass=fake_opsiLicense)(cn=*$NAME*))</filter>
+ <filter>/$NAME/i</filter>
<attribute>cn</attribute>
<frequency>0.5</frequency>
<characters>3</characters>