--- squirrelmail-1.4.3a/src/compose.php 2004-05-31 13:32:34.000000000 -0400 +++ /var/www/squirrelmail-1.4.3a/src/compose.php 2005-02-19 02:56:31.000000000 -0400 @@ -389,17 +389,42 @@ } unset($compose_messages[$session]); if ( isset($delete_draft)) { - Header("Location: $location/delete_message.php?mailbox=" . urlencode( $draft_folder ). - "&message=$delete_draft&sort=$sort&startMessage=1&mail_sent=yes"); + if(!isset($pageheader_sent) && !$pageheader_sent) { + Header("Location: $location/delete_message.php?mailbox=" + . urlencode( $draft_folder ) . + "&message=$delete_draft&sort=$sort&startMessage=1" + . "&mail_sent=yes"); + } + else { + echo '

'; + } exit(); } if ($compose_new_win == '1') { - - Header("Location: $location/compose.php?mail_sent=yes"); + if(!isset($pageheader_sent) && !$pageheader_sent) { + Header("Location: $location/compose.php?mail_sent=yes"); + } + else { + echo '

'; + } } else { - Header("Location: $location/right_main.php?mailbox=$urlMailbox&sort=$sort". - "&startMessage=$startMessage"); + if(!isset($pageheader_sent) && !$pageheader_sent) { + Header("Location: $location/right_main.php?mailbox=" + ."$urlMailbox&sort=$sort"."&startMessage=$startMessage"); + } + else { + echo '

'; + } } } else { if ($compose_new_win == '1') { @@ -1025,6 +1050,8 @@ showComposeButtonRow(); } + do_hook('compose_before_textarea'); + /* why this distinction? */ if ($compose_new_win == '1') { echo ' ' . "\n" .