X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=gosa-core%2Finclude%2Fclass_filter.inc;h=efd72574e18683c237523fd59872278ea2f73ec6;hb=fa919250554e64617662c2e07e569263a53a1ee3;hp=e1b16a58bf6e7e943a13f5157855c218af29393a;hpb=ae88472a137e3017eb6e40b9c2b255b24178ad48;p=gosa.git
diff --git a/gosa-core/include/class_filter.inc b/gosa-core/include/class_filter.inc
index e1b16a58b..efd72574e 100644
--- a/gosa-core/include/class_filter.inc
+++ b/gosa-core/include/class_filter.inc
@@ -1,4 +1,24 @@
load($filename)) {
die("Cannot parse $filename!");
}
+
+ $this->pid= preg_replace("/[^0-9]/", "", microtime(TRUE));
}
@@ -33,11 +57,11 @@ class filter {
$contents = file_get_contents($filename);
$this->xmlData= xml::xml2array($contents, 1);
- if (!isset($this->xmlData['filter'])) {
+ if (!isset($this->xmlData['filterdef'])) {
return false;
}
- $this->xmlData= $this->xmlData["filter"];
+ $this->xmlData= $this->xmlData["filterdef"];
// Load filter
if (isset($this->xmlData['search'])) {
@@ -47,7 +71,6 @@ class filter {
// Move information
$entry= $this->xmlData['search'];
- $this->baseMode= $entry['base'];
$this->scopeMode= $entry['scope'];
if ($entry['scope'] == "auto") {
$this->scope= "one";
@@ -103,6 +126,10 @@ class filter {
$this->alphabetElements[]= $tag;
}
}
+
+ uasort($this->elements, 'strlenSort');
+ $this->elements= array_reverse($this->elements);
+
}
return true;
@@ -112,7 +139,15 @@ class filter {
function getTextfield($element)
{
$tag= $element['tag'];
- $result= "";
+ $size= 30;
+ if (isset($element['size'])){
+ $size= $element['size'];
+ }
+ $maxlength= 30;
+ if (isset($element['maxlength'])){
+ $maxlength= $element['maxlength'];
+ }
+ $result= "";
if (isset($element['autocomplete'])) {
$frequency= "0.5";
$characters= "1";
@@ -141,14 +176,14 @@ class filter {
$checked= " checked";
}
- $result= "";
+ $result= "";
return $result;
}
function getCombobox($element)
{
- $result= "