diff --git a/phpBB/search.php b/phpBB/search.php index 88a67cd983..fcb02cafc6 100644 --- a/phpBB/search.php +++ b/phpBB/search.php @@ -744,9 +744,6 @@ else if( $query_keywords != "" || $query_author != "" || $search_id ) message_die(GENERAL_ERROR, "Couldn't insert search results", "", __LINE__, __FILE__, $sql); } } - - $db->sql_freeresult($result); - } else { @@ -1050,7 +1047,7 @@ else if( $query_keywords != "" || $query_author != "" || $search_id ) $goto_page = "[ \""" . $lang['Goto_page'] . ": "; $times = 1; - for($j = 0; $j < $replies + 1; $j += $board_config['topics_per_page']) + for($j = 0; $j < $replies + 1; $j += $board_config['posts_per_page']) { $base_url = append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=" . $topic_id . "&start=$j&highlight=$highlight_active");