X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=gosa-core%2Finclude%2Fclass_filter.inc;h=0bea6c4a69439e0d332efb044255762bf63b26fa;hb=7db39a804ab721db300683f505c87b9c2b8808a5;hp=108eb8ee04c7bfced1787595cf943f2b02d3fcd5;hpb=f926687f254ba9d2da8e89665afe01e3356a9e42;p=gosa.git
diff --git a/gosa-core/include/class_filter.inc b/gosa-core/include/class_filter.inc
index 108eb8ee0..0bea6c4a6 100644
--- a/gosa-core/include/class_filter.inc
+++ b/gosa-core/include/class_filter.inc
@@ -123,6 +123,17 @@ class filter {
$this->alphabetElements[]= $tag;
}
}
+
+ // Sort elements for element length to allow proper replacing later on
+ function strlenSort($a, $b) {
+ if (strlen($a['tag']) == strlen($b['tag'])) {
+ return 0;
+ }
+ return (strlen($a['tag']) < strlen($b['tag']) ? -1 : 1);
+ }
+ uasort($this->elements, 'strlenSort');
+ $this->elements= array_reverse($this->elements);
+
}
return true;
@@ -132,7 +143,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";
@@ -409,12 +428,13 @@ class filter {
$this->elementValues[$tag]= "";
}
}
- }
- // Save scope if needed
- if ($this->scopeMode == "auto") {
- $this->scope= isset($_POST['SCOPE'])?"sub":"one";
+ // Save scope if needed
+ if ($this->scopeMode == "auto") {
+ $this->scope= isset($_POST['SCOPE'])?"sub":"one";
+ }
}
+
}