- if ($where && $what) {
- // from a search
- $body .= "<TT> <A HREF=\"../src/download.php?where=".urlencode($where)."&what=".urlencode($what)."&passed_id=$id&mailbox=$urlMailbox&passed_ent_id=$ent\">" . $display_filename . "</A> (TYPE: $type0/$type1)";
- } else {
- $body .= "<TT> <A HREF=\"../src/download.php?passed_id=$id&mailbox=$urlMailbox&passed_ent_id=$ent\">" . $display_filename . "</A> (TYPE: $type0/$type1)";
- }
+
+ $DefaultLink =
+ "../src/download.php?startMessage=$startMessage&passed_id=$id&mailbox=$urlMailbox&passed_ent_id=$ent";
+ if ($where && $what)
+ $DefaultLink .= '&where=' . urlencode($where) . '&what=' . urlencode($what);
+ $Links['download link']['text'] = _('download');
+ $Links['download link']['href'] =
+ "../src/download.php?absolute_dl=true&passed_id=$id&mailbox=$urlMailbox&passed_ent_id=$ent";
+ $ImageURL = '';
+
+ $HookResults = do_hook("attachment $type0/$type1", $Links,
+ $startMessage, $id, $urlMailbox, $ent, $DefaultLink,
+ $display_filename, $where, $what);
+
+ $Links = $HookResults[1];
+ $DefaultLink = $HookResults[6];
+
+ $body .= '<TR><TD> </TD><TD>';
+ $body .= "<A HREF=\"$DefaultLink\">$display_filename</A> </TD>";
+ $body .= '<TD><SMALL><b>' . show_readable_size($message->header->size) .
+ '</b> </small></TD>';
+ $body .= "<TD><SMALL>[ $type0/$type1 ] </SMALL></TD>";
+ $body .= '<TD><SMALL>';