diff --git a/suggest_articles.php b/suggest_articles.php index 09c7e8ed..37245fab 100644 --- a/suggest_articles.php +++ b/suggest_articles.php @@ -1,7 +1,7 @@ $max_score) + { + $max_score = $article['score']; + } + + if ($max_score && ($article['score'] / $max_score) < 0.25) + { + break; + } + + $txt = strip_tags($article['content']); if (strlen($txt) > $hesk_settings['kb_substrart']) { $txt = substr($txt, 0, $hesk_settings['kb_substrart']).'...'; @@ -79,6 +94,7 @@ if ( hesk_isREQUEST('p') ) echo ' '.$article['subject'].' +
'.$txt.'

'; } }