aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorPaul S. Owen <psotfx@users.sourceforge.net>2002-01-27 02:24:05 +0000
committerPaul S. Owen <psotfx@users.sourceforge.net>2002-01-27 02:24:05 +0000
commit617008810f4240b490f5acbbfebb863e9292dcfa (patch)
tree6bda264a82790a69e00f25ee60509d0f2b046acd /phpBB
parented932754b5e8f079c836a2258793f82373e72e8a (diff)
downloadforums-617008810f4240b490f5acbbfebb863e9292dcfa.tar
forums-617008810f4240b490f5acbbfebb863e9292dcfa.tar.gz
forums-617008810f4240b490f5acbbfebb863e9292dcfa.tar.bz2
forums-617008810f4240b490f5acbbfebb863e9292dcfa.tar.xz
forums-617008810f4240b490f5acbbfebb863e9292dcfa.zip
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
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/search.php13
1 files 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 != "" )
{