aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
authorHenry Sudhof <kellanved@phpbb.com>2007-07-27 17:01:37 +0000
committerHenry Sudhof <kellanved@phpbb.com>2007-07-27 17:01:37 +0000
commit92c25a3e6c99bb071710b2f5dc5939262924233c (patch)
tree8871f65ac15eb1feb05b6e2fc3f07871da3b0fe8 /phpBB/includes
parent3829c40b5715187c05d919e56fd37e36a9eb9886 (diff)
downloadforums-92c25a3e6c99bb071710b2f5dc5939262924233c.tar
forums-92c25a3e6c99bb071710b2f5dc5939262924233c.tar.gz
forums-92c25a3e6c99bb071710b2f5dc5939262924233c.tar.bz2
forums-92c25a3e6c99bb071710b2f5dc5939262924233c.tar.xz
forums-92c25a3e6c99bb071710b2f5dc5939262924233c.zip
#13791 - I hope this works :D
git-svn-id: file:///svn/phpbb/trunk@7960 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/functions_privmsgs.php6
-rw-r--r--phpBB/includes/ucp/ucp_pm_viewfolder.php18
-rw-r--r--phpBB/includes/ucp/ucp_pm_viewmessage.php1
3 files changed, 16 insertions, 9 deletions
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 .= '<option' . (($f_id != PRIVMSGS_INBOX) ? ' class="sep"' : '') . ' value="' . $f_id . '">';
- $s_folder_move_options .= sprintf($user->lang['MOVE_MARKED_TO_FOLDER'], $folder_ary['folder_name']);
- $s_folder_move_options .= (($folder_ary['unread_messages']) ? ' [' . $folder_ary['unread_messages'] . '] ' : '') . '</option>';
+ $s_folder_move_options .= '<option' . (($f_id != PRIVMSGS_INBOX) ? ' class="sep"' : '') . ' value="' . $f_id . '">';
+ $s_folder_move_options .= sprintf($user->lang['MOVE_MARKED_TO_FOLDER'], $folder_ary['folder_name']);
+ $s_folder_move_options .= (($folder_ary['unread_messages']) ? ' [' . $folder_ary['unread_messages'] . '] ' : '') . '</option>';
+ }
}
-
$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&amp;f=$folder_id&amp;p=" . $message_row['msg_id'] . "&amp;view=print" : '',
'U_FORWARD_PM' => ($config['forward_pm'] && $auth->acl_get('u_pm_forward')) ? "$url&amp;mode=compose&amp;action=forward&amp;f=$folder_id&amp;p=" . $message_row['msg_id'] : '')