X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=src%2Fread_body.php;h=e07ab9db62189953a5d8505d2de76ce365a8c7e9;hp=cf0d3b2f9bb6bfd5fd983385d7f621eaf0a528ac;hb=e1728a7ada03ba597fc2f8a800773cb427a711ce;hpb=25e57ed2f1a869eb4c6bd97c7085146458158776 diff --git a/src/read_body.php b/src/read_body.php index cf0d3b2f..e07ab9db 100644 --- a/src/read_body.php +++ b/src/read_body.php @@ -184,16 +184,16 @@ function SendMDN ( $mailbox, $passed_id, $sender, $message, $imapConnection) { $now = getLongDateString( time() ); set_my_charset(); $body = _("Your message") . "\r\n\r\n" . - "\t" . _("To:") . ' ' . decodeHeader($to,false,false) . "\r\n" . - "\t" . _("Subject:") . ' ' . decodeHeader($header->subject,false,false) . "\r\n" . - "\t" . _("Sent:") . ' ' . $senton . "\r\n" . + "\t" . _("To") . ': ' . decodeHeader($to,false,false) . "\r\n" . + "\t" . _("Subject") . ': ' . decodeHeader($header->subject,false,false) . "\r\n" . + "\t" . _("Sent") . ': ' . $senton . "\r\n" . "\r\n" . sprintf( _("Was displayed on %s"), $now ); $special_encoding = ''; if (isset($languages[$squirrelmail_language]['XTRA_CODE']) && - function_exists($languages[$squirrelmail_language]['XTRA_CODE'])) { - $body = $languages[$squirrelmail_language]['XTRA_CODE']('encode', $body); + function_exists($languages[$squirrelmail_language]['XTRA_CODE'] . '_encode')) { + $body = call_user_func($languages[$squirrelmail_language]['XTRA_CODE'] . '_encode', $body); if (strtolower($default_charset) == 'iso-2022-jp') { if (mb_detect_encoding($body) == 'ASCII') { $special_encoding = '8bit'; @@ -265,7 +265,7 @@ function SendMDN ( $mailbox, $passed_id, $sender, $message, $imapConnection) { $success = $deliver->finalizeStream($stream); } if (!$success) { - $msg = $deliver->dlv_msg . '
' . + $msg = $deliver->dlv_msg . '
' . _("Server replied: ") . $deliver->dlv_ret_nr . ' '. $deliver->dlv_server_msg; require_once(SM_PATH . 'functions/display_messages.php'); @@ -347,15 +347,15 @@ function formatRecipientString($recipients, $item ) { foreach($recipients as $r) { $add = decodeHeader($r->getAddress(true)); if ($string) { - $string .= '
' . $add; + $string .= '
' . $add; } else { $string = $add; if ($cnt > 1) { - $string .= ' ()'; + $string .= '">'._("less").')'; } else { - $string .= '">'._("more").')'; + $string .= '">'._("more").')'; break; } } @@ -425,26 +425,26 @@ function formatEnvheader($aMailbox, $passed_id, $passed_ent_id, $message, } } - $s = ''; + $s = '
'; foreach ($env as $key => $val) { if ($val) { - $s .= ''; - $s .= html_tag('TD', '' . $key . ':  ', 'RIGHT', '', 'VALIGN="TOP" WIDTH="20%"') . "\n"; - $s .= html_tag('TD', $val, 'left', '', 'VALIGN="TOP" WIDTH="80%"') . "\n"; - $s .= ''; + $s .= ''; + $s .= html_tag('td', '' . $key . ':  ', 'right', '', 'valign="top" width="20%"') . "\n"; + $s .= html_tag('td', $val, 'left', '', 'valign="top" width="80%"') . "\n"; + $s .= ''; } } - echo '
'."\n"; - echo ''."\n"; - echo '
'."\n"; + echo ''."\n"; + echo '
'."\n"; echo $s; do_hook('read_body_header'); formatToolbar($mailbox, $passed_id, $passed_ent_id, $message, $color); - echo '
'; - echo '
'; + echo ''; + echo ''."\n"; + echo ''; } /** @@ -630,13 +630,13 @@ function formatMenubar($aMailbox, $passed_id, $passed_ent_id, $message, $removed } // Show Alt URI for Draft/Sent if (isset($comp_alt_string)) - $menu_row .= getButton('SUBMIT', $new_button, $comp_alt_string, $on_click) . "\n"; + $menu_row .= getButton('submit', $new_button, $comp_alt_string, $on_click) . "\n"; - $menu_row .= getButton('SUBMIT', 'smaction_reply', _("Reply"), $on_click) . "\n"; - $menu_row .= getButton('SUBMIT', 'smaction_reply_all', _("Reply All"), $on_click) ."\n"; - $menu_row .= getButton('SUBMIT', 'smaction_forward', _("Forward"), $on_click); + $menu_row .= getButton('submit', 'smaction_reply', _("Reply"), $on_click) . "\n"; + $menu_row .= getButton('submit', 'smaction_reply_all', _("Reply All"), $on_click) ."\n"; + $menu_row .= getButton('submit', 'smaction_forward', _("Forward"), $on_click); if ($enable_forward_as_attachment) - $menu_row .= '' . _("As Attachment") .'  '."\n"; + $menu_row .= '' . _("As Attachment") .'  '."\n"; $menu_row .= ' '; @@ -648,10 +648,10 @@ function formatMenubar($aMailbox, $passed_id, $passed_ent_id, $message, $removed if (!(isset($passed_ent_id) && $passed_ent_id)) { $menu_row .= addHidden('mailbox', $aMailbox['NAME']); $menu_row .= addHidden('msg[0]', $passed_id); - $menu_row .= getButton('SUBMIT', 'delete', _("Delete")); - $menu_row .= '' . _("Bypass Trash"); + $menu_row .= getButton('submit', 'delete', _("Delete")); + $menu_row .= '' . _("Bypass Trash"); } else { - $menu_row .= getButton('SUBMIT', 'delete', _("Delete"), '', FALSE) . "\n"; // delete button is disabled + $menu_row .= getButton('submit', 'delete', _("Delete"), '', FALSE) . "\n"; // delete button is disabled } $menu_row .= ''; @@ -676,7 +676,7 @@ function formatMenubar($aMailbox, $passed_id, $passed_ent_id, $message, $removed } $menu_row .= ' '; - $menu_row .= getButton('SUBMIT', 'moveButton',_("Move")) . "\n" . ''; + $menu_row .= getButton('submit', 'moveButton',_("Move")) . "\n" . ''; } $menu_row .= ''; @@ -715,9 +715,9 @@ function formatToolbar($mailbox, $passed_id, $passed_ent_id, $message, $color) { $url = $base_uri.'src/view_header.php?'.$query_string; - $s = "\n" . - html_tag( 'td', '', 'right', '', 'VALIGN="MIDDLE" WIDTH="20%"' ) . '' . _("Options") . ":  \n" . - html_tag( 'td', '', 'left', '', 'VALIGN="MIDDLE" WIDTH="80%"' ) . '' . + $s = "\n" . + html_tag( 'td', '', 'right', '', 'valign="middle" width="20%"' ) . '' . _("Options") . ":  \n" . + html_tag( 'td', '', 'left', '', 'valign="middle" width="80%"' ) . '' . ''._("View Full Header").''; /* Output the printer friendly link if we are in subtle mode. */ @@ -725,8 +725,8 @@ function formatToolbar($mailbox, $passed_id, $passed_ent_id, $message, $color) { printer_friendly_link($mailbox, $passed_id, $passed_ent_id); echo $s; do_hook("read_body_header_right"); - $s = "\n" . - "\n"; + $s = "\n" . + "\n"; echo $s; } @@ -879,7 +879,7 @@ $cnt = count($ent_ar); for ($i = 0; $i < $cnt; $i++) { $messagebody .= formatBody($imapConnection, $message, $color, $wrap_at, $ent_ar[$i], $passed_id, $mailbox); if ($i != $cnt-1) { - $messagebody .= '
'; + $messagebody .= '
'; } } @@ -894,7 +894,7 @@ echo ' '; @@ -902,8 +902,8 @@ echo '
'; // echo ' '; echo html_tag( 'table' ,'' , 'left', '', 'cellpadding="1" cellspacing="5" border="0"' ); -echo ' ' . html_tag( 'td', '
'. $messagebody."\n", 'left') +echo ' ' . html_tag( 'td', '
'. $messagebody."\n", 'left') . ''; echo '
'; echo '
'; echo ' '; echo ' '; -echo ''."\n"; +echo ''."\n"; $attachmentsdisplay = formatAttachments($message,$ent_ar,$mailbox, $passed_id); if ($attachmentsdisplay) { @@ -920,8 +920,8 @@ if ($attachmentsdisplay) { echo ' '; echo ' '; echo ' '; - echo ''; + echo ''; } echo ''; @@ -938,10 +938,10 @@ if (($attachment_common_show_images) && echo html_tag( 'table', "\n" . html_tag( 'tr', "\n" . - html_tag( 'td', '' ."\n", 'left' + html_tag( 'td', '' ."\n", 'left' ) ) , - 'center', '', 'cellspacing=0 border="0" cellpadding="2"'); + 'center', '', 'cellspacing="0" border="0" cellpadding="2"'); } }