diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html
index 8260477494..3d76fd6e19 100644
--- a/phpBB/docs/CHANGELOG.html
+++ b/phpBB/docs/CHANGELOG.html
@@ -285,6 +285,8 @@ p a {
[Fix] Implemented correct left/right floating within ACP in regard to RTL languages (Bug #13777)
[Fix] Fixing session problems when using MySQL strict mode in conjunction with very long browser agent string (Bug #13827)
[Fix] Disallow post/pm subjects entirely made up from non-printable chars and whitespaces (Bug #13800)
+ [Fix] Allow moving private messages from the sentbox (Bug #13791)
+
diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php
index 90ffe4a412..ca06e05b39 100644
--- a/phpBB/includes/functions_privmsgs.php
+++ b/phpBB/includes/functions_privmsgs.php
@@ -760,7 +760,7 @@ function move_pm($user_id, $message_limit, $move_msg_ids, $dest_folder, $cur_fol
}
if (sizeof($move_msg_ids) && !in_array($dest_folder, array(PRIVMSGS_NO_BOX, PRIVMSGS_OUTBOX, PRIVMSGS_SENTBOX)) &&
- !in_array($cur_folder_id, array(PRIVMSGS_NO_BOX, PRIVMSGS_OUTBOX, PRIVMSGS_SENTBOX)) && $cur_folder_id != $dest_folder)
+ !in_array($cur_folder_id, array(PRIVMSGS_NO_BOX, PRIVMSGS_OUTBOX)) && $cur_folder_id != $dest_folder)
{
// We have to check the destination folder ;)
if ($dest_folder != PRIVMSGS_INBOX)
@@ -832,6 +832,10 @@ function move_pm($user_id, $message_limit, $move_msg_ids, $dest_folder, $cur_fol
$db->sql_query($sql);
}
}
+ }
+ else if (in_array($cur_folder_id, array(PRIVMSGS_NO_BOX, PRIVMSGS_OUTBOX)))
+ {
+ trigger_error('CANNOT_MOVE_SPECIAL');
}
return $num_moved;
diff --git a/phpBB/includes/ucp/ucp_pm_viewfolder.php b/phpBB/includes/ucp/ucp_pm_viewfolder.php
index be79b522ef..79b663a39d 100644
--- a/phpBB/includes/ucp/ucp_pm_viewfolder.php
+++ b/phpBB/includes/ucp/ucp_pm_viewfolder.php
@@ -65,18 +65,20 @@ function view_folder($id, $mode, $folder_id, $folder)
// We do the folder moving options here too, for template authors to use...
$s_folder_move_options = '';
- foreach ($folder as $f_id => $folder_ary)
+ if ($folder_id != PRIVMSGS_NO_BOX && $folder_id != PRIVMSGS_OUTBOX)
{
- if ($f_id == PRIVMSGS_OUTBOX || $f_id == PRIVMSGS_SENTBOX || $f_id == $folder_id)
+ foreach ($folder as $f_id => $folder_ary)
{
- continue;
+ if ($f_id == PRIVMSGS_OUTBOX || $f_id == PRIVMSGS_SENTBOX || $f_id == $folder_id)
+ {
+ continue;
+ }
+
+ $s_folder_move_options .= '';
}
-
- $s_folder_move_options .= '';
}
-
$friend = $foe = array();
// Get friends and foes
diff --git a/phpBB/includes/ucp/ucp_pm_viewmessage.php b/phpBB/includes/ucp/ucp_pm_viewmessage.php
index f4baa4cb9c..8fab63bc45 100644
--- a/phpBB/includes/ucp/ucp_pm_viewmessage.php
+++ b/phpBB/includes/ucp/ucp_pm_viewmessage.php
@@ -203,6 +203,7 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
'S_HAS_ATTACHMENTS' => (sizeof($attachments)) ? true : false,
'S_DISPLAY_NOTICE' => $display_notice && $message_row['message_attachment'],
'S_AUTHOR_DELETED' => ($author_id == ANONYMOUS) ? true : false,
+ 'S_SPECIAL_FOLDER' => in_array($folder_id, array(PRIVMSGS_NO_BOX, PRIVMSGS_OUTBOX)),
'U_PRINT_PM' => ($config['print_pm'] && $auth->acl_get('u_pm_printpm')) ? "$url&f=$folder_id&p=" . $message_row['msg_id'] . "&view=print" : '',
'U_FORWARD_PM' => ($config['forward_pm'] && $auth->acl_get('u_pm_forward')) ? "$url&mode=compose&action=forward&f=$folder_id&p=" . $message_row['msg_id'] : '')
diff --git a/phpBB/language/en/ucp.php b/phpBB/language/en/ucp.php
index 573102d6ca..34040317a0 100644
--- a/phpBB/language/en/ucp.php
+++ b/phpBB/language/en/ucp.php
@@ -105,6 +105,7 @@ $lang = array_merge($lang, array(
'CANNOT_EDIT_MESSAGE_TIME' => 'You can no longer edit or delete that message.',
'CANNOT_MOVE_TO_SAME_FOLDER'=> 'Messages can not be moved to the folder you want to remove.',
+ 'CANNOT_MOVE_FROM_SPECIAL' => 'Messages can not be moved from the outbox.',
'CANNOT_RENAME_FOLDER' => 'This folder can not be renamed.',
'CANNOT_REMOVE_FOLDER' => 'This folder can not be removed.',
'CHANGE_DEFAULT_GROUP' => 'Change default group',
diff --git a/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html b/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html
index 838bcda09a..c21d4b0213 100644
--- a/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html
+++ b/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html
@@ -98,7 +98,7 @@
{L_VIEW_NEXT_PM}
-
+
diff --git a/phpBB/styles/subsilver2/template/ucp_pm_message_footer.html b/phpBB/styles/subsilver2/template/ucp_pm_message_footer.html
index 61d3c8300e..b65ab40129 100644
--- a/phpBB/styles/subsilver2/template/ucp_pm_message_footer.html
+++ b/phpBB/styles/subsilver2/template/ucp_pm_message_footer.html
@@ -18,12 +18,14 @@
-
+
+
+
|