|
From: Nils A. <nad...@ph...> - 2009-07-22 13:44:45
|
Author: naderman
Date: Wed Jul 22 13:33:54 2009
New Revision: 9830
Log:
fix mcp sorting for pm_reports, and some minor language changes
Modified:
branches/phpBB-3_0_0/phpBB/includes/mcp/mcp_pm_reports.php
branches/phpBB-3_0_0/phpBB/language/en/mcp.php
branches/phpBB-3_0_0/phpBB/language/en/ucp.php
branches/phpBB-3_0_0/phpBB/mcp.php
Modified: branches/phpBB-3_0_0/phpBB/includes/mcp/mcp_pm_reports.php
==============================================================================
*** branches/phpBB-3_0_0/phpBB/includes/mcp/mcp_pm_reports.php (original)
--- branches/phpBB-3_0_0/phpBB/includes/mcp/mcp_pm_reports.php Wed Jul 22 13:33:54 2009
***************
*** 221,227 ****
if ($mode == 'pm_reports')
{
! $report_state = 'pm.message_reported = 1 AND r.report_closed = 0';
}
else
{
--- 221,227 ----
if ($mode == 'pm_reports')
{
! $report_state = 'p.message_reported = 1 AND r.report_closed = 0';
}
else
{
***************
*** 229,238 ****
}
$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' : '') . "
WHERE $report_state
! AND r.pm_id = pm.msg_id
! " . (($sort_order_sql[0] == 'u') ? 'AND u.user_id = pm.author_id' : '') . '
' . (($sort_order_sql[0] == 'r') ? 'AND ru.user_id = r.user_id' : '') . "
AND r.post_id = 0
$limit_time_sql
--- 229,238 ----
}
$sql = 'SELECT r.report_id
! 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 = 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
Modified: branches/phpBB-3_0_0/phpBB/language/en/mcp.php
==============================================================================
*** branches/phpBB-3_0_0/phpBB/language/en/mcp.php (original)
--- branches/phpBB-3_0_0/phpBB/language/en/mcp.php Wed Jul 22 13:33:54 2009
***************
*** 286,292 ****
'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_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.',
--- 286,292 ----
'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_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.',
Modified: branches/phpBB-3_0_0/phpBB/language/en/ucp.php
==============================================================================
*** branches/phpBB-3_0_0/phpBB/language/en/ucp.php (original)
--- branches/phpBB-3_0_0/phpBB/language/en/ucp.php Wed Jul 22 13:33:54 2009
***************
*** 374,379 ****
--- 374,380 ----
'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',
Modified: branches/phpBB-3_0_0/phpBB/mcp.php
==============================================================================
*** branches/phpBB-3_0_0/phpBB/mcp.php (original)
--- branches/phpBB-3_0_0/phpBB/mcp.php Wed Jul 22 13:33:54 2009
***************
*** 698,710 ****
case 'pm_reports_closed':
case 'reports':
case 'reports_closed':
! $type = '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 ';
--- 698,710 ----
case 'pm_reports_closed':
case 'reports':
case 'reports_closed':
! $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" : '';
if ($topic_id)
{
$where_sql .= ' p.topic_id = ' . $topic_id . ' AND ';
***************
*** 713,724 ****
{
$where_sql .= ' p.forum_id = ' . $forum_id . ' AND ';
}
! 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')
{
$where_sql .= ' r.report_closed = 0 AND ';
}
--- 713,724 ----
{
$where_sql .= ' p.forum_id = ' . $forum_id . ' AND ';
}
! 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' || $mode == 'pm_reports')
{
$where_sql .= ' r.report_closed = 0 AND ';
}
***************
*** 785,790 ****
--- 785,796 ----
$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']);
|