mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-07 01:06:48 +02:00
- streamlined reports to consist of the feature set we decided upon (Nils, your turn now)
- use getenv instead of $_ENV (with $_ENV the case could be wrong) - permission fixes (there was a bug arising with getting permission flags - re-added them and handled roles deletion differently) - implemented max login attempts - changed the expected return parameters for logins/sessions - added acp page for editing report/denial reasons - other fixes here and there git-svn-id: file:///svn/phpbb/trunk@5622 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -964,7 +964,7 @@ class mcp_main_info
|
||||
'version' => '1.0.0',
|
||||
'modes' => array(
|
||||
'forum_view' => array('title' => 'MCP_MAIN_FORUM_VIEW', 'auth' => 'acl_m_,$id'),
|
||||
'front' => array('title' => 'MCP_MAIN_FRONT', 'auth' => ''),
|
||||
'front' => array('title' => 'MCP_MAIN_FRONT', 'auth' => 'acl_m_'),
|
||||
'post_details' => array('title' => 'MCP_MAIN_POST_DETAILS', 'auth' => 'acl_m_,$id'),
|
||||
'topic_view' => array('title' => 'MCP_MAIN_TOPIC_VIEW', 'auth' => 'acl_m_,$id'),
|
||||
),
|
||||
|
@@ -165,10 +165,17 @@ function mcp_post_details($id, $mode, $action)
|
||||
|
||||
do
|
||||
{
|
||||
// If the reason is defined within the language file, we will use the localized version, else just use the database entry...
|
||||
if (isset($user->lang['report_reasons']['TITLE'][strtoupper($row['reason_title'])]) && isset($user->lang['report_reasons']['DESCRIPTION'][strtoupper($row['reason_title'])]))
|
||||
{
|
||||
$row['reson_description'] = $user->lang['report_reasons']['DESCRIPTION'][strtoupper($row['reason_title'])];
|
||||
$row['reason_title'] = $user->lang['report_reasons']['TITLE'][strtoupper($row['reason_title'])];
|
||||
}
|
||||
|
||||
$template->assign_block_vars('reports', array(
|
||||
'REPORT_ID' => $row['report_id'],
|
||||
'REASON_TITLE' => $user->lang['report_reasons']['TITLE'][strtoupper($row['reason_name'])],
|
||||
'REASON_DESC' => $user->lang['report_reasons']['DESCRIPTION'][strtoupper($row['reason_name'])],
|
||||
'REASON_TITLE' => $row['reason_title'],
|
||||
'REASON_DESC' => $row['reason_description'],
|
||||
'REPORTER' => ($row['user_id'] != ANONYMOUS) ? $row['username'] : $user->lang['GUEST'],
|
||||
'U_REPORTER' => ($row['user_id'] != ANONYMOUS) ? "{$phpbb_root_path}memberlist.$phpEx$SID&mode=viewprofile&u={$row['user_id']}" : '',
|
||||
'USER_NOTIFY' => ($row['user_notify']) ? true : false,
|
||||
|
@@ -542,23 +542,25 @@ function disapprove_post($post_id_list, $mode)
|
||||
|
||||
if ($reason_id)
|
||||
{
|
||||
$sql = 'SELECT reason_name
|
||||
$sql = 'SELECT reason_title, reason_description
|
||||
FROM ' . REASONS_TABLE . "
|
||||
WHERE reason_id = $reason_id";
|
||||
$result = $db->sql_query($sql);
|
||||
$row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (!($row = $db->sql_fetchrow($result)) || (!$reason && $row['reason_name'] == 'other'))
|
||||
if (!$row || (!$reason && $row['reason_title'] == 'other'))
|
||||
{
|
||||
$additional_msg = 'Please give an appropiate reason for disapproval';
|
||||
unset($_POST['confirm']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$disapprove_reason = ($row['reason_name'] != 'other') ? $user->lang['report_reasons']['DESCRIPTION'][strtoupper($row['reason_name'])] : '';
|
||||
// If the reason is defined within the language file, we will use the localized version, else just use the database entry...
|
||||
$disapprove_reason = ($row['reason_title'] != 'other') ? ((isset($user->lang['report_reasons']['DESCRIPTION'][strtoupper($row['reason_title'])]) ? $user->lang['report_reasons']['DESCRIPTION'][strtoupper($row['reason_title'])] : $row['reason_description']) : '';
|
||||
$disapprove_reason .= ($reason) ? "\n\n" . $_REQUEST['reason'] : '';
|
||||
unset($reason);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
if (confirm_box(true))
|
||||
@@ -683,27 +685,9 @@ function disapprove_post($post_id_list, $mode)
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql = 'SELECT *
|
||||
FROM ' . REASONS_TABLE . '
|
||||
ORDER BY reason_priority ASC';
|
||||
$result = $db->sql_query($sql);
|
||||
include_once($phpbb_root_path . 'includes/functions_display.' . $phpEx);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$row['reason_name'] = strtoupper($row['reason_name']);
|
||||
|
||||
$reason_title = (!empty($user->lang['report_reasons']['TITLE'][$row['reason_name']])) ? $user->lang['report_reasons']['TITLE'][$row['reason_name']] : ucwords(str_replace('_', ' ', $row['reason_name']));
|
||||
|
||||
$reason_desc = (!empty($user->lang['report_reasons']['DESCRIPTION'][$row['reason_name']])) ? $user->lang['report_reasons']['DESCRIPTION'][$row['reason_name']] : $row['reason_desc'];
|
||||
|
||||
$template->assign_block_vars('reason', array(
|
||||
'ID' => $row['reason_id'],
|
||||
'NAME' => htmlspecialchars($reason_title),
|
||||
'DESCRIPTION' => htmlspecialchars($reason_desc),
|
||||
'S_SELECTED' => ($row['reason_id'] == $reason_id) ? true : false)
|
||||
);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
display_reasons($reason_id);
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_NOTIFY_POSTER' => true,
|
||||
|
Reference in New Issue
Block a user