aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/search
diff options
context:
space:
mode:
authorDavid M <davidmj@users.sourceforge.net>2007-04-21 03:19:23 +0000
committerDavid M <davidmj@users.sourceforge.net>2007-04-21 03:19:23 +0000
commit1cffdb2d337576171b9941c32b1b1aca91a69b0e (patch)
treed6da5c3ba3bcf3f7494ed6ff841a3f32996d7053 /phpBB/includes/search
parent6d6c6179a8c50703f4bcd035587e7b184c41087d (diff)
downloadforums-1cffdb2d337576171b9941c32b1b1aca91a69b0e.tar
forums-1cffdb2d337576171b9941c32b1b1aca91a69b0e.tar.gz
forums-1cffdb2d337576171b9941c32b1b1aca91a69b0e.tar.bz2
forums-1cffdb2d337576171b9941c32b1b1aca91a69b0e.tar.xz
forums-1cffdb2d337576171b9941c32b1b1aca91a69b0e.zip
can't be negative
git-svn-id: file:///svn/phpbb/trunk@7378 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/search')
-rwxr-xr-xphpBB/includes/search/fulltext_native.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/phpBB/includes/search/fulltext_native.php b/phpBB/includes/search/fulltext_native.php
index 35c1d9f24d..0af987efab 100755
--- a/phpBB/includes/search/fulltext_native.php
+++ b/phpBB/includes/search/fulltext_native.php
@@ -1160,7 +1160,8 @@ class fulltext_native extends search_backend
$sql = 'UPDATE ' . SEARCH_WORDLIST_TABLE . '
SET word_count = word_count - 1
- WHERE ' . $db->sql_in_set('word_id', $sql_in);
+ WHERE ' . $db->sql_in_set('word_id', $sql_in) . '
+ AND word_count > 0';
$db->sql_query($sql);
unset($sql_in);
@@ -1232,7 +1233,8 @@ class fulltext_native extends search_backend
{
$sql = 'UPDATE ' . SEARCH_WORDLIST_TABLE . '
SET word_count = word_count - 1
- WHERE ' . $db->sql_in_set('word_id', $title_word_ids);
+ WHERE ' . $db->sql_in_set('word_id', $title_word_ids) . '
+ AND word_count > 0';
$db->sql_query($sql);
}
@@ -1240,7 +1242,8 @@ class fulltext_native extends search_backend
{
$sql = 'UPDATE ' . SEARCH_WORDLIST_TABLE . '
SET word_count = word_count - 1
- WHERE ' . $db->sql_in_set('word_id', $message_word_ids);
+ WHERE ' . $db->sql_in_set('word_id', $message_word_ids) . '
+ AND word_count > 0';
$db->sql_query($sql);
}