Changeset 710b1bd in github


Ignore:
Timestamp:
Nov 10, 2011 9:30:51 AM (19 months ago)
Author:
alecpl <alec@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.8
Children:
8c2b883
Parents:
bed577e
Message:
  • Add option to skip alternative email addresses in autocompletion
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • CHANGELOG

    r46cdbf0 r710b1bd  
    22=========================== 
    33 
     4- Add option to skip alternative email addresses in autocompletion 
    45- Fix inconsistent behaviour of Compose button in Drafts folder, add Edit button for drafts 
    56- Fix problem with parsing HTML message body with non-unicode characters (#1487813) 
  • config/main.inc.php.dist

    rf21a04c r710b1bd  
    782782$rcmail_config['spellcheck_before_send'] = false; 
    783783 
     784// Skip alternative email addresses in autocompletion (show one address per contact) 
     785$rcmail_config['autocomplete_single'] = false; 
     786 
    784787// end of config file 
  • program/localization/en_US/labels.inc

    r46cdbf0 r710b1bd  
    432432$labels['replysamefolder'] = 'Place replies in the folder of the message being replied to'; 
    433433$labels['defaultaddressbook'] = 'Add new contacts to the selected addressbook'; 
     434$labels['autocompletesingle'] = 'Skip alternative email addresses in autocompletion'; 
    434435$labels['spellcheckbeforesend'] = 'Check spelling before sending a message'; 
    435436$labels['spellcheckoptions'] = 'Spellcheck Options'; 
  • program/localization/pl_PL/labels.inc

    r46cdbf0 r710b1bd  
    487487$labels['timeformat'] = 'Format czasu'; 
    488488$labels['isdraft'] = 'To jest kopia robocza wiadomości.'; 
     489$labels['autocompletesingle'] = 'Nie pokazuj alternatywnych adresów przy autouzupełnianiu'; 
    489490 
    490491?> 
  • program/steps/mail/autocomplete.inc

    r55a8a8c r710b1bd  
    4141 
    4242 
    43 $MAXNUM = (int)$RCMAIL->config->get('autocomplete_max', 15); 
     43$MAXNUM = (int) $RCMAIL->config->get('autocomplete_max', 15); 
    4444$mode   = (int) $RCMAIL->config->get('addressbook_search_mode'); 
     45$single = (bool) $RCMAIL->config->get('autocomplete_single'); 
    4546$search = get_input_value('_search', RCUBE_INPUT_GPC, true); 
    4647$source = get_input_value('_source', RCUBE_INPUT_GPC); 
     
    6768        $email_cnt = count($email_arr); 
    6869        foreach ($email_arr as $email) { 
    69           if (empty($email)) 
     70          if (empty($email)) { 
    7071            continue; 
     72          } 
     73 
    7174          $contact = format_email_recipient($email, $sql_arr['name']); 
     75 
    7276          // skip entries that don't match 
    7377          if ($email_cnt > 1 && strpos(mb_strtolower($contact), $search_lc) === false) { 
    7478            continue; 
    7579          } 
     80 
    7681          // skip duplicates 
    7782          if (!in_array($contact, $contacts)) { 
     
    7984            if (count($contacts) >= $MAXNUM) 
    8085              break 2; 
     86          } 
     87 
     88          // skip redundant entries (show only first email address) 
     89          if ($single) { 
     90            break; 
    8191          } 
    8292        } 
  • program/steps/settings/func.inc

    r0324621 r710b1bd  
    660660    } 
    661661 
     662    if (!isset($no_override['autocomplete_single'])) { 
     663      $field_id = 'rcmfd_autocomplete_single'; 
     664      $checkbox = new html_checkbox(array('name' => '_autocomplete_single', 'id' => $field_id, 'value' => 1)); 
     665 
     666      $blocks['main']['options']['autocomplete_single'] = array( 
     667        'title' => html::label($field_id, Q(rcube_label('autocompletesingle'))), 
     668        'content' => $checkbox->show($config['autocomplete_single']?1:0), 
     669      ); 
     670    } 
     671 
    662672    break; 
    663673 
  • program/steps/settings/save_prefs.inc

    r1cc9e21 r710b1bd  
    9494    $a_user_prefs = array( 
    9595      'default_addressbook' => get_input_value('_default_addressbook', RCUBE_INPUT_POST, true), 
     96      'autocomplete_single' => isset($_POST['_autocomplete_single']) ? TRUE : FALSE, 
    9697    ); 
    9798 
Note: See TracChangeset for help on using the changeset viewer.