aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/mcp/mcp_queue.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2006-03-12 23:19:55 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2006-03-12 23:19:55 +0000
commit9988679d567a8bba9bade92dd9524bb012a1fe43 (patch)
tree72da21e7465fed3ca99f20bd809a3df9c020530d /phpBB/includes/mcp/mcp_queue.php
parentf4cfd3665f7cf1ed96ce4c2eca03ac6854aae258 (diff)
downloadforums-9988679d567a8bba9bade92dd9524bb012a1fe43.tar
forums-9988679d567a8bba9bade92dd9524bb012a1fe43.tar.gz
forums-9988679d567a8bba9bade92dd9524bb012a1fe43.tar.bz2
forums-9988679d567a8bba9bade92dd9524bb012a1fe43.tar.xz
forums-9988679d567a8bba9bade92dd9524bb012a1fe43.zip
- 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
Diffstat (limited to 'phpBB/includes/mcp/mcp_queue.php')
-rw-r--r--phpBB/includes/mcp/mcp_queue.php32
1 files changed, 8 insertions, 24 deletions
diff --git a/phpBB/includes/mcp/mcp_queue.php b/phpBB/includes/mcp/mcp_queue.php
index 7884298380..e447184b55 100644
--- a/phpBB/includes/mcp/mcp_queue.php
+++ b/phpBB/includes/mcp/mcp_queue.php
@@ -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);
-
- while ($row = $db->sql_fetchrow($result))
- {
- $row['reason_name'] = strtoupper($row['reason_name']);
+ include_once($phpbb_root_path . 'includes/functions_display.' . $phpEx);
- $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,