From 97978b69f17bb8dc19bbc59922a8ba165d976e5c Mon Sep 17 00:00:00 2001 From: Ludovic Arnaud Date: Fri, 1 Nov 2002 21:35:41 +0000 Subject: Some bugfixes, quick-(un)locking now works. git-svn-id: file:///svn/phpbb/trunk@3005 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions_posting.php | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'phpBB/includes/functions_posting.php') diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index 4ef5585b27..e195791445 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -389,7 +389,7 @@ class fulltext_search // echo "Search parser time taken >> " . ($mtime[1] + $mtime[0] - $starttime); // Run the cleanup infrequently, once per session cleanup - if ($config['search_last_gc'] < time - $config['search_gc']) + if ($config['search_last_gc'] < time() - $config['search_gc']) { // $this->search_tidy(); } @@ -447,18 +447,16 @@ class fulltext_search if ($row = $db->sql_fetchrow($result)) { $in_sql = ''; - while ( $row = $db->sql_fetchrow($result) ) + do { - $in_sql .= ( ( $in_sql != '' ) ? ', ' : '' ) . $row['word_id']; + $in_sql .= ',' . $row['word_id']; } + while ($row = $db->sql_fetchrow($result)); $db->sql_freeresult($result); - if ($in_sql) - { - $sql = "DELETE FROM " . SEARCH_WORD_TABLE . " - WHERE word_id IN ($in_sql)"; - $db->sql_query($sql); - } + $sql = 'DELETE FROM ' . SEARCH_WORD_TABLE . ' + WHERE word_id IN (' . substr($in_sql, 1) . ')'; + $db->sql_query($sql); } } } @@ -513,7 +511,6 @@ function generate_smilies($mode) } } while ($row = $db->sql_fetchrow($result)); - $db->sql_freeresult($result); if ($mode == 'inline' && $num_smilies >= 20) -- cgit v1.2.1