diff options
author | David King <imkingdavid@gmail.com> | 2012-04-04 16:41:28 -0400 |
---|---|---|
committer | David King <imkingdavid@gmail.com> | 2012-04-04 16:41:28 -0400 |
commit | b1fb34a4d7e446768b9f66ba6dd359173cd2a5fb (patch) | |
tree | aa49950397fa973e8acf29ec4183974e5f748213 /phpBB/includes/functions_display.php | |
parent | 7d6b289671c51694f17dd5f9849abf2534b55e59 (diff) | |
parent | 3e9711d6a4c1786ec4702b1d87810c4ed0182953 (diff) | |
download | forums-b1fb34a4d7e446768b9f66ba6dd359173cd2a5fb.tar forums-b1fb34a4d7e446768b9f66ba6dd359173cd2a5fb.tar.gz forums-b1fb34a4d7e446768b9f66ba6dd359173cd2a5fb.tar.bz2 forums-b1fb34a4d7e446768b9f66ba6dd359173cd2a5fb.tar.xz forums-b1fb34a4d7e446768b9f66ba6dd359173cd2a5fb.zip |
Merge remote-tracking branch 'rahulr92/ticket/10650' into develop
Diffstat (limited to 'phpBB/includes/functions_display.php')
-rw-r--r-- | phpBB/includes/functions_display.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php index 18db64cc68..4e70a4911c 100644 --- a/phpBB/includes/functions_display.php +++ b/phpBB/includes/functions_display.php @@ -397,6 +397,11 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod if ($row['forum_last_post_id']) { $last_post_subject = $row['forum_last_post_subject']; + if (utf8_strlen(htmlspecialchars_decode($last_post_subject)) > 30) + { + $last_post_subject = htmlspecialchars(utf8_substr(htmlspecialchars_decode($last_post_subject, 0, 30))); + $last_post_subject .= '...'; + } $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']; } @@ -451,6 +456,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod 'S_LOCKED_FORUM' => ($row['forum_status'] == ITEM_LOCKED) ? true : false, 'S_LIST_SUBFORUMS' => ($row['display_subforum_list']) ? true : false, 'S_SUBFORUMS' => (sizeof($subforums_list)) ? true : false, + 'S_DISPLAY_SUBJECT' => ($last_post_subject && $row['display_last_subject'] && !$row['forum_password'] && $auth->acl_get('f_read', $row['forum_id'])) ? true : false, 'S_FEED_ENABLED' => ($config['feed_forum'] && !phpbb_optionget(FORUM_OPTION_FEED_EXCLUDE, $row['forum_options']) && $row['forum_type'] == FORUM_POST) ? true : false, 'FORUM_ID' => $row['forum_id'], |