mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-06 08:47:45 +02:00
- a bunch of fixes
- added todos to the updater to make sure i do not forget. :) git-svn-id: file:///svn/phpbb/trunk@6698 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -180,7 +180,7 @@ function mcp_resync_topics($topic_ids)
|
||||
trigger_error($user->lang['NO_TOPIC_SELECTED']);
|
||||
}
|
||||
|
||||
if (check_ids($topic_ids, TOPICS_TABLE, 'topic_id', array('m_')))
|
||||
if (!check_ids($topic_ids, TOPICS_TABLE, 'topic_id', array('m_')))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@@ -63,7 +63,7 @@ function mcp_front_view($id, $mode, $action)
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$sql = 'SELECT p.post_id, p.post_subject, p.post_time, p.poster_id, p.post_username, u.username, t.topic_id, t.topic_title, t.topic_first_post_id, p.forum_id
|
||||
$sql = 'SELECT p.post_id, p.post_subject, p.post_time, p.poster_id, p.post_username, u.username, u.username_clean, t.topic_id, t.topic_title, t.topic_first_post_id, p.forum_id
|
||||
FROM ' . POSTS_TABLE . ' p, ' . TOPICS_TABLE . ' t, ' . USERS_TABLE . ' u
|
||||
WHERE ' . $db->sql_in_set('p.post_id', $post_list) . '
|
||||
AND t.topic_id = p.topic_id
|
||||
@@ -134,7 +134,7 @@ function mcp_front_view($id, $mode, $action)
|
||||
$global_id = $forum_list[0];
|
||||
|
||||
$sql = $db->sql_build_query('SELECT', array(
|
||||
'SELECT' => 'r.report_time, p.post_id, p.post_subject, u.username, u.user_colour, u.user_id, t.topic_id, t.topic_title, f.forum_id, f.forum_name',
|
||||
'SELECT' => 'r.report_time, p.post_id, p.post_subject, u.username, u.username_clean, u.user_colour, u.user_id, t.topic_id, t.topic_title, f.forum_id, f.forum_name',
|
||||
|
||||
'FROM' => array(
|
||||
REPORTS_TABLE => 'r',
|
||||
|
@@ -226,7 +226,7 @@ function lock_unlock($action, $ids)
|
||||
}
|
||||
unset($orig_ids);
|
||||
|
||||
$redirect = request_var('redirect', build_url(array('_f_', 'action')));
|
||||
$redirect = request_var('redirect', build_url(array('_f_', 'action', 'quickmod')));
|
||||
|
||||
$s_hidden_fields = build_hidden_fields(array(
|
||||
$sql_id . '_list' => $ids,
|
||||
@@ -591,7 +591,7 @@ function mcp_delete_topic($topic_ids)
|
||||
return;
|
||||
}
|
||||
|
||||
$redirect = request_var('redirect', build_url(array('_f_', 'action')));
|
||||
$redirect = request_var('redirect', build_url(array('_f_', 'action', 'quickmod')));
|
||||
$forum_id = request_var('f', 0);
|
||||
|
||||
$s_hidden_fields = build_hidden_fields(array(
|
||||
@@ -647,7 +647,7 @@ function mcp_delete_post($post_ids)
|
||||
return;
|
||||
}
|
||||
|
||||
$redirect = request_var('redirect', build_url(array('_f_', 'action')));
|
||||
$redirect = request_var('redirect', build_url(array('_f_', 'action', 'quickmod')));
|
||||
$forum_id = request_var('f', 0);
|
||||
|
||||
$s_hidden_fields = build_hidden_fields(array(
|
||||
@@ -770,7 +770,7 @@ function mcp_fork_topic($topic_ids)
|
||||
|
||||
$to_forum_id = request_var('to_forum_id', 0);
|
||||
$forum_id = request_var('forum_id', 0);
|
||||
$redirect = request_var('redirect', build_url(array('_f_', 'action')));
|
||||
$redirect = request_var('redirect', build_url(array('_f_', 'action', 'quickmod')));
|
||||
$additional_msg = $success_msg = '';
|
||||
|
||||
$s_hidden_fields = build_hidden_fields(array(
|
||||
|
@@ -41,7 +41,8 @@ class mcp_notes
|
||||
{
|
||||
case 'front':
|
||||
$template->assign_vars(array(
|
||||
'U_FIND_MEMBER' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=mcp&field=username'),
|
||||
'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=mcp&field=username'),
|
||||
'UA_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=mcp&field=username', false),
|
||||
'U_POST_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=notes&mode=user_notes'),
|
||||
|
||||
'L_TITLE' => $user->lang['MCP_NOTES'])
|
||||
|
@@ -119,7 +119,8 @@ function mcp_post_details($id, $mode, $action)
|
||||
'S_CLEAR_ALLOWED' => ($auth->acl_get('a_clearlogs')) ? true : false,
|
||||
|
||||
'U_EDIT' => ($auth->acl_get('m_edit', $post_info['forum_id'])) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=edit&f={$post_info['forum_id']}&p={$post_info['post_id']}") : '',
|
||||
'U_FIND_MEMBER' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=mcp_chgposter&field=username'),
|
||||
'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=mcp_chgposter&field=username'),
|
||||
'UA_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=mcp_chgposter&field=username', false),
|
||||
'U_MCP_APPROVE' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=approve_details&f=' . $post_info['forum_id'] . '&p=' . $post_id),
|
||||
'U_MCP_REPORT' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&mode=report_details&f=' . $post_info['forum_id'] . '&p=' . $post_id),
|
||||
'U_MCP_USER_NOTES' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=notes&mode=user_notes&u=' . $post_info['user_id']),
|
||||
@@ -316,7 +317,7 @@ function mcp_post_details($id, $mode, $action)
|
||||
*/
|
||||
function change_poster(&$post_info, $userdata)
|
||||
{
|
||||
global $auth, $db, $config;
|
||||
global $auth, $db, $config, $phpbb_root_path, $phpEx;
|
||||
|
||||
if (empty($userdata) || $userdata['user_id'] == $post_info['user_id'])
|
||||
{
|
||||
|
@@ -248,7 +248,7 @@ class mcp_queue
|
||||
|
||||
if (sizeof($post_ids))
|
||||
{
|
||||
$sql = 'SELECT t.topic_id, t.topic_title, t.forum_id, p.post_id, p.post_subject, p.post_username, p.poster_id, p.post_time, u.username, u.user_colour
|
||||
$sql = 'SELECT t.topic_id, t.topic_title, t.forum_id, p.post_id, p.post_subject, p.post_username, p.poster_id, p.post_time, u.username, u.username_clean, u.user_colour
|
||||
FROM ' . POSTS_TABLE . ' p, ' . TOPICS_TABLE . ' t, ' . USERS_TABLE . ' u
|
||||
WHERE ' . $db->sql_in_set('p.post_id', $post_ids) . '
|
||||
AND t.topic_id = p.topic_id
|
||||
@@ -382,7 +382,7 @@ function approve_post($post_id_list, $mode)
|
||||
trigger_error('NOT_AUTHORIZED');
|
||||
}
|
||||
|
||||
$redirect = request_var('redirect', build_url(array('_f_')));
|
||||
$redirect = request_var('redirect', build_url(array('_f_', 'quickmod')));
|
||||
$success_msg = '';
|
||||
|
||||
$s_hidden_fields = build_hidden_fields(array(
|
||||
@@ -627,7 +627,7 @@ function disapprove_post($post_id_list, $mode)
|
||||
trigger_error('NOT_AUTHORIZED');
|
||||
}
|
||||
|
||||
$redirect = request_var('redirect', build_url(array('t', 'mode', '_f_')) . '&mode=unapproved_topics');
|
||||
$redirect = request_var('redirect', build_url(array('t', 'mode', '_f_', 'quickmod')) . '&mode=unapproved_topics');
|
||||
$reason = request_var('reason', '', true);
|
||||
$reason_id = request_var('reason_id', 0);
|
||||
$success_msg = $additional_msg = '';
|
||||
|
@@ -64,7 +64,7 @@ class mcp_reports
|
||||
// closed reports are accessed by report id
|
||||
$report_id = request_var('r', 0);
|
||||
|
||||
$sql = 'SELECT r.post_id, r.user_id, r.report_closed, report_time, r.report_text, rr.reason_title, rr.reason_description, u.username, u.user_colour
|
||||
$sql = 'SELECT r.post_id, r.user_id, r.report_closed, report_time, r.report_text, rr.reason_title, rr.reason_description, u.username, u.username_clean, u.user_colour
|
||||
FROM ' . REPORTS_TABLE . ' r, ' . REPORTS_REASONS_TABLE . ' rr, ' . USERS_TABLE . ' u
|
||||
WHERE ' . (($report_id) ? 'r.report_id = ' . $report_id : "r.post_id = $post_id AND r.report_closed = 0") . '
|
||||
AND rr.reason_id = r.reason_id
|
||||
@@ -279,7 +279,7 @@ class mcp_reports
|
||||
|
||||
if (sizeof($report_ids))
|
||||
{
|
||||
$sql = 'SELECT t.forum_id, t.topic_id, t.topic_title, p.post_id, p.post_subject, p.post_username, p.poster_id, p.post_time, u.username, u.user_colour, r.user_id as reporter_id, ru.username as reporter_name, ru.user_colour as reporter_colour, r.report_time, r.report_id
|
||||
$sql = 'SELECT t.forum_id, t.topic_id, t.topic_title, p.post_id, p.post_subject, p.post_username, p.poster_id, p.post_time, u.username, u.username_clean, u.user_colour, r.user_id as reporter_id, ru.username as reporter_name, ru.user_colour as reporter_colour, r.report_time, r.report_id
|
||||
FROM ' . REPORTS_TABLE . ' r, ' . POSTS_TABLE . ' p, ' . TOPICS_TABLE . ' t, ' . USERS_TABLE . ' u, ' . USERS_TABLE . ' ru
|
||||
WHERE ' . $db->sql_in_set('r.report_id', $report_ids) . '
|
||||
AND t.topic_id = p.topic_id
|
||||
@@ -361,15 +361,15 @@ function close_report($post_id_list, $mode, $action)
|
||||
|
||||
if ($action == 'delete' && strpos($user->data['session_page'], 'mode=report_details') !== false)
|
||||
{
|
||||
$redirect = request_var('redirect', build_url(array('mode', '_f_', 'r')) . '&mode=reports');
|
||||
$redirect = request_var('redirect', build_url(array('mode', '_f_', 'r', 'quickmod')) . '&mode=reports');
|
||||
}
|
||||
else if ($action == 'close' && !request_var('r', 0))
|
||||
{
|
||||
$redirect = request_var('redirect', build_url(array('mode', '_f_', 'p')) . '&mode=reports');
|
||||
$redirect = request_var('redirect', build_url(array('mode', '_f_', 'p', 'quickmod')) . '&mode=reports');
|
||||
}
|
||||
else
|
||||
{
|
||||
$redirect = request_var('redirect', build_url(array('_f_')));
|
||||
$redirect = request_var('redirect', build_url(array('_f_', 'quickmod')));
|
||||
}
|
||||
$success_msg = '';
|
||||
|
||||
@@ -385,7 +385,7 @@ function close_report($post_id_list, $mode, $action)
|
||||
{
|
||||
$post_info = get_post_data($post_id_list, 'm_report');
|
||||
|
||||
$sql = 'SELECT r.post_id, r.report_closed, r.user_id, r.user_notify, u.username, u.user_email, u.user_jabber, u.user_lang, u.user_notify_type
|
||||
$sql = 'SELECT r.post_id, r.report_closed, r.user_id, r.user_notify, u.username, u.username_clean, u.user_email, u.user_jabber, u.user_lang, u.user_notify_type
|
||||
FROM ' . REPORTS_TABLE . ' r, ' . USERS_TABLE . ' u
|
||||
WHERE ' . $db->sql_in_set('r.post_id', array_keys($post_info)) . '
|
||||
' . (($action == 'close') ? 'AND r.report_closed = 0' : '') . '
|
||||
|
@@ -79,7 +79,7 @@ function mcp_topic_view($id, $mode, $action)
|
||||
$posts_per_page = $total;
|
||||
}
|
||||
|
||||
$sql = 'SELECT u.username, u.user_colour, p.*
|
||||
$sql = 'SELECT u.username, u.username_clean, u.user_colour, p.*
|
||||
FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u
|
||||
WHERE ' . (($action == 'reports') ? 'p.post_reported = 1 AND ' : '') . '
|
||||
p.topic_id = ' . $topic_id . ' ' .
|
||||
@@ -467,6 +467,7 @@ function merge_posts($topic_id, $to_topic_id)
|
||||
|
||||
if (sizeof($topic_data))
|
||||
{
|
||||
$topic_data = $topic_data[$topic_id];
|
||||
$return_link .= sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $topic_data['forum_id'] . '&t=' . $topic_id) . '">', '</a>');
|
||||
}
|
||||
|
||||
|
@@ -71,7 +71,8 @@ function mcp_warn_front_view($id, $mode)
|
||||
global $template, $db, $user, $auth;
|
||||
|
||||
$template->assign_vars(array(
|
||||
'U_FIND_MEMBER' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=mcp&field=username'),
|
||||
'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=mcp&field=username'),
|
||||
'UA_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=mcp&field=username', false),
|
||||
'U_POST_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=warn&mode=warn_user'),
|
||||
)
|
||||
);
|
||||
@@ -102,7 +103,7 @@ function mcp_warn_front_view($id, $mode)
|
||||
|
||||
// And now the 5 most recent users to get in trouble
|
||||
|
||||
$sql = 'SELECT u.user_id, u.username, u.user_colour, u.user_warnings, w.warning_time
|
||||
$sql = 'SELECT u.user_id, u.username, u.username_clean, u.user_colour, u.user_warnings, w.warning_time
|
||||
FROM ' . USERS_TABLE . ' u, ' . WARNINGS_TABLE . ' w
|
||||
WHERE u.user_id = w.user_id
|
||||
ORDER BY w.warning_time DESC';
|
||||
|
Reference in New Issue
Block a user