diff options
author | Paul S. Owen <psotfx@users.sourceforge.net> | 2002-04-02 14:04:18 +0000 |
---|---|---|
committer | Paul S. Owen <psotfx@users.sourceforge.net> | 2002-04-02 14:04:18 +0000 |
commit | 51d9bdeca72e22dfa2f7cecc3e7867b125ee899b (patch) | |
tree | 679053f4374226e2bdfb02af19f942b842040354 /phpBB/includes/functions_search.php | |
parent | 374f7adca2dd41e3a20739c74514fbca87a01e55 (diff) | |
download | forums-51d9bdeca72e22dfa2f7cecc3e7867b125ee899b.tar forums-51d9bdeca72e22dfa2f7cecc3e7867b125ee899b.tar.gz forums-51d9bdeca72e22dfa2f7cecc3e7867b125ee899b.tar.bz2 forums-51d9bdeca72e22dfa2f7cecc3e7867b125ee899b.tar.xz forums-51d9bdeca72e22dfa2f7cecc3e7867b125ee899b.zip |
Various updates with any luck they fix a few minor issues without causing new ones ...
git-svn-id: file:///svn/phpbb/trunk@2462 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_search.php')
-rw-r--r-- | phpBB/includes/functions_search.php | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/phpBB/includes/functions_search.php b/phpBB/includes/functions_search.php index b74ac398b4..f42ff475c4 100644 --- a/phpBB/includes/functions_search.php +++ b/phpBB/includes/functions_search.php @@ -206,7 +206,7 @@ function add_search_words($post_id, $post_text, $post_title = '') default: $sql = "INSERT INTO " . SEARCH_WORD_TABLE . " (word_text) VALUES ('" . $word[$i] . "')"; - if( !($result = $db->sql_query($sql)) ) + if( !$db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Could not insert new word', '', __LINE__, __FILE__, $sql); } @@ -230,7 +230,7 @@ function add_search_words($post_id, $post_text, $post_title = '') break; } - if ( !($result = $db->sql_query($sql)) ) + if ( !$db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Could not insert new word', '', __LINE__, __FILE__, $sql); } @@ -247,7 +247,7 @@ function add_search_words($post_id, $post_text, $post_title = '') SELECT $post_id, word_id, $title_match FROM " . SEARCH_WORD_TABLE . " WHERE word_text IN ($match_sql)"; - if ( !($result = $db->sql_query($sql)) ) + if ( !$db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Could not insert new word matches', '', __LINE__, __FILE__, $sql); } @@ -314,7 +314,6 @@ function remove_common($mode, $fraction, $word_id_list = array()) { $common_word_id .= ( ( $common_word_id != '' ) ? ', ' : '' ) . $row['word_id']; } - $db->sql_freeresult($result); if ( $common_word_id != '' ) @@ -322,14 +321,14 @@ function remove_common($mode, $fraction, $word_id_list = array()) $sql = "UPDATE " . SEARCH_WORD_TABLE . " SET word_common = " . TRUE . " WHERE word_id IN ($common_word_id)"; - if ( !($result = $db->sql_query($sql)) ) + if ( !$db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Could not delete word list entry', '', __LINE__, __FILE__, $sql); } $sql = "DELETE FROM " . SEARCH_MATCH_TABLE . " WHERE word_id IN ($common_word_id)"; - if ( !($result = $db->sql_query($sql)) ) + if ( !$db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Could not delete word match entry', '', __LINE__, __FILE__, $sql); } @@ -378,7 +377,7 @@ function remove_search_post($post_id_sql) { $sql = "DELETE FROM " . SEARCH_WORD_TABLE . " WHERE word_id IN ($word_id_sql)"; - if ( !($result = $db->sql_query($sql, END_TRANSACTION)) ) + if ( !$db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Could not delete word list entry', '', __LINE__, __FILE__, $sql); } @@ -403,7 +402,7 @@ function remove_search_post($post_id_sql) GROUP BY word_id HAVING COUNT(word_id) = 1 )"; - if ( !($result = $db->sql_query($sql, END_TRANSACTION)) ) + if ( !$db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Could not delete old words from word table', '', __LINE__, __FILE__, $sql); } @@ -415,7 +414,7 @@ function remove_search_post($post_id_sql) $sql = "DELETE FROM " . SEARCH_MATCH_TABLE . " WHERE post_id IN ($post_id_sql)"; - if ( !($db->sql_query($sql)) ) + if ( !$db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql); } @@ -457,6 +456,7 @@ function username_search($search_match) { $username_list .= '<option>' . $lang['No_match']. '</option>'; } + $db->sql_freeresult($result); } $gen_simple_header = TRUE; |