Merge pull request #472 from marc1706/ticket/471

[ticket/471] Do not shorten text if limit is at 0
This commit is contained in:
Marc Alexander
2015-02-12 23:52:15 +01:00
3 changed files with 3 additions and 3 deletions

View File

@@ -124,7 +124,7 @@ class announcements extends module_base
$total_announcements = 1;
// 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);
$fetch_news = $this->fetch_posts->get_posts(
$this->config['board3_global_announcements_forum_' . $module_id],

View File

@@ -125,7 +125,7 @@ class news extends module_base
$total_news = 1;
// 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);
$fetch_news = $this->fetch_posts->get_posts(
$this->config['board3_news_forum_' . $module_id],

View File

@@ -623,7 +623,7 @@ class fetch_posts
*/
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 = get_sub_taged_string($message, $row['bbcode_uid'], $text_length);