aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/includes/ucp/ucp_pm_compose.php38
1 files changed, 10 insertions, 28 deletions
diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php
index 78b2e7a348..05243e3d7a 100644
--- a/phpBB/includes/ucp/ucp_pm_compose.php
+++ b/phpBB/includes/ucp/ucp_pm_compose.php
@@ -751,37 +751,19 @@ function compose_pm($id, $mode, $action, $user_folders = array())
$folder_url = append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&folder=' . $folder_id);
}
+ $return_box_url = ($action === 'post' || $action === 'edit') ? $outbox_folder_url : $inbox_folder_url;
+ $return_box_lang = ($action === 'post' || $action === 'edit') ? 'PM_OUTBOX' : 'PM_INBOX';
+
+
$message = $user->lang['MESSAGE_STORED'] . '<br /><br />' . sprintf($user->lang['VIEW_PRIVATE_MESSAGE'], '<a href="' . $return_message_url . '">', '</a>');
- switch ($action)
- {
- case 'post':
- case 'edit':
- if ($folder_url)
- {
- $message .= '<br /><br />' . sprintf($user->lang['CLICK_RETURN_FOLDER'], '<a href="' . $folder_url . '">', '</a>', $user_folders[$folder_id]['folder_name']);
- $message .= '<br /><br />' . sprintf($user->lang['CLICK_GOTO_FOLDER'], '<a href="' . $outbox_folder_url . '">', '</a>', $user->lang['PM_OUTBOX']);
- }
- else
- {
- $message .= '<br /><br />' . sprintf($user->lang['CLICK_RETURN_FOLDER'], '<a href="' . $outbox_folder_url . '">', '</a>', $user->lang['PM_OUTBOX']);
- }
- break;
- case 'quote':
- case 'quotepost':
- case 'reply':
- case 'forward':
- if ($folder_url)
- {
- $message .= '<br /><br />' . sprintf($user->lang['CLICK_RETURN_FOLDER'], '<a href="' . $folder_url . '">', '</a>', $user_folders[$folder_id]['folder_name']);
- $message .= '<br /><br />' . sprintf($user->lang['CLICK_GOTO_FOLDER'], '<a href="' . $inbox_folder_url . '">', '</a>', $user->lang['PM_INBOX']);
- }
- else
- {
- $message .= '<br /><br />' . sprintf($user->lang['CLICK_RETURN_FOLDER'], '<a href="' . $inbox_folder_url . '">', '</a>', $user->lang['PM_INBOX']);
- }
- break;
+ $last_click_type = 'CLICK_RETURN_FOLDER';
+ if ($folder_url)
+ {
+ $message .= '<br /><br />' . sprintf($user->lang['CLICK_RETURN_FOLDER'], '<a href="' . $folder_url . '">', '</a>', $user_folders[$folder_id]['folder_name']);
+ $last_click_type = 'CLICK_GOTO_FOLDER';
}
+ $message .= '<br /><br />' . sprintf($user->lang[$last_click_type], '<a href="' . $return_box_url . '">', '</a>', $user->lang[$return_box_lang]);
meta_refresh(3, $return_message_url);
trigger_error($message);