1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-02-12 11:40:26 +01:00

#13791 - I hope this works :D

git-svn-id: file:///svn/phpbb/trunk@7960 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Henry Sudhof 2007-07-27 17:01:37 +00:00
parent 3829c40b57
commit 92c25a3e6c
7 changed files with 28 additions and 16 deletions

View File

@ -285,6 +285,8 @@ p a {
<li>[Fix] Implemented correct left/right floating within ACP in regard to RTL languages (Bug #13777)</li>
<li>[Fix] Fixing session problems when using MySQL strict mode in conjunction with very long browser agent string (Bug #13827)</li>
<li>[Fix] Disallow post/pm subjects entirely made up from non-printable chars and whitespaces (Bug #13800)</li>
<li>[Fix] Allow moving private messages from the sentbox (Bug #13791)</li>
</ul>
</div>

View File

@ -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;

View File

@ -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

View File

@ -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'] : '')

View File

@ -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',

View File

@ -98,7 +98,7 @@
<!-- IF U_NEXT_PM --><a href="{U_NEXT_PM}" class="right-box {S_CONTENT_FLOW_END}">{L_VIEW_NEXT_PM}</a><!-- ENDIF -->
<!-- IF S_MARK_OPTIONS --><label for="mark_option"><select name="mark_option" id="mark_option">{S_MARK_OPTIONS}</select></label>&nbsp;<input class="button2" type="submit" name="submit_mark" value="{L_GO}" /><!-- ENDIF -->
<!-- IF not S_UNREAD --><label for="dest_folder"><!-- IF S_VIEW_MESSAGE -->{L_MOVE_TO_FOLDER}: <!-- ELSE -->{L_MOVE_MARKED_TO_FOLDER}<!-- ENDIF --> <select name="dest_folder" id="dest_folder">{S_TO_FOLDER_OPTIONS}</select></label> <input class="button2" type="submit" name="move_pm" value="{L_GO}" /><!-- ENDIF -->
<!-- IF not S_UNREAD and not S_SPECIAL_FOLDER --><label for="dest_folder"><!-- IF S_VIEW_MESSAGE -->{L_MOVE_TO_FOLDER}: <!-- ELSE -->{L_MOVE_MARKED_TO_FOLDER}<!-- ENDIF --> <select name="dest_folder" id="dest_folder">{S_TO_FOLDER_OPTIONS}</select></label> <input class="button2" type="submit" name="move_pm" value="{L_GO}" /><!-- ENDIF -->
<input type="hidden" name="marked_msg_id[]" value="{MSG_ID}" />
<input type="hidden" name="cur_folder_id" value="{CUR_FOLDER_ID}" />
<input type="hidden" name="p" value="{MSG_ID}" />

View File

@ -18,12 +18,14 @@
</td>
<td align="{S_CONTENT_FLOW_END}" nowrap="nowrap">
<!-- IF S_VIEW_MESSAGE -->
<form name="movepm" method="post" action="{S_PM_ACTION}" style="margin:0px">
<input type="hidden" name="marked_msg_id[]" value="{MSG_ID}" />
<input type="hidden" name="cur_folder_id" value="{CUR_FOLDER_ID}" />
<input type="hidden" name="p" value="{MSG_ID}" />
<select name="dest_folder">{S_TO_FOLDER_OPTIONS}</select>&nbsp;<input class="btnlite" type="submit" name="move_pm" value="{L_MOVE_TO_FOLDER}" />
</form>
<!-- IF not S_SPECIAL_FOLDER -->
<form name="movepm" method="post" action="{S_PM_ACTION}" style="margin:0px">
<input type="hidden" name="marked_msg_id[]" value="{MSG_ID}" />
<input type="hidden" name="cur_folder_id" value="{CUR_FOLDER_ID}" />
<input type="hidden" name="p" value="{MSG_ID}" />
<select name="dest_folder">{S_TO_FOLDER_OPTIONS}</select>&nbsp;<input class="btnlite" type="submit" name="move_pm" value="{L_MOVE_TO_FOLDER}" />
</form>
<!-- ENDIF -->
<!-- ELSE -->
<form name="sortmsg" method="post" action="{S_PM_ACTION}" style="margin:0px">
<span class="gensmall">{L_DISPLAY_MESSAGES}:</span> {S_SELECT_SORT_DAYS} <span class="gensmall">{L_SORT_BY}</span> {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR} <input class="btnlite" type="submit" name="sort" value="{L_GO}" />