Ignore:
Timestamp:
Jul 25, 2011 6:49:39 AM (22 months ago)
Author:
alec
Message:
  • Added optional "multithreading" autocomplete feature
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/program/steps/mail/autocomplete.inc

    r4932 r4963  
    2020*/ 
    2121 
    22 $MAXNUM = 15; 
    23 $book_types = (array) $RCMAIL->config->get('autocomplete_addressbooks', 'sql'); 
    24  
    2522if ($RCMAIL->action == 'group-expand') { 
    2623  $abook = $RCMAIL->get_address_book(get_input_value('_source', RCUBE_INPUT_GPC)); 
     
    3734    $OUTPUT->command('replace_group_recipients', $gid, join(', ', $members)); 
    3835  } 
     36 
     37  $OUTPUT->send(); 
    3938} 
    40 else if ($book_types && ($search = get_input_value('_search', RCUBE_INPUT_GPC, true))) { 
     39 
     40 
     41$MAXNUM = (int)$RCMAIL->config->get('autocomplete_max', 15); 
     42$search = get_input_value('_search', RCUBE_INPUT_GPC, true); 
     43$source = get_input_value('_source', RCUBE_INPUT_GPC); 
     44$sid    = get_input_value('_id', RCUBE_INPUT_GPC); 
     45 
     46if (strlen($source)) 
     47  $book_types = array($source); 
     48else 
     49  $book_types = (array) $RCMAIL->config->get('autocomplete_addressbooks', 'sql'); 
     50 
     51if (!empty($book_types) && strlen($search)) { 
    4152  $contacts = array(); 
    4253  $books_num = count($book_types); 
     
    8899} 
    89100 
    90 $OUTPUT->command('ksearch_query_results', $contacts, $search); 
     101$OUTPUT->command('ksearch_query_results', $contacts, $search, $sid); 
    91102$OUTPUT->send(); 
    92103 
Note: See TracChangeset for help on using the changeset viewer.