thomascube
2011-12-12 faea23d0b4b0e86955dc5d11afd4311bbeefc052
More options for message headers output in templates

1 files modified
10 ■■■■■ changed files
program/steps/mail/func.inc 10 ●●●●● patch | view | raw | blame | history
program/steps/mail/func.inc
@@ -890,6 +890,7 @@
  // show these headers
  $standard_headers = array('subject', 'from', 'to', 'cc', 'bcc', 'replyto',
    'mail-reply-to', 'mail-followup-to', 'date');
  $exclude_headers = $attrib['exclude'] ? explode(',', $attrib['exclude']) : array();
  $output_headers = array();
  foreach ($standard_headers as $hkey) {
@@ -898,6 +899,9 @@
    else if ($headers['others'][$hkey])
      $value = $headers['others'][$hkey];
    else
      continue;
    if (in_array($hkey, $exclude_headers))
      continue;
    if ($hkey == 'date') {
@@ -937,7 +941,11 @@
  }
  $plugin = $RCMAIL->plugins->exec_hook('message_headers_output',
    array('output' => $output_headers, 'headers' => $MESSAGE->headers));
    array('output' => $output_headers, 'headers' => $MESSAGE->headers, 'exclude' => $exclude_headers));
  // single header value is requested
  if (!empty($attrib['valueof']))
    return Q($plugin['output'][$attrib['valueof']]['value'], ($hkey == 'subject' ? 'strict' : 'show'));
  // compose html table
  $table = new html_table(array('cols' => 2));