[ticket/471] Do not shorten text if limit is at 0
Also, text will no longer be shortened if the modules is using the compact style. B3P-471
This commit is contained in:
@@ -124,7 +124,7 @@ class announcements extends module_base
|
|||||||
$total_announcements = 1;
|
$total_announcements = 1;
|
||||||
|
|
||||||
// Fetch announcements from portal functions.php with check if "read full" is requested.
|
// Fetch announcements from portal functions.php with check if "read full" is requested.
|
||||||
$portal_announcement_length = ($announcement < 0) ? $this->config['board3_announcements_length_' . $module_id] : 0;
|
$portal_announcement_length = ($announcement < 0 && !$this->config['board3_announcements_style_' . $module_id]) ? $this->config['board3_announcements_length_' . $module_id] : 0;
|
||||||
$this->fetch_posts->set_module_id($module_id);
|
$this->fetch_posts->set_module_id($module_id);
|
||||||
$fetch_news = $this->fetch_posts->get_posts(
|
$fetch_news = $this->fetch_posts->get_posts(
|
||||||
$this->config['board3_global_announcements_forum_' . $module_id],
|
$this->config['board3_global_announcements_forum_' . $module_id],
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ class news extends module_base
|
|||||||
$total_news = 1;
|
$total_news = 1;
|
||||||
|
|
||||||
// Fetch news from portal functions.php with check if "read full" is requested.
|
// Fetch news from portal functions.php with check if "read full" is requested.
|
||||||
$portal_news_length = ($news < 0) ? $this->config['board3_news_length_' . $module_id] : 0;
|
$portal_news_length = ($news < 0 && !$this->config['board3_news_style_' . $module_id]) ? $this->config['board3_news_length_' . $module_id] : 0;
|
||||||
$this->fetch_posts->set_module_id($module_id);
|
$this->fetch_posts->set_module_id($module_id);
|
||||||
$fetch_news = $this->fetch_posts->get_posts(
|
$fetch_news = $this->fetch_posts->get_posts(
|
||||||
$this->config['board3_news_forum_' . $module_id],
|
$this->config['board3_news_forum_' . $module_id],
|
||||||
|
|||||||
@@ -623,7 +623,7 @@ class fetch_posts
|
|||||||
*/
|
*/
|
||||||
protected function format_message($row, $text_length, &$posts_striped)
|
protected function format_message($row, $text_length, &$posts_striped)
|
||||||
{
|
{
|
||||||
if (($text_length !== 0) && (strlen($row['post_text']) > $text_length))
|
if ($text_length > 0 && (strlen($row['post_text']) > $text_length))
|
||||||
{
|
{
|
||||||
$message = str_replace(array("\n", "\r"), array('<br />', "\n"), $row['post_text']);
|
$message = str_replace(array("\n", "\r"), array('<br />', "\n"), $row['post_text']);
|
||||||
$message = get_sub_taged_string($message, $row['bbcode_uid'], $text_length);
|
$message = get_sub_taged_string($message, $row['bbcode_uid'], $text_length);
|
||||||
|
|||||||
Reference in New Issue
Block a user