aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp/acp_reasons.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2006-10-08 19:04:49 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2006-10-08 19:04:49 +0000
commit0b2aaae28bb341a38864eda320e135826a0568e4 (patch)
tree3eb7fb1c71612582f5dfa3bbeb062e6d26cb12aa /phpBB/includes/acp/acp_reasons.php
parentf8be2a133bccc6860dd5531dbbfc068a5a3fa699 (diff)
downloadforums-0b2aaae28bb341a38864eda320e135826a0568e4.tar
forums-0b2aaae28bb341a38864eda320e135826a0568e4.tar.gz
forums-0b2aaae28bb341a38864eda320e135826a0568e4.tar.bz2
forums-0b2aaae28bb341a38864eda320e135826a0568e4.tar.xz
forums-0b2aaae28bb341a38864eda320e135826a0568e4.zip
- forum image being an additional image instead of replacing forum indicators
- reasons fixes git-svn-id: file:///svn/phpbb/trunk@6470 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/acp/acp_reasons.php')
-rw-r--r--phpBB/includes/acp/acp_reasons.php26
1 files changed, 15 insertions, 11 deletions
diff --git a/phpBB/includes/acp/acp_reasons.php b/phpBB/includes/acp/acp_reasons.php
index a75dc64f5b..abf554d824 100644
--- a/phpBB/includes/acp/acp_reasons.php
+++ b/phpBB/includes/acp/acp_reasons.php
@@ -61,11 +61,11 @@ class acp_reasons
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
- if ($row['reason_title'] == 'other')
+ if (strtolower($row['reason_title']) == 'other')
{
$reason_row['reason_title'] = 'other';
}
- else if (utf8_strtolower($row['reason_title']) != utf8_strtolower($reason_row['reason_title']))
+ else if ($row['reason_title'] != $reason_row['reason_title'])
{
$check_double = true;
}
@@ -76,12 +76,12 @@ class acp_reasons
{
$sql = 'SELECT reason_id
FROM ' . REPORTS_REASONS_TABLE . "
- WHERE LOWER(reason_title) = '" . $db->sql_escape(utf8_strtolower($reason_row['reason_title'])) . "'";
+ WHERE reason_title = '" . $db->sql_escape($reason_row['reason_title']) . "'";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
- if ($row)
+ if ($row || ($add && strtolower($reason_row['reason_title']) == 'other'))
{
$error[] = $user->lang['REASON_ALREADY_EXIST'];
}
@@ -159,10 +159,14 @@ class acp_reasons
'REASON_TITLE' => $reason_row['reason_title'],
'REASON_DESCRIPTION' => $reason_row['reason_description'],
-
- 'S_EDIT_REASON' => true,
- 'S_TRANSLATED' => $translated,
- 'S_ERROR' => (sizeof($error)) ? true : false,
+
+ 'TRANSLATED_TITLE' => ($translated) ? $user->lang['report_reasons']['TITLE'][strtoupper($reason_row['reason_title'])] : '',
+ 'TRANSLATED_DESCRIPTION'=> ($translated) ? $user->lang['report_reasons']['DESCRIPTION'][strtoupper($reason_row['reason_title'])] : '',
+
+ 'S_AVAILABLE_TITLES' => implode(', ', array_map('htmlspecialchars', array_keys($user->lang['report_reasons']['TITLE']))),
+ 'S_EDIT_REASON' => true,
+ 'S_TRANSLATED' => $translated,
+ 'S_ERROR' => (sizeof($error)) ? true : false,
)
);
@@ -183,7 +187,7 @@ class acp_reasons
trigger_error($user->lang['NO_REASON'] . adm_back_link($this->u_action), E_USER_WARNING);
}
- if ($reason_row['reason_title'] == 'other')
+ if (strtolower($reason_row['reason_title']) == 'other')
{
trigger_error($user->lang['NO_REMOVE_DEFAULT_REASON'] . adm_back_link($this->u_action), E_USER_WARNING);
}
@@ -193,7 +197,7 @@ class acp_reasons
{
$sql = 'SELECT reason_id
FROM ' . REPORTS_REASONS_TABLE . "
- WHERE reason_title = 'other'";
+ WHERE LOWER(reason_title) = 'other'";
$result = $db->sql_query($sql);
$other_reason_id = (int) $db->sql_fetchfield('reason_id');
$db->sql_freeresult($result);
@@ -327,7 +331,7 @@ class acp_reasons
// 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_description'] = $user->lang['report_reasons']['DESCRIPTION'][strtoupper($row['reason_title'])];
$row['reason_title'] = $user->lang['report_reasons']['TITLE'][strtoupper($row['reason_title'])];
$translated = true;