index 0bea6c4a69439e0d332efb044255762bf63b26fa..6e256f8158e824db66468b71d939e56e0ecbedc9 100644 (file)
var $autocompleter= array();
var $category= "";
var $objectStorage= array();
- var $objectBase= "";
var $base= "";
var $scope= "";
var $query;
}
- function setObjectBase($base) {
- $this->objectBase= $base;
- }
-
-
function setBase($base) {
$this->base= $base;
}
}
$result= array_merge($result, call_user_func(array($backend, 'query'), $this->base, $this->scope, $filter, $attributes,
- $this->category, $this->objectStorage, $this->objectBase));
+ $this->category, $this->objectStorage));
}
// Make filter
$filter= preg_replace("/\\$$tag/", normalizeLDAP($value), $filter);
- if (isset($config['base']) && isset($config['scope'])
- && isset($config['category']) && isset($config['objectbase']) ) {
+ if (isset($config['base']) && isset($config['scope']) && isset($config['category'])) {
$result= call_user_func(array($backend, 'query'), $config['base'], $config['scope'], $filter, $attributes,
- $config["category"], $config["objectbase"]);
+ $config["category"], $config["objectStorage"]);
} else {
$result= call_user_func(array($backend, 'query'), $this->base, $this->scope, $filter, $attributes,
- $this->category, $this->objectStorage, $this->objectBase);
+ $this->category, $this->objectStorage);
}
foreach ($result as $entry) {
global $class_mapping;
$result= array();
+ // Introduce maximum number of entries
+ $max= 25;
+
foreach ($this->autocompleters as $tag => $config) {
if(isset($_POST[$tag])){
$result= $this->getCompletitionList($config, $tag, $_POST[$tag]);
+ $result= array_unique($result);
+ asort($result);
echo '<ul>';
foreach ($result as $entry) {
echo '<li>'.$entry.'</li>';
+ if ($max-- == 0) {
+ break;
+ }
}
echo '</ul>';
}
-
}
}