Changeset d7344819 in github


Ignore:
Timestamp:
May 27, 2011 7:22:56 AM (2 years ago)
Author:
alecpl <alec@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
Children:
5164670
Parents:
f5a55bf
Message:
  • Added option to specify to which address book add new contacts
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • CHANGELOG

    r28ac5ca rd7344819  
    22=========================== 
    33 
     4- Added option to specify to which address book add new contacts 
    45- Added plugin hook for keep-alive requests 
    56- Store user preferences in session when write-master is not available and session is stored in memcache, write them later 
  • config/main.inc.php.dist

    r4bb7d27 rd7344819  
    699699$rcmail_config['forward_attachment'] = false; 
    700700 
     701// Defines address book (internal index) to which new contacts will be added 
     702// By default it is the first writeable addressbook. 
     703// Note: Use '0' for built-in address book. 
     704$rcmail_config['default_addressbook'] = null; 
     705 
    701706// end of config file 
  • program/localization/en_US/labels.inc

    ra208a4f rd7344819  
    413413$labels['reqdsn'] = 'Always request a delivery status notification'; 
    414414$labels['replysamefolder'] = 'Place replies in the folder of the message being replied to'; 
     415$labels['defaultaddressbook'] = 'Add new contacts to the selected addressbook'; 
    415416 
    416417$labels['folder']  = 'Folder'; 
  • program/localization/pl_PL/labels.inc

    ra208a4f rd7344819  
    456456$labels['otherfolder'] = 'Folder innego uÅŒytkownika';  
    457457$labels['sharedfolder'] = 'Folder współdzielony'; 
     458$labels['defaultaddressbook'] = 'Nowe kontakty dodawaj do wybranej ksiÄ 
     459ÅŒki adresowej'; 
    458460 
    459461?> 
  • program/steps/mail/addcontact.inc

    re848180 rd7344819  
    2424  return; 
    2525 
    26 $done = false; 
    27 $CONTACTS = $RCMAIL->get_address_book(null, true); 
     26$abook = $RCMAIL->config->get('default_addressbook'); 
     27 
     28// Get configured addressbook 
     29$CONTACTS = $RCMAIL->get_address_book($abook, true); 
     30 
     31// Get first writeable addressbook if the configured doesn't exist 
     32// This can happen when user deleted the addressbook (e.g. Kolab folder) 
     33if ($abook !== null && !is_object($CONTACTS)) { 
     34  $CONTACTS = $RCMAIL->get_address_book(null, true); 
     35} 
    2836 
    2937if (!empty($_POST['_address']) && is_object($CONTACTS)) 
  • program/steps/settings/func.inc

    r254d5ef rd7344819  
    132132  $sections['compose'] = array('id' => 'compose', 'section' => rcube_label('messagescomposition')); 
    133133  $sections['mailview'] = array('id' => 'mailview','section' => rcube_label('messagesdisplaying')); 
     134  $sections['addressbook'] = array('id' => 'addressbook','section' => rcube_label('addressbook')); 
    134135  $sections['folders'] = array('id' => 'folders', 'section' => rcube_label('specialfolders')); 
    135136  $sections['server'] = array('id' => 'server',  'section' => rcube_label('serversettings')); 
     
    583584    break; 
    584585 
     586 
     587    // Addressbook config 
     588    case 'addressbook': 
     589 
     590    $blocks = array( 
     591      'main' => array('name' => Q(rcube_label('mainoptions'))), 
     592    ); 
     593 
     594    if (!isset($no_override['default_addressbook']) 
     595      && ($books = $RCMAIL->get_address_sources(true)) 
     596    ) { 
     597      $field_id = 'rcmfd_default_addressbook'; 
     598      $select_abook = new html_select(array('name' => '_default_addressbook', 'id' => $field_id)); 
     599 
     600      foreach ($books as $book) { 
     601        $select_abook->add($book['name'], $book['id']); 
     602      } 
     603 
     604      $blocks['main']['options']['default_addressbook'] = array( 
     605        'title' => html::label($field_id, Q(rcube_label('defaultaddressbook'))), 
     606        'content' => $select_abook->show($config['default_addressbook']), 
     607      ); 
     608    } 
     609 
     610    break; 
     611 
    585612    // Special IMAP folders 
    586613    case 'folders': 
  • program/steps/settings/save_prefs.inc

    r4bb7d27 rd7344819  
    3838 
    3939  break; 
     40 
    4041  case 'mailbox': 
    4142    $a_user_prefs = array( 
     
    4950 
    5051  break; 
     52 
    5153  case 'mailview': 
    5254    $a_user_prefs = array( 
     
    5961 
    6062  break; 
     63 
    6164  case 'compose': 
    6265    $a_user_prefs = array( 
     
    7578 
    7679  break; 
     80 
     81  case 'addressbook': 
     82    $a_user_prefs = array( 
     83      'default_addressbook' => get_input_value('_default_addressbook', RCUBE_INPUT_POST), 
     84    ); 
     85 
     86  break; 
     87 
    7788  case 'server': 
    7889    $a_user_prefs = array( 
     
    8697 
    8798  break; 
     99 
    88100  case 'folders': 
    89101    $a_user_prefs = array( 
Note: See TracChangeset for help on using the changeset viewer.