1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-06-06 06:25:04 +02:00

fix mcp sorting for pm_reports, and some minor language changes

git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9830 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Nils Adermann 2009-07-22 13:33:54 +00:00
parent 54f78a50bc
commit 00e81e704d
4 changed files with 17 additions and 10 deletions

View File

@ -221,7 +221,7 @@ class mcp_pm_reports
if ($mode == 'pm_reports')
{
$report_state = 'pm.message_reported = 1 AND r.report_closed = 0';
$report_state = 'p.message_reported = 1 AND r.report_closed = 0';
}
else
{
@ -229,10 +229,10 @@ class mcp_pm_reports
}
$sql = 'SELECT r.report_id
FROM ' . PRIVMSGS_TABLE . ' pm, ' . REPORTS_TABLE . ' r ' . (($sort_order_sql[0] == 'u') ? ', ' . USERS_TABLE . ' u' : '') . (($sort_order_sql[0] == 'r') ? ', ' . USERS_TABLE . ' ru' : '') . "
FROM ' . PRIVMSGS_TABLE . ' p, ' . REPORTS_TABLE . ' r ' . (($sort_order_sql[0] == 'u') ? ', ' . USERS_TABLE . ' u' : '') . (($sort_order_sql[0] == 'r') ? ', ' . USERS_TABLE . ' ru' : '') . "
WHERE $report_state
AND r.pm_id = pm.msg_id
" . (($sort_order_sql[0] == 'u') ? 'AND u.user_id = pm.author_id' : '') . '
AND r.pm_id = p.msg_id
" . (($sort_order_sql[0] == 'u') ? 'AND u.user_id = p.author_id' : '') . '
' . (($sort_order_sql[0] == 'r') ? 'AND ru.user_id = r.user_id' : '') . "
AND r.post_id = 0
$limit_time_sql

View File

@ -286,7 +286,7 @@ $lang = array_merge($lang, array(
'REPORT_DELETED_SUCCESS' => 'The selected report has been deleted successfully.',
'REPORT_DETAILS' => 'Report details',
'REPORT_MESSAGE' => 'Report this message',
'REPORT_MESSAGE_EXPLAIN' => 'Use this form to report the selected private message. Reporting should generally be used only if the message breaks forum rules. <strong>Reporting a private message will make its contents visible to all moderators</strong>',
'REPORT_MESSAGE_EXPLAIN' => 'Use this form to report the selected private message. Reporting should generally be used only if the message breaks forum rules. <strong>Reporting a private message will make its contents visible to all moderators.</strong>',
'REPORT_NOTIFY' => 'Notify me',
'REPORT_NOTIFY_EXPLAIN' => 'Informs you when your report is dealt with.',
'REPORT_POST_EXPLAIN' => 'Use this form to report the selected post to the forum moderators and board administrators. Reporting should generally be used only if the post breaks forum rules.',

View File

@ -374,6 +374,7 @@ $lang = array_merge($lang, array(
'RENAME' => 'Rename',
'RENAME_FOLDER' => 'Rename folder',
'REPLIED_MESSAGE' => 'Replied to message',
'REPORT_PM' => 'Report private message',
'RESIGN_SELECTED' => 'Resign selected',
'RETURN_FOLDER' => '%1$sReturn to previous folder%2$s',
'RETURN_UCP' => '%sReturn to the User Control Panel%s',

View File

@ -698,13 +698,13 @@ function mcp_sorting($mode, &$sort_days, &$sort_key, &$sort_dir, &$sort_by_sql,
case 'pm_reports_closed':
case 'reports':
case 'reports_closed':
$type = 'reports';
$pm = (strpos($mode, 'pm_') === 0) ? true : false;
$type = ($pm) ? 'pm_reports' : 'reports';
$default_key = 't';
$default_dir = 'd';
$limit_time_sql = ($min_time) ? "AND r.report_time >= $min_time" : '';
$pm = (strpos($mode, 'pm_') === 0) ? true : false;
if ($topic_id)
{
$where_sql .= ' p.topic_id = ' . $topic_id . ' AND ';
@ -713,12 +713,12 @@ function mcp_sorting($mode, &$sort_days, &$sort_key, &$sort_dir, &$sort_by_sql,
{
$where_sql .= ' p.forum_id = ' . $forum_id . ' AND ';
}
else if ($pm)
else if (!$pm)
{
$where_sql .= ' ' . $db->sql_in_set('p.forum_id', get_forum_list(array('!f_read', '!m_report')), true, true) . ' AND ';
}
if ($mode == 'reports')
if ($mode == 'reports' || $mode == 'pm_reports')
{
$where_sql .= ' r.report_closed = 0 AND ';
}
@ -785,6 +785,12 @@ function mcp_sorting($mode, &$sort_days, &$sort_key, &$sort_dir, &$sort_by_sql,
$sort_by_sql = array('a' => 'u.username_clean', 'r' => 'ru.username', 'p' => 'p.post_time', 't' => 'r.report_time', 's' => 'p.post_subject');
break;
case 'pm_reports':
$limit_days = array(0 => $user->lang['ALL_REPORTS'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']);
$sort_by_text = array('a' => $user->lang['AUTHOR'], 'r' => $user->lang['REPORTER'], 'p' => $user->lang['POST_TIME'], 't' => $user->lang['REPORT_TIME'], 's' => $user->lang['SUBJECT']);
$sort_by_sql = array('a' => 'u.username_clean', 'r' => 'ru.username', 'p' => 'p.message_time', 't' => 'r.report_time', 's' => 'p.message_subject');
break;
case 'logs':
$limit_days = array(0 => $user->lang['ALL_ENTRIES'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']);
$sort_by_text = array('u' => $user->lang['SORT_USERNAME'], 't' => $user->lang['SORT_DATE'], 'i' => $user->lang['SORT_IP'], 'o' => $user->lang['SORT_ACTION']);