From imp Sat Feb 01 22:01:51 2003 From: "W. Tasin" Date: Sat, 01 Feb 2003 22:01:51 +0000 To: imp Subject: [imp] Adding to addressbook fails X-MARC-Message: https://marc.info/?l=imp&m=104413695918197 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--------------090204090304030801050701" This is a multi-part message in MIME format. --------------090204090304030801050701 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Hello, adding a person by clicking the "addressbook-icon" in a message view fails for me (CVS-HEAD). The following patch correct this (I hope this is the right way to handle the problem). Ciao Walter --------------090204090304030801050701 Content-Type: text/plain; name="diff.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="diff.patch" --- /home/tasin/horde/CVS-HORDE/horde/imp/message.php Sat Feb 1 02:57:58 2003 +++ message.php Sat Feb 1 22:32:09 2003 @@ -302,10 +302,13 @@ /* For the self URL link, we can't trust the index in the query string as it may have changed if we deleted/copied/moved messages. We may need other stuff in the query string, so we need to do an add/remove of 'index'. */ -$selfURL = Horde::removeParameter(Horde::selfUrl(true), array('index', 'actionID')); +$selfURL = Horde::removeParameter(Horde::selfUrl(true), array('index', 'actionID', 'name', 'address')); $selfURL = Horde::addParameter($selfURL, 'index', $index); $headersURL = Horde::removeParameter($selfURL, array('show_all_headers', 'show_list_headers')); +/* Generate the message link. */ +$message_link = Horde::removeParameter($selfURL, array('start', 'show_all_headers', 'show_list_headers')); + /* Determine previous message index. */ if (($prev_msg = $imp_mailbox->messageIndices(-1))) { $prev_link = IMP_Search::generateSearchUrl('message.php', $prev_msg['thismailbox']); @@ -389,18 +392,18 @@ } /* Build From address links. */ -$imp_headers->buildAddressLinks('from', $view_link, true, $addrIcon); +$imp_headers->buildAddressLinks('from', $message_link, true, $addrIcon); /* Build To/Cc/Bcc links. */ $address_headers = array('to' => 'toaddress', 'cc' => 'ccaddress', 'bcc' => 'bccaddress'); foreach ($address_headers as $key => $val) { - if ($imp_headers->buildAddressLinks($key, $view_link, true, $addrIcon)) { + if ($imp_headers->buildAddressLinks($key, $message_link, true, $addrIcon)) { $msgAddresses .= $imp_headers->getOb($val); } } /* Build Reply-To address links. */ -if (($reply_to = $imp_headers->buildAddressLinks('reply_to', $view_link, false, $addrIcon))) { +if (($reply_to = $imp_headers->buildAddressLinks('reply_to', $message_link, false, $addrIcon))) { if (!($from = $imp_headers->getValue('from')) || ($from != $reply_to)) { $imp_headers->setValue('Reply-to', $reply_to); } else { --------------090204090304030801050701 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline -- IMP mailing list Frequently Asked Questions: http://horde.org/faq/ To unsubscribe, mail: imp-unsubscribe@lists.horde.org --------------090204090304030801050701--