$include_self_reply_all =
getPref($data_dir, $username, 'include_self_reply_all', SMPREF_ON);
+$return_to_message_after_reply =
+ getPref($data_dir, $username, 'return_to_message_after_reply', SMPREF_OFF);
+
/* Page selector options */
$page_selector = getPref($data_dir, $username, 'page_selector', SMPREF_ON);
$compact_paginator = getPref($data_dir, $username, 'compact_paginator', SMPREF_OFF);
'refresh' => SMOPT_REFRESH_NONE
);
+ $optvals[SMOPT_GRP_COMPOSE_REPLY][] = array(
+ 'name' => 'return_to_message_after_reply',
+ 'caption' => _("Return to Original Message After Replying"),
+ 'type' => SMOPT_TYPE_BOOLEAN,
+ 'refresh' => SMOPT_REFRESH_NONE
+ );
+
$optvals[SMOPT_GRP_COMPOSE_REPLY][] = array(
'name' => 'sig_first',
'caption' => _("Prepend Signature before Reply/Forward Text"),
exit();
} else {
if ( !isset($pageheader_sent) || !$pageheader_sent ) {
- header("Location: $location/right_main.php?mailbox=$urlMailbox".
- "&startMessage=$startMessage&mail_sent=$mail_sent");
+ global $return_to_message_after_reply;
+ if (($action === 'reply' || $action === 'reply_all') && $return_to_message_after_reply)
+ header("Location: $location/read_body.php?passed_id=$passed_id&mailbox=$urlMailbox".
+ "&startMessage=$startMessage&mail_sent=$mail_sent");
+ else
+ header("Location: $location/right_main.php?mailbox=$urlMailbox".
+ "&startMessage=$startMessage&mail_sent=$mail_sent");
} else {
//FIXME: DON'T ECHO HTML FROM CORE!
echo ' <br><br><div style="text-align: center;"><a href="' . $location