Changeset 3ca3bd4 in github


Ignore:
Timestamp:
Jul 3, 2009 9:02:48 AM (4 years ago)
Author:
thomascube <thomas@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
Children:
5881355
Parents:
fccdf16
Message:

Add plugin hooks 'smtp_connect' and 'list_identities' (#1485954, #1485958)

Location:
program
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • program/include/rcube_smtp.inc

    r70306a4 r3ca3bd4  
    5252function smtp_mail($from, $recipients, &$headers, &$body, &$response) 
    5353  { 
    54   global $SMTP_CONN, $CONFIG, $RCMAIL; 
     54  global $SMTP_CONN, $RCMAIL; 
     55   
     56  // let plugins alter smtp connection config 
     57  $CONFIG = $RCMAIL->plugins->exec_hook('smtp_connect', array( 
     58    'smtp_server' => $RCMAIL->config->get('smtp_server'), 
     59    'smtp_port'   => $RCMAIL->config->get('smtp_port', 25), 
     60    'smtp_user'   => $RCMAIL->config->get('smtp_user'), 
     61    'smtp_pass'   => $RCMAIL->config->get('smtp_pass'), 
     62    'smtp_auth_type' => $RCMAIL->config->get('smtp_auth_type'), 
     63    'smtp_helo_host' => $RCMAIL->config->get('smtp_helo_host'), 
     64  )); 
     65 
    5566  $smtp_timeout = null; 
    5667  $smtp_host = $CONFIG['smtp_server']; 
  • program/steps/settings/func.inc

    r5d4ac46 r3ca3bd4  
    409409function rcmail_identities_list($attrib) 
    410410  { 
    411   global $OUTPUT, $USER; 
     411  global $OUTPUT, $USER, $RCMAIL; 
    412412 
    413413  // add id to message list table if not specified 
     
    415415    $attrib['id'] = 'rcmIdentitiesList'; 
    416416 
    417   // define list of cols to be displayed 
    418   $a_show_cols = array('name', 'email'); 
     417  // get all identites from DB and define list of cols to be displayed 
     418  $plugin = $RCMAIL->plugins->exec_hook('list_identities', array( 
     419    'list' => $USER->list_identities(), 
     420    'cols' => array('name', 'email'))); 
    419421 
    420422  // create XHTML table   
    421   $out = rcube_table_output($attrib, $USER->list_identities(), $a_show_cols, 'identity_id'); 
     423  $out = rcube_table_output($attrib, $plugin['list'], $plugin['cols'], 'identity_id'); 
    422424   
    423425  // set client env 
Note: See TracChangeset for help on using the changeset viewer.