diff options
author | Ludovic Arnaud <ludovic_arnaud@users.sourceforge.net> | 2002-11-01 21:35:41 +0000 |
---|---|---|
committer | Ludovic Arnaud <ludovic_arnaud@users.sourceforge.net> | 2002-11-01 21:35:41 +0000 |
commit | 97978b69f17bb8dc19bbc59922a8ba165d976e5c (patch) | |
tree | 438dc27daa1fe4fb48b18c0948ea00a82a5e3c77 /phpBB/includes/functions_posting.php | |
parent | ac0c0f5247dd5b363bef4f6e26178dff933c1dd2 (diff) | |
download | forums-97978b69f17bb8dc19bbc59922a8ba165d976e5c.tar forums-97978b69f17bb8dc19bbc59922a8ba165d976e5c.tar.gz forums-97978b69f17bb8dc19bbc59922a8ba165d976e5c.tar.bz2 forums-97978b69f17bb8dc19bbc59922a8ba165d976e5c.tar.xz forums-97978b69f17bb8dc19bbc59922a8ba165d976e5c.zip |
Some bugfixes, quick-(un)locking now works.
git-svn-id: file:///svn/phpbb/trunk@3005 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_posting.php')
-rw-r--r-- | phpBB/includes/functions_posting.php | 17 |
1 files changed, 7 insertions, 10 deletions
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) |