From 03ed2f3bde5bc5b5eb243b4e88bea72867c7f362 Mon Sep 17 00:00:00 2001 From: Mike Koch Date: Mon, 12 Jan 2015 23:18:00 -0500 Subject: [PATCH] #92 Update suggest_articles.php --- suggest_articles.php | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) 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.'

'; } }