Changeset 3c3433e in github


Ignore:
Timestamp:
Aug 16, 2010 6:07:28 AM (3 years ago)
Author:
alecpl <alec@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
Children:
053e5a0
Parents:
4612535
Message:
  • Added 'message_body_prefix' hook. Now it's possible to add some HTML code before every displayed part of the message.
File:
1 edited

Legend:

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

    rfb995a8 r3c3433e  
    945945function rcmail_message_body($attrib) 
    946946  { 
    947   global $CONFIG, $OUTPUT, $MESSAGE, $IMAP, $REMOTE_OBJECTS; 
     947  global $CONFIG, $OUTPUT, $MESSAGE, $IMAP, $RCMAIL, $REMOTE_OBJECTS; 
    948948 
    949949  if (!is_array($MESSAGE->parts) && empty($MESSAGE->body)) 
     
    981981        } 
    982982 
     983        $plugin = $RCMAIL->plugins->exec_hook('message_body_prefix', array( 
     984          'part' => $part, 'prefix' => '')); 
     985 
    983986        // re-format format=flowed content 
    984987        if ($part->ctype_secondary == "plain" && $part->ctype_parameters['format'] == "flowed") 
     
    9991002            $div_attr['style'] = implode('; ', $style); 
    10001003 
    1001           $out .= html::div($div_attr, $body); 
     1004          $out .= html::div($div_attr, $plugin['prefix'] . $body); 
    10021005        } 
    10031006        else 
    1004           $out .= html::div('message-part', $body); 
     1007          $out .= html::div('message-part', $plugin['prefix'] . $body); 
    10051008        } 
    10061009      } 
    10071010    } 
    1008   else 
    1009     $out .= html::div('message-part', html::tag('pre', array(), 
     1011  else { 
     1012    $plugin = $RCMAIL->plugins->exec_hook('message_body_prefix', array( 
     1013      'part' => $MESSAGE, 'prefix' => '')); 
     1014 
     1015    $out .= html::div('message-part', $plugin['prefix'] . html::tag('pre', array(), 
    10101016      rcmail_plain_body(Q($MESSAGE->body, 'strict', false)))); 
     1017    } 
    10111018 
    10121019  $ctype_primary = strtolower($MESSAGE->structure->ctype_primary); 
Note: See TracChangeset for help on using the changeset viewer.