1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-05-08 00:25:19 +02:00

Ability to empty a user's outbox from the user ACP quick tools.

git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9767 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Chris Smith 2009-07-17 11:27:50 +00:00
parent 2f9f52b151
commit 6cacfce937
4 changed files with 58 additions and 2 deletions

View File

@ -202,6 +202,7 @@
<li>[Feature] Add unread posts quick search option (Bug #46765 - Patch by rxu)</li>
<li>[Feature] Add option to disable remote upload avatars (Bug #45375 - Patch by nickvergessen)</li>
<li>[Feature] Ability to delete warnings and keep warnings permanently (Bug #43375 - Patch by nickvergessen)</li>
<li>[Feature] Ability to empty a user's outbox from the user ACP quick tools.</li>
</ul>
<a name="v304"></a><h3>1.ii. Changes since 3.0.4</h3>

View File

@ -495,6 +495,56 @@ class acp_users
break;
case 'deloutbox':
if (confirm_box(true))
{
$msg_ids = array();
$lang = 'EMPTY';
$sql = 'SELECT msg_id
FROM ' . PRIVMSGS_TO_TABLE . "
WHERE author_id = $user_id
AND folder_id = " . PRIVMSGS_OUTBOX;
$result = $db->sql_query($sql);
if ($row = $db->sql_fetchrow($result))
{
if (!function_exists('delete_pm'))
{
include($phpbb_root_path . 'includes/functions_privmsgs.' . $phpEx);
}
do
{
$msg_ids[] = (int) $row['msg_id'];
}
while ($row = $db->sql_fetchrow($result));
$db->sql_freeresult($result);
delete_pm($user_id, $msg_ids, PRIVMSGS_OUTBOX);
add_log('admin', 'LOG_USER_DEL_OUTBOX', $user_row['username']);
$lang = 'EMPTIED';
}
$db->sql_freeresult($result);
trigger_error($user->lang['USER_OUTBOX_' . $lang] . adm_back_link($this->u_action . '&amp;u=' . $user_id));
}
else
{
confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields(array(
'u' => $user_id,
'i' => $id,
'mode' => $mode,
'action' => $action,
'update' => true))
);
}
break;
case 'moveposts':
if (!check_form_key($form_name))
@ -842,7 +892,7 @@ class acp_users
if ($user_id == $user->data['user_id'])
{
$quick_tool_ary = array('delsig' => 'DEL_SIG', 'delavatar' => 'DEL_AVATAR', 'moveposts' => 'MOVE_POSTS', 'delposts' => 'DEL_POSTS', 'delattach' => 'DEL_ATTACH');
$quick_tool_ary = array('delsig' => 'DEL_SIG', 'delavatar' => 'DEL_AVATAR', 'moveposts' => 'MOVE_POSTS', 'delposts' => 'DEL_POSTS', 'delattach' => 'DEL_ATTACH', 'deloutbox' => 'DEL_OUTBOX');
if ($user_row['user_new'])
{
$quick_tool_ary['leave_nr'] = 'LEAVE_NR';
@ -862,12 +912,13 @@ class acp_users
$quick_tool_ary += array('active' => (($user_row['user_type'] == USER_INACTIVE) ? 'ACTIVATE' : 'DEACTIVATE'));
}
$quick_tool_ary += array('delsig' => 'DEL_SIG', 'delavatar' => 'DEL_AVATAR', 'moveposts' => 'MOVE_POSTS', 'delposts' => 'DEL_POSTS', 'delattach' => 'DEL_ATTACH');
$quick_tool_ary += array('delsig' => 'DEL_SIG', 'delavatar' => 'DEL_AVATAR', 'moveposts' => 'MOVE_POSTS', 'delposts' => 'DEL_POSTS', 'delattach' => 'DEL_ATTACH', 'deloutbox' => 'DEL_OUTBOX');
if ($config['email_enable'] && ($user_row['user_type'] == USER_NORMAL || $user_row['user_type'] == USER_INACTIVE))
{
$quick_tool_ary['reactivate'] = 'FORCE';
}
if ($user_row['user_new'])
{
$quick_tool_ary['leave_nr'] = 'LEAVE_NR';

View File

@ -675,6 +675,7 @@ $lang = array_merge($lang, array(
'LOG_USER_DELETED' => '<strong>Deleted user</strong><br />» %s',
'LOG_USER_DEL_ATTACH' => '<strong>Removed all attachments made by the user</strong><br />» %s',
'LOG_USER_DEL_AVATAR' => '<strong>Removed user avatar</strong><br />» %s',
'LOG_USER_DEL_OUTBOX' => '<strong>Emptied user outbox</strong><br />» %s',
'LOG_USER_DEL_POSTS' => '<strong>Removed all posts made by the user</strong><br />» %s',
'LOG_USER_DEL_SIG' => '<strong>Removed user signature</strong><br />» %s',
'LOG_USER_INACTIVE' => '<strong>User deactivated</strong><br />» %s',

View File

@ -103,6 +103,7 @@ $lang = array_merge($lang, array(
'USER_ADMIN_DEACTIVED' => 'User deactivated successfully.',
'USER_ADMIN_DEL_ATTACH' => 'Delete all attachments',
'USER_ADMIN_DEL_AVATAR' => 'Delete avatar',
'USER_ADMIN_DEL_OUTBOX' => 'Empty PM outbox',
'USER_ADMIN_DEL_POSTS' => 'Delete all posts',
'USER_ADMIN_DEL_SIG' => 'Delete signature',
'USER_ADMIN_EXPLAIN' => 'Here you can change your users information and certain specific options.',
@ -122,6 +123,8 @@ $lang = array_merge($lang, array(
'USER_GROUP_SPECIAL' => 'Pre-defined groups user is a member of',
'USER_LIFTED_NR' => 'Successfully removed the users newly registered status.',
'USER_NO_ATTACHMENTS' => 'There are no attached files to display.',
'USER_OUTBOX_EMPTIED' => 'Successfully emptied users private message outbox.',
'USER_OUTBOX_EMPTY' => 'The users private message outbox was already empty.',
'USER_OVERVIEW_UPDATED' => 'User details updated.',
'USER_POSTS_DELETED' => 'Successfully removed all posts made by this user.',
'USER_POSTS_MOVED' => 'Successfully moved users posts to target forum.',