fixes for changed attachment handling
[squirrelmail.git] / src / vcard.php
index e6343006b2804e278a9a9cea0d44219db3cc6a68..21b5133861802312ba463d9d5d6a5c76b39d9dec 100644 (file)
@@ -28,23 +28,17 @@ echo '<br><table width="100%" border="0" cellspacing="0" cellpadding="2" ' .
         '<tr><td bgcolor="' . $color[0] . '">' .
         '<b><center>' .
         _("Viewing a Business Card") . " - ";
-if (isset($where) && isset($what)) {
-    // from a search
-    echo '<a href="../src/read_body.php?mailbox=' . urlencode($mailbox) .
-            '&amp;passed_id=' . $passed_id . '&amp;where=' . urlencode($where) .
-            '&amp;what=' . urlencode($what). '">' . _("View message") . '</a>';
-} else {
-    echo '<a href="../src/read_body.php?mailbox=' . urlencode($mailbox) .
-        '&amp;passed_id=' . $passed_id . '&amp;startMessage=' . $startMessage .
-        '&amp;show_more=0">' . _("View message") . '</a>';
-}
+$msg_url = 'read_body.php?' . $QUERY_STRING;
+$msg_url = set_url_var($msg_url, 'ent_id', 0);
+echo '<a href="'.$msg_url.'">'. _("View message") . '</a>';
+
 echo '</center></b></td></tr>';
 
 $message = sqimap_get_message($imapConnection, $passed_id, $mailbox);
 
-$entity_vcard = getEntity($message,$passed_ent_id);
+$entity_vcard = getEntity($message,$ent_id);
 
-$vcard = mime_fetch_body ($imapConnection, $passed_id, $passed_ent_id);
+$vcard = mime_fetch_body ($imapConnection, $passed_id, $ent_id);
 $vcard = decodeBody($vcard, $entity_vcard->header->encoding);
 $vcard = explode ("\n",$vcard);
 foreach ($vcard as $l) {