From: pdontthink Date: Wed, 10 Oct 2007 18:49:31 +0000 (+0000) Subject: Fix issue with adding attachments in PHP 4.x environments (#1805471) X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=1b70e7a56d7f8223a695dbae2a90f59ff420f3b5;p=squirrelmail.git Fix issue with adding attachments in PHP 4.x environments (#1805471) git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@12732 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/src/addrbook_search_html.php b/src/addrbook_search_html.php index 0322132f..56e7956b 100644 --- a/src/addrbook_search_html.php +++ b/src/addrbook_search_html.php @@ -42,15 +42,19 @@ sqgetGlobalVar('backend', $backend, SQ_POST); * Insert hidden data */ function addr_insert_hidden() { - global $body, $subject, $send_to, $send_to_cc, $send_to_bcc, $mailbox, - $request_mdn, $request_dr, $identity, $session; + global $body, $subject, $send_to, $send_to_cc, $send_to_bcc, $mailbox, $mailprio, + $request_mdn, $request_dr, $identity, $session, $composeMessage; +//FIXME Do not echo HTML from the core. This file already uses templates mostly, so why are we echoing here at all?!? if (substr($body, 0, 1) == "\r") { echo addHidden('body', "\n".$body); } else { echo addHidden('body', $body); } + if (is_object($composeMessage) && $composeMessage->entities) + echo addHidden('attachments', serialize($composeMessage->entities)); + echo addHidden('session', $session). addHidden('subject', $subject). addHidden('send_to', $send_to). @@ -166,6 +170,7 @@ if ($addrquery == '' || ! empty($listall)) { } if ($addrquery == '' || sizeof($res) == 0) { +//FIXME don't echo HTML from core -- especially convoluted given that there is template code immediately above AND below this block echo '
'. addForm('compose.php','post','k'); addr_insert_hidden();