Changeset f5c1085 in github


Ignore:
Timestamp:
Sep 7, 2011 4:45:08 AM (21 months ago)
Author:
alecpl <alec@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.7, release-0.8
Children:
b104e39
Parents:
26bc46d
Message:
  • Localize (full) forwarded message header (#1488058)
File:
1 edited

Legend:

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

    r66df084 rf5c1085  
    823823function rcmail_create_forward_body($body, $bodyIsHtml) 
    824824{ 
    825   global $IMAP, $MESSAGE, $OUTPUT; 
     825  global $RCMAIL, $MESSAGE; 
    826826 
    827827  // add attachments 
     
    829829    $cid_map = rcmail_write_compose_attachments($MESSAGE, $bodyIsHtml); 
    830830 
     831  $date    = format_date($MESSAGE->headers->date, $RCMAIL->config->get('date_long')); 
     832  $charset = $RCMAIL->output->get_charset(); 
     833 
    831834  if (!$bodyIsHtml) 
    832835  { 
    833836    $prefix = "\n\n\n-------- " . rcube_label('originalmessage') . " --------\n"; 
    834     $prefix .= 'Subject: ' . $MESSAGE->subject . "\n"; 
    835     $prefix .= 'Date: ' . $MESSAGE->headers->date . "\n"; 
    836     $prefix .= 'From: ' . $MESSAGE->get_header('from') . "\n"; 
    837     $prefix .= 'To: ' . $MESSAGE->get_header('to') . "\n"; 
     837    $prefix .= rcube_label('subject') . ': ' . $MESSAGE->subject . "\n"; 
     838    $prefix .= rcube_label('date')    . ': ' . $date . "\n"; 
     839    $prefix .= rcube_label('from')    . ': ' . $MESSAGE->get_header('from') . "\n"; 
     840    $prefix .= rcube_label('to')      . ': ' . $MESSAGE->get_header('to') . "\n"; 
    838841 
    839842    if ($MESSAGE->headers->cc) 
    840       $prefix .= 'Cc: ' . $MESSAGE->get_header('cc') . "\n"; 
     843      $prefix .= rcube_label('cc') . ': ' . $MESSAGE->get_header('cc') . "\n"; 
    841844    if ($MESSAGE->headers->replyto && $MESSAGE->headers->replyto != $MESSAGE->headers->from) 
    842       $prefix .= 'Reply-To: ' . $MESSAGE->get_header('replyto') . "\n"; 
     845      $prefix .= rcube_label('replyto') . ': ' . $MESSAGE->get_header('replyto') . "\n"; 
    843846 
    844847    $prefix .= "\n"; 
     
    854857      "<br /><p>-------- " . rcube_label('originalmessage') . " --------</p>" . 
    855858        "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\"><tbody>" . 
    856         "<tr><th align=\"right\" nowrap=\"nowrap\" valign=\"baseline\">Subject: </th><td>%s</td></tr>" . 
    857         "<tr><th align=\"right\" nowrap=\"nowrap\" valign=\"baseline\">Date: </th><td>%s</td></tr>" . 
    858         "<tr><th align=\"right\" nowrap=\"nowrap\" valign=\"baseline\">From: </th><td>%s</td></tr>" . 
    859         "<tr><th align=\"right\" nowrap=\"nowrap\" valign=\"baseline\">To: </th><td>%s</td></tr>", 
    860       Q($MESSAGE->subject), 
    861       Q($MESSAGE->headers->date), 
    862       htmlspecialchars(Q($MESSAGE->get_header('from'), 'replace'), ENT_COMPAT, $OUTPUT->get_charset()), 
    863       htmlspecialchars(Q($MESSAGE->get_header('to'), 'replace'), ENT_COMPAT, $OUTPUT->get_charset())); 
     859        "<tr><th align=\"right\" nowrap=\"nowrap\" valign=\"baseline\">%s: </th><td>%s</td></tr>" . 
     860        "<tr><th align=\"right\" nowrap=\"nowrap\" valign=\"baseline\">%s: </th><td>%s</td></tr>" . 
     861        "<tr><th align=\"right\" nowrap=\"nowrap\" valign=\"baseline\">%s: </th><td>%s</td></tr>" . 
     862        "<tr><th align=\"right\" nowrap=\"nowrap\" valign=\"baseline\">%s: </th><td>%s</td></tr>", 
     863      rcube_label('subject'), Q($MESSAGE->subject), 
     864      rcube_label('date'), Q($date), 
     865      rcube_label('from'), htmlspecialchars(Q($MESSAGE->get_header('from'), 'replace'), ENT_COMPAT, $charset), 
     866      rcube_label('to'), htmlspecialchars(Q($MESSAGE->get_header('to'), 'replace'), ENT_COMPAT, $charset)); 
    864867 
    865868    if ($MESSAGE->headers->cc) 
    866       $prefix .= sprintf("<tr><th align=\"right\" nowrap=\"nowrap\" valign=\"baseline\">Cc: </th><td>%s</td></tr>", 
    867         htmlspecialchars(Q($MESSAGE->get_header('cc'), 'replace'), ENT_COMPAT, $OUTPUT->get_charset())); 
     869      $prefix .= sprintf("<tr><th align=\"right\" nowrap=\"nowrap\" valign=\"baseline\">%s: </th><td>%s</td></tr>", 
     870        rcube_label('cc'), 
     871        htmlspecialchars(Q($MESSAGE->get_header('cc'), 'replace'), ENT_COMPAT, $charset)); 
    868872 
    869873    if ($MESSAGE->headers->replyto && $MESSAGE->headers->replyto != $MESSAGE->headers->from) 
    870       $prefix .= sprintf("<tr><th align=\"right\" nowrap=\"nowrap\" valign=\"baseline\">Reply-To: </th><td>%s</td></tr>", 
    871         htmlspecialchars(Q($MESSAGE->get_header('replyto'), 'replace'), ENT_COMPAT, $OUTPUT->get_charset())); 
     874      $prefix .= sprintf("<tr><th align=\"right\" nowrap=\"nowrap\" valign=\"baseline\">%s: </th><td>%s</td></tr>", 
     875        rcube_label('replyto'), 
     876        htmlspecialchars(Q($MESSAGE->get_header('replyto'), 'replace'), ENT_COMPAT, $charset)); 
    872877 
    873878    $prefix .= "</tbody></table><br>"; 
Note: See TracChangeset for help on using the changeset viewer.