mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-08 17:56:52 +02:00
- 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
This commit is contained in:
@@ -751,6 +751,8 @@ class acp_forums
|
||||
|
||||
$template->assign_block_vars('forums', array(
|
||||
'FOLDER_IMAGE' => $folder_image,
|
||||
'FORUM_IMAGE' => ($row['forum_image']) ? '<img src="' . $phpbb_root_path . $row['forum_image'] . '" alt="" />' : '',
|
||||
'FORUM_IMAGE_SRC' => ($row['forum_image']) ? $phpbb_root_path . $row['forum_image'] : '',
|
||||
'FORUM_NAME' => $row['forum_name'],
|
||||
'FORUM_DESCRIPTION' => generate_text_for_display($row['forum_desc'], $row['forum_desc_uid'], $row['forum_desc_bitfield'], $row['forum_desc_options']),
|
||||
'FORUM_TOPICS' => $row['forum_topics'],
|
||||
|
@@ -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;
|
||||
|
@@ -237,8 +237,10 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
|
||||
'FORUM_ID' => $row['forum_id'],
|
||||
'FORUM_NAME' => $row['forum_name'],
|
||||
'FORUM_DESC' => generate_text_for_display($row['forum_desc'], $row['forum_desc_uid'], $row['forum_desc_bitfield'], $row['forum_desc_options']),
|
||||
'FORUM_FOLDER_IMG' => ($row['forum_image']) ? '<img src="' . $phpbb_root_path . $row['forum_image'] . '" alt="' . $user->lang['FORUM_CAT'] . '" />' : '',
|
||||
'FORUM_FOLDER_IMG_SRC' => ($row['forum_image']) ? $phpbb_root_path . $row['forum_image'] : '',
|
||||
'FORUM_FOLDER_IMG' => '',
|
||||
'FORUM_FOLDER_IMG_SRC' => '',
|
||||
'FORUM_IMAGE' => ($row['forum_image']) ? '<img src="' . $phpbb_root_path . $row['forum_image'] . '" alt="' . $user->lang['FORUM_CAT'] . '" />' : '',
|
||||
'FORUM_IMAGE_SRC' => ($row['forum_image']) ? $phpbb_root_path . $row['forum_image'] : '',
|
||||
'U_VIEWFORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id']))
|
||||
);
|
||||
|
||||
@@ -341,8 +343,10 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
|
||||
'FORUM_DESC' => generate_text_for_display($row['forum_desc'], $row['forum_desc_uid'], $row['forum_desc_bitfield'], $row['forum_desc_options']),
|
||||
'TOPICS' => $row['forum_topics'],
|
||||
$l_post_click_count => $post_click_count,
|
||||
'FORUM_FOLDER_IMG' => ($row['forum_image']) ? '<img src="' . $phpbb_root_path . $row['forum_image'] . '" alt="' . $user->lang[$folder_alt] . '" />' : $user->img($folder_image, $folder_alt),
|
||||
'FORUM_FOLDER_IMG_SRC' => ($row['forum_image']) ? $phpbb_root_path . $row['forum_image'] : $user->img($folder_image, $folder_alt, false, '', 'src'),
|
||||
'FORUM_FOLDER_IMG' => $user->img($folder_image, $folder_alt),
|
||||
'FORUM_FOLDER_IMG_SRC' => $user->img($folder_image, $folder_alt, false, '', 'src'),
|
||||
'FORUM_IMAGE' => ($row['forum_image']) ? '<img src="' . $phpbb_root_path . $row['forum_image'] . '" alt="' . $user->lang[$folder_alt] . '" />' : '',
|
||||
'FORUM_IMAGE_SRC' => ($row['forum_image']) ? $phpbb_root_path . $row['forum_image'] : '',
|
||||
'SUBFORUMS' => $subforums_list,
|
||||
'LAST_POST_SUBJECT' => $last_post_subject,
|
||||
'LAST_POST_TIME' => $last_post_time,
|
||||
|
@@ -644,7 +644,7 @@ function disapprove_post($post_id_list, $mode)
|
||||
$row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (!$row || (!$reason && $row['reason_title'] == 'other'))
|
||||
if (!$row || (!$reason && strtolower($row['reason_title']) == 'other'))
|
||||
{
|
||||
$additional_msg = $user->lang['NO_REASON_DISAPPROVAL'];
|
||||
unset($_POST['confirm']);
|
||||
@@ -652,7 +652,7 @@ function disapprove_post($post_id_list, $mode)
|
||||
else
|
||||
{
|
||||
// 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 = (strtolower($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" . $reason : '';
|
||||
}
|
||||
}
|
||||
|
@@ -306,6 +306,8 @@ class ucp_main
|
||||
'FORUM_ID' => $forum_id,
|
||||
'FORUM_FOLDER_IMG' => $user->img($folder_image, $folder_alt),
|
||||
'FORUM_FOLDER_IMG_SRC' => $user->img($folder_image, $folder_alt, false, '', 'src'),
|
||||
'FORUM_IMAGE' => ($row['forum_image']) ? '<img src="' . $phpbb_root_path . $row['forum_image'] . '" alt="' . $user->lang[$folder_alt] . '" />' : '',
|
||||
'FORUM_IMAGE_SRC' => ($row['forum_image']) ? $phpbb_root_path . $row['forum_image'] : '',
|
||||
'FORUM_NAME' => $row['forum_name'],
|
||||
'LAST_POST_IMG' => $user->img('icon_topic_latest', 'VIEW_LATEST_POST'),
|
||||
'LAST_POST_SUBJECT' => $row['forum_last_post_subject'],
|
||||
|
Reference in New Issue
Block a user