Ignore:
Timestamp:
Dec 12, 2011 4:30:04 PM (18 months ago)
Author:
thomasb
Message:

More options for message headers output in templates

File:
1 edited

Legend:

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

    r5595 r5596  
    891891  $standard_headers = array('subject', 'from', 'to', 'cc', 'bcc', 'replyto', 
    892892    'mail-reply-to', 'mail-followup-to', 'date'); 
     893  $exclude_headers = $attrib['exclude'] ? explode(',', $attrib['exclude']) : array(); 
    893894  $output_headers = array(); 
    894895 
     
    901902      continue; 
    902903 
     904    if (in_array($hkey, $exclude_headers)) 
     905      continue; 
     906 
    903907    if ($hkey == 'date') { 
    904908      if ($PRINT_MODE) 
     
    938942 
    939943  $plugin = $RCMAIL->plugins->exec_hook('message_headers_output', 
    940     array('output' => $output_headers, 'headers' => $MESSAGE->headers)); 
     944    array('output' => $output_headers, 'headers' => $MESSAGE->headers, 'exclude' => $exclude_headers)); 
     945 
     946  // single header value is requested 
     947  if (!empty($attrib['valueof'])) 
     948    return Q($plugin['output'][$attrib['valueof']]['value'], ($hkey == 'subject' ? 'strict' : 'show')); 
    941949 
    942950  // compose html table 
Note: See TracChangeset for help on using the changeset viewer.