From 617008810f4240b490f5acbbfebb863e9292dcfa Mon Sep 17 00:00:00 2001 From: "Paul S. Owen" Date: Sun, 27 Jan 2002 02:24:05 +0000 Subject: [PATCH] Fixed stripslashing problem which would lead to incorrect search results in some cases git-svn-id: file:///svn/phpbb/trunk@1964 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/search.php | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/phpBB/search.php b/phpBB/search.php index 179cd83ac2..1d223bdced 100644 --- a/phpBB/search.php +++ b/phpBB/search.php @@ -231,7 +231,7 @@ else if( $query_keywords != "" || $query_author != "" || $search_id ) $synonym_array = @file($phpbb_root_path . "language/lang_" . $board_config['default_lang'] . "/search_synonyms.txt"); $split_search = array(); - $cleaned_search = clean_words("search", $query_keywords, $synonym_array); + $cleaned_search = clean_words("search", stripslashes($query_keywords), $synonym_array); $split_search = split_words($cleaned_search, "search"); $search_msg_only = ( !$search_msg_title ) ? "AND m.title_match = 0" : ""; @@ -517,12 +517,15 @@ else if( $query_keywords != "" || $query_author != "" || $search_id ) $sortby_dir = "DESC"; } - // // Finish building query (for all combinations) // and run it ... // - if( $total_match_count ) + if( !$total_match_count ) + { + message_die(GENERAL_MESSAGE, $lang['No_search_match']); + } + else if( $total_match_count ) { // // Clean up search results table @@ -630,10 +633,6 @@ else if( $query_keywords != "" || $query_author != "" || $search_id ) header("Location: " . append_sid("search.$phpEx", true)); } } - else - { - message_die(GENERAL_MESSAGE, $lang['No_search_match']); - } if( $search_results != "" ) {