diff --git a/sections/forums/search.php b/sections/forums/search.php index 869b56eb..1c0a20ef 100644 --- a/sections/forums/search.php +++ b/sections/forums/search.php @@ -3,7 +3,8 @@ /* Forums search result page */ - +include(SERVER_ROOT.'/classes/class_text.php'); +$Text = new TEXT; list($Page,$Limit) = page_limit(POSTS_PER_PAGE); @@ -172,14 +173,15 @@ $Words = explode(' ', db_string($Search)); if($Type == 'body') { - + $sql = "SELECT SQL_CALC_FOUND_ROWS t.ID, ".(!empty($ThreadID) ? "SUBSTRING_INDEX(p.Body, ' ', 40)":"t.Title").", t.ForumID, f.Name, p.AddedTime, - p.ID + p.ID, + p.Body FROM forums_posts AS p JOIN forums_topics AS t ON t.ID=p.TopicID JOIN forums AS f ON f.ID=t.ForumID @@ -269,7 +271,7 @@ } $Row = 'a'; // For the pretty colours -while(list($ID, $Title, $ForumID, $ForumName, $LastTime, $PostID) = $DB->next_record()) { +while(list($ID, $Title, $ForumID, $ForumName, $LastTime, $PostID, $Body) = $DB->next_record()) { $Row = ($Row == 'a') ? 'b' : 'a'; // Print results ?> @@ -284,7 +286,7 @@ =cut_string($Title, 80); ?> } if ($Type == 'body') { ?> - + (show) } ?>