<configinteger name="reply_limit" desc="What is the maximum total size of
text (in bytes) to use when replying or forwarding a message. Set this value
to 0 for no limit.">200000</configinteger>
+ <configinteger name="ac_browser" desc="For autocompletion of addresses,
+ if the addressbook is below this many entries, the user's address book will
+ be transmitted to the browser if it is below this many entries. This will
+ result in faster lookups and less server load, but requires additional
+ processing on compose creation. Set to 0 to disable.">100</configinteger>
+ <configinteger name="ac_threshold" desc="When autocompleting addresses in
+ the compose screen, this is the minimum number of characters required
+ before the search is performed on the server.">3</configinteger>
</configsection>
</configtab>
v5.0-cvs
--------
+[mms] Make autocompletion threshold parameters configurable (Request #7322).
[mms] Add compose attachment preview to DIMP.
[mms] Add 'unit' parameter for quota display (Carlos Pires <acmpires@sapo.pt>,
Request #7044).
'indicator: "' . $this->_params['triggerId'] . '_loading_img"',
'afterUpdateElement: function(f, t) { if (!f.value.endsWith(";")) { f.value += ","; } f.value += " "; }'
);
+ $ac_browser = empty($GLOBALS['conf']['compose']['ac_browser']) ? 0 : $GLOBALS['conf']['compose']['ac_browser'];
- if (!isset($_SESSION['imp']['cache']['ac_ajax'])) {
+ if ($ac_browser && !isset($_SESSION['imp']['cache']['ac_ajax'])) {
$success = $use_ajax = true;
$sparams = IMP_Compose::getAddressSearchParams();
foreach ($sparams['fields'] as $val) {
}
if ($success) {
$addrlist = IMP_Compose::getAddressList();
- $use_ajax = count($addrlist) > 200;
+ $use_ajax = count($addrlist) > $ac_browser;
}
$_SESSION['imp']['cache']['ac_ajax'] = $use_ajax;
}
- if ($_SESSION['imp']['cache']['ac_ajax']) {
+ if (!$ac_browser || $_SESSION['imp']['cache']['ac_ajax']) {
$func = 'Ajax.Autocompleter';
if (empty($this->_url)) {
$this->_url = Horde::url($GLOBALS['registry']->get('webroot', 'imp') . '/imple.php?imple=ContactAutoCompleter/input=' . rawurlencode($this->_params['triggerId']), true);
}
$params[] = '"' . $this->_url . '"';
+
+ $js_params[] = 'minChars: ' . intval($GLOBALS['conf']['compose']['ac_threshold'] ? $GLOBALS['conf']['compose']['ac_threshold'] : 1);
} else {
if (!$list_output) {
if (!isset($addrlist)) {