mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[ticket/10650] Moving censoring to before truncation
The censor_text function is now being applied to the last_post_subject before being truncated. PHPBB3-10650
This commit is contained in:
parent
6661c92dd3
commit
1e4710b194
1 changed files with 2 additions and 2 deletions
|
@ -397,7 +397,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
|
||||||
if ($row['forum_last_post_id'])
|
if ($row['forum_last_post_id'])
|
||||||
{
|
{
|
||||||
$last_post_subject = $row['forum_last_post_subject'];
|
$last_post_subject = $row['forum_last_post_subject'];
|
||||||
$last_post_subject_truncated = truncate_string($last_post_subject, 30, 255 ,false, $user->lang['ELLIPSIS']);
|
$last_post_subject_truncated = truncate_string(censor_text($last_post_subject), 30, 255, false, $user->lang['ELLIPSIS']);
|
||||||
$last_post_time = $user->format_date($row['forum_last_post_time']);
|
$last_post_time = $user->format_date($row['forum_last_post_time']);
|
||||||
$last_post_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id_last_post'] . '&p=' . $row['forum_last_post_id']) . '#p' . $row['forum_last_post_id'];
|
$last_post_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id_last_post'] . '&p=' . $row['forum_last_post_id']) . '#p' . $row['forum_last_post_id'];
|
||||||
}
|
}
|
||||||
|
@ -466,7 +466,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
|
||||||
'FORUM_IMAGE' => ($row['forum_image']) ? '<img src="' . $phpbb_root_path . $row['forum_image'] . '" alt="' . $user->lang[$folder_alt] . '" />' : '',
|
'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_IMAGE_SRC' => ($row['forum_image']) ? $phpbb_root_path . $row['forum_image'] : '',
|
||||||
'LAST_POST_SUBJECT' => censor_text($last_post_subject),
|
'LAST_POST_SUBJECT' => censor_text($last_post_subject),
|
||||||
'LAST_POST_SUBJECT_TRUNCATED' => censor_text($last_post_subject_truncated),
|
'LAST_POST_SUBJECT_TRUNCATED' => $last_post_subject_truncated,
|
||||||
'LAST_POST_TIME' => $last_post_time,
|
'LAST_POST_TIME' => $last_post_time,
|
||||||
'LAST_POSTER' => get_username_string('username', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']),
|
'LAST_POSTER' => get_username_string('username', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']),
|
||||||
'LAST_POSTER_COLOUR' => get_username_string('colour', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']),
|
'LAST_POSTER_COLOUR' => get_username_string('colour', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']),
|
||||||
|
|
Loading…
Add table
Reference in a new issue